Example #1
0
    protected override void TrainUnit(UnitTrainType unitType)
    {
        GameObject newUnit = null;
        switch(unitType)
        {
            case UnitTrainType.Infantry:
                {
                    newUnit = Instantiate(Infantry, transform.position - (transform.right * -5), transform.rotation) as GameObject;
                }
                break;

        }
        var commandable = newUnit.GetComponent<Commandable>();
        commandable.Faction = faction;
    }
Example #2
0
 protected abstract void TrainUnit(UnitTrainType unitType);
Example #3
0
 protected override void TrainUnit(UnitTrainType unitType)
 {
 }