예제 #1
0
 //player 2
 void updateP2()
 {
     if (!player_2_AI_Mode)
     {
         if (Input.GetKeyDown(KeyCode.Keypad1))
         {
             p2script.useSkill(p2script.getSkillA());
         }
         if (Input.GetKeyDown(KeyCode.Keypad2))
         {
             p2script.useSkill(p2script.getSkillB());
         }
         if (Input.GetKeyDown(KeyCode.Keypad3))
         {
             p2script.useSkill(p2script.getSkillC());
         }
         //send vertical movement value to the paddlescript
         p2script.setVMove(Input.GetAxis("P2 Vertical"));
     }
     else
     {
         p2AI.updateAI();
     }
 }
예제 #2
0
 //player 1
 void updateP1()
 {
     if (!player_1_AI_Mode)
     {
         if (Input.GetKeyDown(KeyCode.G))
         {
             p1script.useSkill(p1script.getSkillA());
         }
         if (Input.GetKeyDown(KeyCode.H))
         {
             p1script.useSkill(p1script.getSkillB());
         }
         if (Input.GetKeyDown(KeyCode.J))
         {
             p1script.useSkill(p1script.getSkillC());
         }
         //send vertical movement value to the paddlescript
         p1script.setVMove(Input.GetAxis("P1 Vertical"));
     }
     else
     {
         p1AI.updateAI();
     }
 }