public void InitSkillButton(BaseAvatarInputController controller) { this._controller = controller; if (this._avatarActor != null) { this._avatarActor.onSkillChargeChanged = (Action <string, int, int>)Delegate.Remove(this._avatarActor.onSkillChargeChanged, new Action <string, int, int>(this.OnSkillChargeChanged)); this._avatarActor.onSkillSPNeedChanged = (Action <string, float, float>)Delegate.Remove(this._avatarActor.onSkillSPNeedChanged, new Action <string, float, float>(this.OnSkillSPNeedChanged)); this._avatarActor.onSPChanged = (Action <float, float, float>)Delegate.Remove(this._avatarActor.onSPChanged, new Action <float, float, float>(this.OnSPChanged)); } this._avatar = this._controller.avatar; this._avatarActor = (AvatarActor)Singleton <EventManager> .Instance.GetActor(this._avatar.GetRuntimeID()); this._skillInfo = this._avatarActor.GetSkillInfo(this.SkillName); base.gameObject.SetActive(true); if (this._skillInfo.MaxChargesCount > 0) { this._avatarActor.onSkillChargeChanged = (Action <string, int, int>)Delegate.Combine(this._avatarActor.onSkillChargeChanged, new Action <string, int, int>(this.OnSkillChargeChanged)); } this._avatarActor.onSPChanged = (Action <float, float, float>)Delegate.Combine(this._avatarActor.onSPChanged, new Action <float, float, float>(this.OnSPChanged)); this._avatarActor.onSkillSPNeedChanged = (Action <string, float, float>)Delegate.Combine(this._avatarActor.onSkillSPNeedChanged, new Action <string, float, float>(this.OnSkillSPNeedChanged)); this.RefreshSkillInfo(); }
public void InitJoystick(BaseAvatarInputController controller) { this._controller = controller; base.gameObject.SetActive(true); }