Esempio n. 1
0
    public void SendCommandToSetUnitPosition(Unit unit, MultiTile targetPosition)
    {
        int endPosX = targetPosition.bottomLeftCorner.position.x;
        int endPosZ = targetPosition.bottomLeftCorner.position.z;

        if (Global.instance.matchType == MatchTypes.Online)
        {
            photonView.RPC("RPCSetUnitPosition", RpcTarget.All, unit.index, endPosX, endPosZ);
        }
        else
        {
            DragableUnit.SetNewPosition(unit.index, endPosX, endPosZ);
        }
    }
Esempio n. 2
0
 void RPCSetUnitPosition(int index, int endPosX, int endPosZ)
 {
     DragableUnit.SetNewPosition(index, endPosX, endPosZ);
 }
Esempio n. 3
0
 void RPCSetUnitPosition(int startPosX, int startPosZ, int endPosX, int endPosZ)
 {
     DragableUnit.SetNewPosition(startPosX, startPosZ, endPosX, endPosZ);
 }