コード例 #1
0
 void Action(String itemName)
 {
     if (itemName == "Apple")
     {
         vitals.addHunger(appleValue);
     }
     else if (itemName == "HP Pack")
     {
         if (!vitals.addHP(hpValue))
         {
             DenyAction(itemName);
         }
     }
     else if (itemName == "Boat")
     {
         Instantiate(r.spawnStuff.GetGO("BoatBottom"), player.transform.position + new Vector3(1, 0, 0), new Quaternion(0, 0, 0, 0));
     }
 }