Example #1
0
 public void SetPlayerFromRoom(Room r)
 {
     for (int i = 0; i < exitPoints.Count; i++)
     {
         if (r == exitPoints[i].next)
         {
             SetPlayerPosition(Util.MoveDirection(exitPoints[i].location.vec, VecDir.OppositeDir(exitPoints[i].location.dir), 50));
         }
     }
 }
Example #2
0
        protected void AddParent(Room parent, Direction d)
        {
            int[] iota = Util.ShuffledIota(exitPoints.Count);
            d = VecDir.OppositeDir(d);

            for (int i = 0; i < iota.Length; i++)
            {
                if (exitPoints[i].location.dir == d)
                {
                    exitPoints[i].next = parent;
                }
            }
        }
Example #3
0
        public void ChangeRoom(Vector2 location)
        {
            if (changeTicks == 0)
            {
                RoomExit re = currentRoom.NearestExit(location);
                changeDir  = VecDir.OppositeDir(re.location.dir);
                changeRoom = re.next;
                changeTicks++;
                StartStatusRender(re.next.name);
            }

            changeRoom.ArmEntities();
        }
Example #4
0
 public RoomExit(float x, float y, Direction d)
 {
     this.location = new VecDir(new Vector2(x, y), d);
 }
Example #5
0
 public RoomExit(VecDir location)
 {
     this.location = location;
     this.next     = null;
 }