コード例 #1
0
 private bool OnSkillButtonClicked(MonoSkillButton.PointerState pointerState)
 {
     if (pointerState == MonoSkillButton.PointerState.PointerUp)
     {
         base.actor.abilityPlugin.HandleActionTargetDispatch(this.config.OnClickedActions, base.instancedAbility, base.instancedModifier, null, null);
     }
     return(!this.config.ConsumeClick);
 }
コード例 #2
0
        private bool SkillButtonStateChangedCallback(MonoSkillButton.PointerState pointerState)
        {
            if (!this._useTriggerTimeControl)
            {
                if (!Singleton <AvatarManager> .Instance.IsLocalAvatar(this._avatar.GetRuntimeID()))
                {
                    return(true);
                }
                BaseMonoAvatar avatarByRuntimeID = Singleton <AvatarManager> .Instance.GetAvatarByRuntimeID(base.actor.runtimeID);

                bool allowHoldLockDirection = this.config.AllowHoldLockDirection;
                if ((avatarByRuntimeID != null) && allowHoldLockDirection)
                {
                    if (pointerState == MonoSkillButton.PointerState.PointerUp)
                    {
                        avatarByRuntimeID.IsLockDirection = false;
                    }
                    else if (pointerState == MonoSkillButton.PointerState.PointerDown)
                    {
                        avatarByRuntimeID.IsLockDirection = true;
                    }
                }
                if (this._state == State.Before)
                {
                    if (pointerState == MonoSkillButton.PointerState.PointerUp)
                    {
                        this._avatar.ResetTrigger(this.config.NextLoopTriggerID);
                        this._avatar.SetTrigger(this.config.AfterSkillTriggerID);
                    }
                    else if (pointerState == MonoSkillButton.PointerState.PointerDown)
                    {
                        if (!this.config.DisallowReleaseButtonInBS)
                        {
                            this._avatar.ResetTrigger(this.config.AfterSkillTriggerID);
                            this._avatar.SetTrigger(this.config.NextLoopTriggerID);
                        }
                        else if (this._checkPointerDownInBS)
                        {
                            this._avatar.ResetTrigger(this.config.AfterSkillTriggerID);
                            this._avatar.SetTrigger(this.config.NextLoopTriggerID);
                            this._checkPointerDownInBS = false;
                        }
                    }
                }
                else if ((this._state == State.InLoop) && (pointerState == MonoSkillButton.PointerState.PointerUp))
                {
                    this._avatar.SetTrigger(this.config.AfterSkillTriggerID);
                }
            }
            return(true);
        }