コード例 #1
0
 //Custom
 void OnKeyPress(int _key)
 {
     if (_key == 0 ||
         _key >= abilities.GetNumberOfAbilities())
     {
         return;
     }
     abilities.AttemptSpecialAbility(_key);
 }
コード例 #2
0
 void ScanForAbilityKeyDown()
 {
     for (int keyIndex = 0; keyIndex < abilities.GetNumberOfAbilities(); keyIndex++)
     {
         if (Input.GetKeyDown(keyIndex.ToString()) && !abilities.GetRequiresTarget(keyIndex))
         {
             abilities.AttemptSpecialAbility(keyIndex);
         }
     }
 }
コード例 #3
0
        private void ScanForAbilityKeyDown()
        {
            for (int keyIndex = 1; keyIndex < specialAbilities.GetNumberOfAbilities(); keyIndex++)
            {
                if (Input.GetKeyDown(keyIndex.ToString()))
                {
                    specialAbilities.AttemptSpecialAbility(keyIndex);
                }
            }

            // if(Input.GetKeyDown(KeyCode.Alpha1))
            // {
            //     specialAbilities.AttemptSpecialAbility(1);
            // }

            // if(Input.GetKeyDown(KeyCode.Alpha2))
            // {
            //     specialAbilities.AttemptSpecialAbility(2);
            // }

            // if(Input.GetKeyDown(KeyCode.Alpha3))
            // {
            //     specialAbilities.AttemptSpecialAbility(3);
            // }
        }
コード例 #4
0
 private void ScanForAbilityKeyDown()
 {
     for (int keyIndex = 1; keyIndex < specialAbilties.GetNumberOfAbilities(); keyIndex++)
     {
         if (Input.GetKeyDown(keyIndex.ToString()))
         {
             specialAbilties.AttemptSpecialAbility(keyIndex);
         }
     }
 }
コード例 #5
0
ファイル: PlayerControl.cs プロジェクト: Capirott/Dragon-RPG
 private void ScanForAbilityKeyDown()
 {
     for (int i = 1; i < abilities.GetNumberOfAbilities(); ++i)
     {
         if (Input.GetKeyDown(i.ToString()))
         {
             abilities.AttemptSpecialAbility(i, currentEnemy ? currentEnemy.gameObject : null);
         }
     }
 }
コード例 #6
0
 private void ScanForAbilityKeyDown()
 {
     for (int i = 0; i < abilities.GetNumberOfAbilities(); i++)
     {
         if (abilities.abilities[i] && Input.GetKeyDown(abilities.abilities[i].ButtonName))
         {
             abilities.AttemptSpecialAbility(i);
         }
     }
 }
コード例 #7
0
 private void ScanForAbiltyKeyDown()
 {
     for (int keyIndex = 0; keyIndex <= abilities.GetNumberOfAbilities(); keyIndex++)
     {
         if (Input.GetKeyDown(keyIndex.ToString()))
         {
             abilities.UseSpecialAbilty(keyIndex);
         }
     }
 }