Exemplo n.º 1
0
        public bool GetItemAtLoc(string roomId, int x, int y, BitsyGame.Loc loc)
        {
            BitsyGame.Room room;
            if (this.Rooms.TryGetValue(roomId, out room))
            {
                for (int i = 0; i < room.Items.Count; i++)
                {
                    if (room.Items[i].x == x && room.Items[i].y == y)
                    {
                        loc = room.Items[i];
                        return(true);
                    }
                }
            }

            loc = default(BitsyGame.Loc);
            return(false);
        }
Exemplo n.º 2
0
        public bool GetEndingAtLoc(string roomId, int x, int y, out BitsyGame.Loc loc)
        {
            BitsyGame.Room room;
            if (this.Rooms.TryGetValue(roomId, out room))
            {
                foreach (var e in room.Endings)
                {
                    if (x == e.x && y == e.y)
                    {
                        loc = e;
                        return(true);
                    }
                }
            }

            loc = default(BitsyGame.Loc);
            return(false);
        }