示例#1
0
    void StateChange(bindState newState)
    {
        state = newState;

        if (gameObject.activeSelf)
        {
            switch (newState)
            {
            case bindState.none:
                if (fadeCircle != null)
                {
                    StopCoroutine(fadeCircle);
                }
                fadeCircle = StartCoroutine(FadeCircle(false));
                break;

            case bindState.hold:
                if (fadeCircle != null)
                {
                    StopCoroutine(fadeCircle);
                }
                fadeCircle = StartCoroutine(FadeCircle(true));
                break;
            }
        }
    }
示例#2
0
    private void Update()
    {
        _move  = t_move.InputVector;
        _aim   = t_aimShoot.InputVector;
        _shoot = t_aimShoot.InputVector.magnitude > shootThreshold;
        _fire  = t_fire.state;
        _skill = t_skill.state;

        screenHeight = Screen.height;
        screenWidth  = Screen.width;
        screenRatio  = screenWidth / screenHeight;
    }
    void StateChange(bindState newState)
    {
        state = newState;

        switch (newState)
        {
        case bindState.down:
            Pad.position = startPoint;
            break;

        case bindState.up:
            Pad.position = new Vector2(0, -1000);
            break;

        case bindState.none:
            Pad.position = new Vector2(0, -1000);
            break;
        }
    }
示例#4
0
 void StateChange(bindState newState)
 {
     state = newState;
 }
示例#5
0
    IEnumerator ChangeStateAfterFrame(bindState state)
    {
        yield return(new WaitForEndOfFrame());

        StateChange(state);
    }