public void Awake() { this.baseRenderer = this.Base.GetComponent <SpriteRenderer>(); this.leavesRenderer = this.Leaves.GetComponent <SpriteRenderer>(); this.featureRenderer = this.Feature.GetComponent <SpriteRenderer>(); this.previousResources = this.Resources; UpdateScale(); UpdateLeaves(); UpdateFeatures(); }
public void Update() { if (!this.Resources.Equals(this.previousResources)) { UpdateScale(); UpdateBranches(); UpdateLeaves(); UpdateFeatures(); } this.previousResources = this.Resources; }