コード例 #1
0
 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();
 }
コード例 #2
0
        public void Update()
        {
            if (!this.Resources.Equals(this.previousResources))
            {
                UpdateScale();
                UpdateBranches();
                UpdateLeaves();
                UpdateFeatures();
            }

            this.previousResources = this.Resources;
        }