コード例 #1
0
ファイル: SupplyZone.cs プロジェクト: wata0611/ZOMBIE_SLAYER
 void OnTriggerStay(Collider collider)
 {
     if (collider.gameObject.tag == "Player")
     {
         discriptionText.enabled = true;
         discriptionText.text    = "C:Repair Warehouse(" + player.GetRepairScore().ToString() + ")\n"
                                   + "V:Supply Magzine(" + player.GetSupplyScore().ToString() + ")\n"
                                   + "X:Unlocked Weapon Level(" + player.GetUnlockedScore() + ")\n"
                                   + "Z:Heel Player(" + player.GetHeelScore().ToString() + ")";
         if (Input.GetKey(KeyCode.C) && warehouse.WarehouseHP < warehouse.GetmaxWarehouseHP() && player.GetRepairScore() <= gameManager.Score)
         {
             StartCoroutine(player.RepairTimer());
         }
         if (supplyEnabled)
         {
             if (Input.GetKeyDown(KeyCode.V) && player.GetSupplyScore() <= gameManager.Score)
             {
                 StartCoroutine(player.SupplyTimer());
             }
             if (Input.GetKeyDown(KeyCode.X))
             {
                 StartCoroutine(player.UnlockedTimer());
             }
             if (Input.GetKey(KeyCode.Z) && player.PlayerHP < player.GetmaxPlayerHP() && player.GetHeelScore() <= gameManager.Score)
             {
                 StartCoroutine(player.HeelTimer());
             }
         }
     }
 }