public void InitTask(CombatUnitType unitType, int unitAmount, OnProduceUnitComplete completeCallBack = null, OnTimeLeftToComplete timeLeftCallBack = null, int duration = 1) { base.InitTask(duration, timeLeftCallBack); _producingUnitType = unitType; _producingUnitAmount = unitAmount; Evt_OnProduceUnitComplete += completeCallBack; }
public static ProduceUnitTask CreateTask(CombatUnitType unitType, int unitAmount, OnProduceUnitComplete completeCallBack = null, OnTimeLeftToComplete timeLeftCallBack = null, int duration = 1) { ProduceUnitTask task = new ProduceUnitTask(); task.InitTask(unitType, unitAmount, completeCallBack, timeLeftCallBack, duration); return(task); }