Пример #1
0
 void desidePlayerMove() //wait for playr Move
 {
     if (Input.GetKeyDown(KeyCode.RightArrow))
     {
         //move
         if (actualStage + 1 < nextStageWithEnemy)
         {
             move();
         }
         else
         {
             if (actualStage + 1 == lastStage)
             {
                 uIControler.activeWinPanel();
                 uIControler.time = time;
                 isLevelEnded     = true;
                 uIControler.activeStar(1);
                 // first star for end level
                 if (hp == startHp)
                 {
                     uIControler.activeStar(2);
                     //secend Star for didnt lose hp
                 }
             }
             else
             {
                 thisTurnPlayerTakeDamge = true;
             }
         }
         movedThisTurn = true;
     }
     else if (Input.GetKeyDown(KeyCode.Space))
     {
         //dodge
         playerIsDodging = true;
         movedThisTurn   = true;
     }
     else if (Input.GetKeyDown(KeyCode.X))
     {
         //attack
         if (actualStage + 1 == nextStageWithEnemy)
         {
             thisTurnEnemyTakeDamage = true;
         }
         movedThisTurn = true;
     }
 }