Ejemplo n.º 1
0
        public override void OnStart()
        {
            this._skillButton = Singleton <MainUIManager> .Instance.GetInLevelUICanvas().mainPageContext.GetSkillButtonBySkillID(this.SkillButtonID);

            this._skillButton.OnPointerDown(null);
            this._timer = this.HoldTime;
        }
        public override void OnAdded()
        {
            this._avatar.onCurrentSkillIDChanged = (Action <string, string>)Delegate.Combine(this._avatar.onCurrentSkillIDChanged, new Action <string, string>(this.WithTransientSkillIDChangedCallback));
            this._state = State.Idle;
            this._switchTimer.Reset(false);
            this._loopIx = 0;
            this._chargeEffectPatternIx = -1;
            this._skillButton           = Singleton <MainUIManager> .Instance.GetInLevelUICanvas().mainPageContext.GetSkillButtonBySkillID(this.config.SkillButtonID);

            this._skillButton.onPointerStateChange = (Func <MonoSkillButton.PointerState, bool>)Delegate.Combine(this._skillButton.onPointerStateChange, new Func <MonoSkillButton.PointerState, bool>(this.SkillButtonStateChangedCallback));
            if (this._avatar.IsAIActive() && !string.IsNullOrEmpty(this.config.ChargeTimeRatioAIKey))
            {
                (this._avatar.GetActiveAIController() as BTreeAvatarAIController).SetBehaviorVariable(this.config.ChargeTimeRatioAIKey, this._chargeTimeRatio);
            }
            if ((this.config.ChargeLoopEffects != null) && (this.config.ChargeSwitchEffects != null))
            {
            }
            Singleton <EventManager> .Instance.RegisterEventListener <EvtLocalAvatarChanged>(base.actor.runtimeID);
        }
Ejemplo n.º 3
0
        public override void OnAdded()
        {
            this._skillButton = Singleton <MainUIManager> .Instance.GetInLevelUICanvas().mainPageContext.GetSkillButtonBySkillID(this.config.SkillButtonID);

            this._skillButton.onPointerStateChange = (Func <MonoSkillButton.PointerState, bool>)Delegate.Combine(this._skillButton.onPointerStateChange, new Func <MonoSkillButton.PointerState, bool>(this.OnSkillButtonClicked));
        }