コード例 #1
0
 //
 // USE METHODS
 //
 public void Eat(Player User, Room room, Item item, ContainerItem containerItem, frmGame mainForm)
 {
     if (!room.RemoveItem(room, item))
     {
         DropFromContainer(item, containerItem);
     }
     mainForm.PlayerThinking("Yummy.");
 }
コード例 #2
0
 public void Fill(Player User, Room room, Item item, ContainerItem containerItem, frmGame mainForm)
 {
     if (room.Name != "Room 2")
     {
         mainForm.PlayerThinking("No faucet available in this room");
     }
     else
     {
         item.ItemSlot.SlottedItem = item.TransformsTo;
     }
 }
コード例 #3
0
        public void DropFromInventory(Player user, Room room, Item item, frmGame mainForm)
        {
            bool isAdded = room.AddItem(room, item);

            if (isAdded)
            {
                user.RemoveItem(user, item);
            }
            else
            {
                mainForm.PlayerThinking("There is no more space in this room");
            }
        }
コード例 #4
0
 public void PutOutFire(Player User, Room room, Item item, ContainerItem containerItem, frmGame mainForm)
 {
     if (User.HasBriefcase)
     {
         ucItemOpen itemOpenControl = new ucItemOpen(User, User.Briefcase, room, mainForm, item);
         mainForm.Controls.Add(itemOpenControl);
         itemOpenControl.Show();
         itemOpenControl.BringToFront();
     }
     else
     {
         mainForm.PlayerThinking("I dont have anything to use on this");
     }
 }
コード例 #5
0
 public void CheckTime(Player User, Room room, Item item, ContainerItem containerItem, frmGame mainForm)
 {
     mainForm.PlayerThinking("Time is " + DateTime.Now.Hour.ToString() + ":" + DateTime.Now.Minute.ToString());
 }