Exemplo n.º 1
0
        public override void Process(AGE.Action _action, Track _track)
        {
            GameObject obj2 = (Singleton <CBattleSystem> .GetInstance().FightFormScript == null) ? null : Singleton <CBattleSystem> .GetInstance().FightFormScript.gameObject;

            if (obj2 != null)
            {
                GameObject        gameObject = obj2.transform.FindChild("Joystick").gameObject;
                bool              bActive    = !this.bForbid;
                CUIJoystickScript component  = gameObject.GetComponent <CUIJoystickScript>();
                if (component != null)
                {
                    component.ResetAxis();
                }
                gameObject.CustomSetActive(bActive);
                component = gameObject.GetComponent <CUIJoystickScript>();
                if (component != null)
                {
                    component.ResetAxis();
                }
                if ((this.bForbid && (Singleton <CBattleSystem> .GetInstance().FightForm != null)) && (Singleton <CBattleSystem> .GetInstance().FightForm.m_skillButtonManager != null))
                {
                    for (int i = 0; i < 5; i++)
                    {
                        Vector2 screenPosition = new Vector2();
                        Singleton <CBattleSystem> .GetInstance().FightForm.m_skillButtonManager.SkillButtonUp(Singleton <CBattleSystem> .GetInstance().FightFormScript, (SkillSlotType)i, false, screenPosition);
                    }
                }
            }
        }
Exemplo n.º 2
0
        public override void Process(Action _action, Track _track)
        {
            FightForm fightForm = Singleton <CBattleSystem> .GetInstance().FightForm;

            if (fightForm != null)
            {
                GameObject moveJoystick = fightForm.GetMoveJoystick();
                if (moveJoystick == null)
                {
                    return;
                }
                bool bActive = !this.bForbid;
                CUIJoystickScript component = moveJoystick.GetComponent <CUIJoystickScript>();
                if (component)
                {
                    component.ResetAxis();
                }
                moveJoystick.CustomSetActive(bActive);
                component = moveJoystick.GetComponent <CUIJoystickScript>();
                if (component)
                {
                    component.ResetAxis();
                }
                if (this.bForbid && Singleton <CBattleSystem> .GetInstance().FightForm != null && Singleton <CBattleSystem> .GetInstance().FightForm.m_skillButtonManager != null)
                {
                    for (int i = 0; i < 5; i++)
                    {
                        Singleton <CBattleSystem> .GetInstance().FightForm.m_skillButtonManager.SkillButtonUp(Singleton <CBattleSystem> .GetInstance().FightFormScript, (SkillSlotType)i, false, default(Vector2));
                    }
                }
            }
        }