public void SpawnUnit(DataUnit data) { if (dataPlayer) { coundowns[data] = data.stats.spawnCountdown; dataPlayer.mana.Value -= data.stats.manaCost; ManagerUnits.Spawn(data, dataPlayer.side); Think(); } }
private void OnUnitButton(UICallBack callBack) { var dataUnit = callBack.data as DataUnit; if (dataUnit) { dataPlayer.mana.Value -= dataUnit.stats.manaCost; ManagerUnits.Spawn(dataUnit, dataPlayer.side); } }