private void ReloadGun() { CanFire = true; GhostSquare.UnOccupy(); CurrentSquare.SetOccupied(NextSquare.Value); //gun values are minus the highest board value. var value = NextSquare.ValueController.GridValues[Random.Range(0, NextSquare.ValueController.GridValues.Count - 1)]; NextSquare.SetOccupied(value); AnimateDummyReload(); }
private void FireCircle() { CanFire = false; mySource.Play(); Vector3[] linePos = new Vector3[myLine.positionCount]; myLine.GetPositions(linePos); linePos[myLine.positionCount - 1] = SelectedGridSquare.transform.position; GhostCircle.transform.position = transform.position; GhostSquare.SetOccupied(CurrentSquare.Value); CurrentSquare.UnOccupy(); myLine.positionCount = 1; StartCoroutine(AnimateBulletPath(linePos, 0)); }