public override void EvolveStatsCurrentBuilding(int level) { int i_newRessourceTank = (int)this.GetType().GetField("I_ressourceTankV" + level).GetValue(this); GO_ressourcesManager.GetComponent <RessourcesManager>().AddLimitStock(i_newRessourceTank - I_ressourceTank); I_ressourceTank = i_newRessourceTank; I_maxLife = (int)this.GetType().GetField("I_maxLifeL" + level).GetValue(this); I_regenPoint = (int)this.GetType().GetField("I_regenPointL" + level).GetValue(this); }
public new void OnDestroy() { GO_ressourcesManager.GetComponent <RessourcesManager>().AddLimitStock(-I_ressourceTank); base.OnDestroy(); }
// Start is called before the first frame update new void Start() { base.Start(); ActualBuildingType = TypeEnvironement.RessourceTank; GO_ressourcesManager.GetComponent <RessourcesManager>().AddLimitStock(I_ressourceTank); }
public void AddRessourcesToStock_TimePassed(EventArgs e) { GO_ressourcesManager.GetComponent <RessourcesManager>().AddToStock(I_ressource); }