예제 #1
0
 private void BuildSpawner(UnitComponent type)
 {
     inputDisabled = true;
     GetComponentInParent <Building>().Build(type);
     foreach (Unit unit in unitHolder.hashUnits)
     {
         if (!unit.TryGetComponent(out Warrior warrior))
         {
             unitHolder.RemoveUnit(unit);
             unit.gameObject.SetActive(false);
             break;
         }
     }
 }
예제 #2
0
    public Coroutine RemoveUnit(int laneIndex, int sideIndex, int positionIndex)
    {
        UnitHolder holder = unitManagers[sideIndex].unitHolders[laneIndex, positionIndex];

        return(holder.RemoveUnit());
    }