示例#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));
         }
     }
 }
示例#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;
                }
            }
        }
示例#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();
        }
示例#4
0
 public RoomExit(float x, float y, Direction d)
 {
     this.location = new VecDir(new Vector2(x, y), d);
 }
示例#5
0
 public RoomExit(VecDir location)
 {
     this.location = location;
     this.next     = null;
 }