Beispiel #1
0
 protected override void PostInit()
 {
     base.PostInit();
     base.onCurrentSkillIDChanged = (Action <string, string>)Delegate.Combine(base.onCurrentSkillIDChanged, new Action <string, string>(this.ScaleColliderBySkillID));
     this._state      = ResizeState.Idle;
     this._origCenter = this.boxCollider.center;
     this._origSize   = this.boxCollider.size;
     this._curEntry   = null;
 }
Beispiel #2
0
        private void ScaleColliderBySkillID(string from, string to)
        {
            ResizeColliderEntry entry = this.ScaleBySkillIDsContains(to);

            if (entry != null)
            {
                this._curEntry = entry;
                this._state    = ResizeState.InStateWaiting;
            }
            else if (this._state == ResizeState.InStateResized)
            {
                this.boxCollider.size   = this._origSize;
                this.boxCollider.center = this._origCenter;
                this._curEntry          = null;
                this._state             = ResizeState.Idle;
            }
            else if (this._state == ResizeState.InStateWaiting)
            {
                this._curEntry = null;
                this._state    = ResizeState.Idle;
            }
        }