Ejemplo n.º 1
0
 public void setTarget(Unit target, bool isAIReveal = false)
 {
     if (doingAIReveal && !isAIReveal)
     {
         return;
     }
     targetUnit      = GameObjectManager.instance.findUnitGO(target);
     usingTargetTile = false;
     freeControl     = false;
 }
Ejemplo n.º 2
0
 public void setTarget(TilePos target, bool isAIReveal = false)
 {
     if (doingAIReveal && !isAIReveal)
     {
         return;
     }
     targetUnit      = null;
     usingTargetTile = true;
     targetTile      = new TilePos(target);
     freeControl     = false;
 }
Ejemplo n.º 3
0
    public UnitGO getUnitGO()
    {
        //check if we have any inactive in the list
        for (int i = 0; i < units.Count; i++)
        {
            if (units [i].IsActive == false)
            {
                return(units [i]);
            }
        }

        //otherwise make one
        GameObject obj = Instantiate(unitPrefab) as GameObject;
        UnitGO     GO  = obj.GetComponent <UnitGO> ();

        units.Add(GO);
        return(GO);
    }