Ejemplo n.º 1
0
 void Update()
 {
     if (MayUse)
     {
         if (Input.GetKeyDown(KeyCode.R))
         {
             if (!Player.ActiveSkills[0])
             {
                 if (Player.coin >= price[0])
                 {
                     Player.ActiveSkills[0] = true;
                     Player.coin           -= price[0];
                     UpdateData();
                     Player.Buysome();
                 }
             }
             else if (!Player.ActiveSkills[1])
             {
                 if (Player.coin >= price[1])
                 {
                     Player.ActiveSkills[1] = true;
                     Player.coin           -= price[1];
                     UpdateData();
                     Player.Buysome();
                 }
             }
         }
     }
 }