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; } } }
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; } }
void StateChange(bindState newState) { state = newState; }
IEnumerator ChangeStateAfterFrame(bindState state) { yield return(new WaitForEndOfFrame()); StateChange(state); }