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