Exemplo n.º 1
0
 public GameObject ProtectorPanel;                                         //Panel must be enabled if a structure is dragging. Avoid clicking buttons while dragging structure
 private void Start()
 {
     CooldownImage = CooldownPanel.GetComponent <Image>();
     AStar         = GameObject.FindGameObjectWithTag("AStar");
     astarPath     = AStar.GetComponent <AstarPath>();
     SelectSoldier = GetComponent <SelectSoldier>();
 }
Exemplo n.º 2
0
    public GameObject SelectedSprite;//(Yellow)Selected image, indicating that the soldier is selected

    void Start()
    {
        //SoldierMoving = true;
        aIPath               = GetComponent <AIPath>();
        aIDestination        = GetComponent <AIDestinationSetter>();
        aIDestination.target = soldierSpawnPointTransform;
        GameController       = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameController>();
        SelectSoldier        = GameObject.FindGameObjectWithTag("GameController").GetComponent <SelectSoldier>();
        SetClickPositionAndAnchor();//Set click position and moving anchor for this soldier when it spawns
    }