void Initialize() { playerPoints = 0; isLose = false; SpiralMoving.InitSpiralMoving(); startTime = 0; playerCombo = 0; arenaRadius = 2.45f; }
void CheckPressDown() { if (Input.GetButtonDown("Fire1")) { if (SpiralMoving.IsSpiralStartAllowed()) { PlayerBehaviour.spiralStartTime = GAME_TIME; } } }
void CheckLongPress() { if (Input.GetButton("Fire1") && IsValidInput()) { acumTime += Time.deltaTime; if (acumTime >= HOLD_TIME) { if (SpiralMoving.isSpiralStartAllowed) { if (!SpiralMoving.isSpiral) { if (SpiralMoving.IsSpiralStartAllowed()) { SpiralMoving.isSpiral = SpiralMoving.IsSpiralAllowed(); } } else { SpiralMoving.isSpiral = SpiralMoving.IsSpiralAllowed(); } } return; } } else if (Input.GetButtonUp("Fire1") && IsValidInput()) { if (acumTime < HOLD_TIME) { if (!SpiralMoving.IsPlayerOnSpiral()) { playerBehavior.ChangePlayerDirection(); } } acumTime = 0; } if (SpiralMoving.isSpiral) { PlayerBehaviour.spiralFinishTime = GAME_TIME; } SpiralMoving.isSpiral = false; }