Esempio n. 1
0
    bool HandleBasicSkillEvent()
    {
        SKILL         _basicSkill   = this.GetComponent <InfoControl>().basicSkill;
        SkillJoystick skillJoystick = baseSkillUI.GetComponent <SkillJoystick>();

        if (_basicSkill.cd_time_left > 0)
        {
        }
        else
        {
            if (skillJoystick.isPressed())//在UI上接收点击信息 实时获取方向/位置信息
            {
                Debug.Log("Input.GetKey");
                skillJoystick.waspressed = true;
                HandleGetKeyEvent(_basicSkill);
                return(true);
            }
            else if (skillJoystick.waspressed)//如果用户现在没按下但是曾经按下,表示放开了按键
            {
                Debug.Log("Input.GetKeyUp");
                HandleGetKeyUpEvent(_basicSkill);
                skillJoystick.waspressed = false;
                return(true);
            }
        }
        return(false);
    }
Esempio n. 2
0
    // Use this for initialization
    void Start()
    {
        joystick = GetComponent <SkillJoystick>();
        // areaType = SkillAreaType.OuterCircle_InnerCircle;
        joystick.onJoystickDownEvent += OnJoystickDownEvent;
        joystick.onJoystickMoveEvent += OnJoystickMoveEvent;
        joystick.onJoystickUpEvent   += OnJoystickUpEvent;

        InitSkillAreaType();
    }
Esempio n. 3
0
    // Use this for initialization
    public virtual void Start()
    {
        joystick = GetComponent <SkillJoystick>();

        joystick.onJoystickDownEvent += OnJoystickDownEvent;
        joystick.onJoystickMoveEvent += OnJoystickMoveEvent;
        joystick.onJoystickUpEvent   += OnJoystickUpEvent;

        InitSkillAreaType();
    }
Esempio n. 4
0
    // Use this for initialization
    void Start()
    {
        //Caster = GlobalInfo.current.localPlayer;

        joystick = GetComponent <SkillJoystick>();

        joystick.onJoystickDownEvent += OnJoystickDownEvent;
        joystick.onJoystickMoveEvent += OnJoystickMoveEvent;
        joystick.onJoystickUpEvent   += OnJoystickUpEvent;

        InitSkillAreaType();
    }
Esempio n. 5
0
 void Start()
 {
     highlightPosCube.SetActive(false);
     moveJoystick      = GameObject.FindGameObjectWithTag("UIMove").GetComponent <MoveJoystick>();
     baseSkillUI       = GameObject.FindGameObjectWithTag("UIBaseSkill");
     skill1UI          = GameObject.FindGameObjectWithTag("UISkill1");
     skill2UI          = GameObject.FindGameObjectWithTag("UISkill2");
     skill3UI          = GameObject.FindGameObjectWithTag("UISkill3");
     skill4UI          = GameObject.FindGameObjectWithTag("UISkill4");
     baseSkillJoystick = GameObject.FindGameObjectWithTag("UIBaseSkill").GetComponent <SkillJoystick>();
     LoadUIResources();
 }
Esempio n. 6
0
    // Use this for initialization
    void Start()
    {
        joystick = GetComponent <SkillJoystick>();

        joystick.onJoystickDownEvent += OnJoystickDownEvent;
        joystick.onJoystickMoveEvent += OnJoystickMoveEvent;
        joystick.onJoystickUpEvent   += OnJoystickUpEvent;

        InitSkillAreaType();

        _elementNames = new List <SKillAreaElement>();
        _elementNames.Add(SKillAreaElement.OuterCircle);
        _elementNames.Add(SKillAreaElement.InnerCircle);
        _elementNames.Add(SKillAreaElement.Cube);
        _elementNames.Add(SKillAreaElement.Sector60);
        _elementNames.Add(SKillAreaElement.Sector120);
        _inCreate = false;
    }
Esempio n. 7
0
    bool HandlePageSkillEvent(SKILL _skill, GameObject _skillUI)
    {
        SkillJoystick skillJoystick = _skillUI.GetComponent <SkillJoystick>();

        if (skillJoystick.isPressed())//在UI上接收点击信息 实时获取方向/位置信息
        {
            Debug.Log("Input.GetKey");
            skillJoystick.waspressed = true;
            HandleGetKeyEvent(_skill);
            return(true);
        }
        else if (skillJoystick.waspressed)//如果用户现在没按下但是曾经按下,表示放开了按键
        {
            Debug.Log("Input.GetKeyUp");
            HandleGetKeyUpEvent(_skill);
            skillJoystick.waspressed = false;
            return(true);
        }
        return(false);
    }