private void OnDestroy() { this.inDestroy = true; if (this._user != null) { this.Eject(); } this.canCheck = false; this.canUpdate = false; this.canUse = false; this.wantDeclines = false; this.use = null; this.useUpdate = null; this.useCheck = null; this.useDecline = null; }
private void Refresh() { this.implementation = this._implementation; this._implementation = null; this.use = this.implementation as IUseable; this.canUse = this.use != null; if (this.canUse) { base.enabled = false; this.useDecline = null; this.useCheck = null; this.updateFlags = UseUpdateFlags.None; IUseableAwake implementation = this.implementation as IUseableAwake; if (implementation != null) { implementation.OnUseableAwake(this); } } else { Debug.LogWarning("implementation is null or does not implement IUseable", this); } }