public void RpcChargeAttack(PositionSquareLocation target) { Debug.LogError("Charge Attack! " + target); PositionSquare targetSquare = bossFightManager.getPositionSquare(target); targetSquare.SetColor(Color.red); StartCoroutine(chargeAttack(targetSquare)); }
public void CmdMoveSquares(PositionSquareLocation loc) { if (positionSquare != null) { positionSquare.pawnsOnSquare.Remove(this); } positionSquare = FindObjectOfType <BossFightManager>().getPositionSquare(loc); positionSquare.pawnsOnSquare.Add(this); transform.position = positionSquare.transform.position; RpcUpdatePosition(loc); }
public PositionSquare getPositionSquare(PositionSquareLocation loc) { switch (loc) { case PositionSquareLocation.center: return(centerSquare); case PositionSquareLocation.left: return(leftSquare); case PositionSquareLocation.right: return(rightSquare); } return(null); }
public void RpcUpdatePosition(PositionSquareLocation loc) { positionSquare = FindObjectOfType <BossFightManager>().getPositionSquare(loc); transform.position = positionSquare.transform.position; movedSquaresEvent.Invoke(); }