Пример #1
0
 public void StopAction()
 {
     //print("Action stopped");
     //_isAttacking = false;
     _isMoveAttack = false;
     target = null;
     _attackStance = false;
     onTheMove = false;
     _unitMoveScript.StopAction();
     _attackDestination = Vector3.zero;
 }
Пример #2
0
 public void StopAction()
 {
     objectToTake = null;
     onTheMove    = false;
     moveScript.StopAction();
     targetPosition = Vector3.zero;
     objectToDrop   = null;
 }
Пример #3
0
    public void Buildingbuilding()
    {
        Destroy(_buildingGhost);

        if (GetComponent <RTSGameObject>().faction.Equals(Faction.Red))
        {
            gameMaster.RedWool -= _building.GetComponent <CreationBuilding>().Cost;
        }
        else if (GetComponent <RTSGameObject>().faction.Equals(Faction.Blue))
        {
            gameMaster.BlueWool -= _building.GetComponent <CreationBuilding>().Cost;
        }

        gameMaster.addUnit(_building, _positionToBuild, _building.transform.rotation, GetComponent <RTSGameObject>().faction);
        //_constructionDone = true;
        startbuilding = false;
        transform.Translate(Vector3.right * 15);

        _unitMoveScript.StopAction();
    }