public void AddEconomic(int id, EconomicSystem eco) { if (!Economics.ContainsKey(id)) { Economics.Add(id, eco); } }
public bool PushTax(int id, int num) { EconomicSystem es = GetEconomic(id); if (es != null) { return(es.PushTax(num)); } return(false); }
public void SwitchCurEconomicSys(EconomicSystem econo) { if (econo == null) { return; } //if (EconomicManager.Instance.CurEconomicSysSelect != econo) { EconomicManager.Instance.CurEconomicSysSelect = econo; OnMoneyChange(EconomicManager.Instance.CurEconomicSysSelect.TotalMoney); EconomicManager.Instance.CurEconomicSysSelect.OnMoneyChange += OnMoneyChange; } }
// Start is called before the first frame update //void Start() //{ // Initialize(); //} public void Initialize() { GangManager.Instance.AddGang(this); Economic = new EconomicSystem(); ID = IDAllocator.Instance.GetID(); TheArmy = new Army(); TheArmy.TheColor = TheColor; TheArmy.SoldierCfgIDs = SoldierCfgIDs; TheArmy.TentsVolumes = TentsVolumes; TheArmy.GangID = ID; TheArmy.Location = Location; TheArmy.Initialize(); }