void Update() { if (motionController.CurrentMotionState == MotionState.Dead) { return; } if (health <= 0) { motionController.DeadTrigger(); return; } Transform player = sensorController.GetNearByPlayer(); if (player == null) { return; } if (SpinKickAble(player, motionController.CurrentMotionState)) { if (CrossPlatformInputManager.GetButton("J")) { PlayerMotionController pmc = player.GetComponent <PlayerMotionController>(); pmc.SpinKickTrigger(); } } }
void Update() { if (GameManager.Instance.CurrentGameState != GameManager.GameState.Play) { return; } if (motionController.CurrentMotionState == MotionState.Dead) { resurgenceCount += Time.deltaTime; if (resurgenceCount >= resurgenceTime) { motionController.Resurgence(); health = 200; resurgenceCount = 0; } return; } if (health <= 0) { motionController.DeadTrigger(); return; } Transform player = sensorController.GetNearByPlayer(); if (player == null) { return; } if (SpinKickAble(player, motionController.CurrentMotionState)) { if (CrossPlatformInputManager.GetButton("J")) { PlayerMotionController pmc = player.GetComponent <PlayerMotionController>(); pmc.SpinKickTrigger(); } } }