コード例 #1
0
ファイル: Room.cs プロジェクト: Sixstring982/wolfsim
 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
ファイル: Room.cs プロジェクト: Sixstring982/wolfsim
        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
ファイル: Room.cs プロジェクト: Sixstring982/wolfsim
 public RoomExit(float x, float y, Direction d)
 {
     this.location = new VecDir(new Vector2(x, y), d);
 }
コード例 #5
0
ファイル: Room.cs プロジェクト: Sixstring982/wolfsim
 public RoomExit(VecDir location)
 {
     this.location = location;
     this.next     = null;
 }