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; }
protected abstract void TrainUnit(UnitTrainType unitType);
protected override void TrainUnit(UnitTrainType unitType) { }