Exemplo n.º 1
0
        public override void Update(CoronaKitty.Application app)
        {
            m_interactionFlag = m_interactionManager.Update();

            if (m_interactionFlag != 0)
            {
                return;
            }

            switch (m_interactionManager.m_action.Item1)
            {
            case Interaction.Interaction.GO:

                if (World.Navigation.cardinalAngles.ContainsKey(m_interactionManager.m_action.Item2.ToUpper()))
                {
                    move(m_interactionManager.m_action.Item2.ToUpper(), app);
                }
                else
                {
                    Console.WriteLine(m_interactionManager.m_action.Item2);
                }
                break;

            default:

                UI.TextOutput.Put("INVALID ACTION TYPE", ConsoleColor.Red, UI.TextOutput.CONSOLEBG);
                break;
            }
        }
Exemplo n.º 2
0
 private void move(string direction, CoronaKitty.Application app)
 {
     if (m_currentRoom.m_adjacentRooms.ContainsKey(direction) && !m_currentRoom.m_adjacentRooms[direction].Item2.Locked())
     {
         EnterRoom(m_currentRoom.m_adjacentRooms[direction.ToUpper()].Item1);
     }
     else
     {
         if (m_currentRoom.m_adjacentRooms.ContainsKey(direction))
         {
             UI.TextOutput.Put("You try to move forward but the door seems to be locked", ConsoleColor.Red, UI.TextOutput.CONSOLEBG);
         }
         else
         {
             UI.TextOutput.Put("Ummmm... there's not really anything in that direction", ConsoleColor.Red, UI.TextOutput.CONSOLEBG);
         }
     }
 }
Exemplo n.º 3
0
 public virtual void Update(CoronaKitty.Application app)
 {
 }