Esempio n. 1
0
 void Initialize()
 {
     playerPoints = 0;
     isLose       = false;
     SpiralMoving.InitSpiralMoving();
     startTime   = 0;
     playerCombo = 0;
     arenaRadius = 2.45f;
 }
Esempio n. 2
0
 void CheckPressDown()
 {
     if (Input.GetButtonDown("Fire1"))
     {
         if (SpiralMoving.IsSpiralStartAllowed())
         {
             PlayerBehaviour.spiralStartTime = GAME_TIME;
         }
     }
 }
Esempio n. 3
0
 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;
 }