Ejemplo n.º 1
0
 public override void Duplicate(EditorControl editorControl, string suffix)
 {
     Dungeon duplicate = new Dungeon(dungeon);
     duplicate.Name += suffix;
     editorControl.World.AddDungeon(dungeon);
     editorControl.RefreshWorldTreeView();
 }
Ejemplo n.º 2
0
 //-----------------------------------------------------------------------------
 // Constructor
 //-----------------------------------------------------------------------------
 public DungeonTreeNode(Dungeon dungeon)
 {
     this.dungeon = dungeon;
     ImageIndex			= 6;
     SelectedImageIndex	= 6;
     Text				= dungeon.ID;
     Name				= "script";
 }
Ejemplo n.º 3
0
        private int viewFloorIndex; // Which floor wer are currently viewing.

        #endregion Fields

        #region Constructors

        //-----------------------------------------------------------------------------
        // Constructors
        //-----------------------------------------------------------------------------
        public ScreenDungeonMap(GameManager gameManager)
        {
            this.gameManager		= gameManager;
            this.backgroundImage	= Resources.GetImage("screen_dungeon_map");
            this.dungeon			= null;
            this.floors				= new List<DungeonMapFloor>();
            this.discoveredFloors	= new List<DungeonMapFloor>();
        }
Ejemplo n.º 4
0
 public void RemoveDungeon(Dungeon dungeon)
 {
     dungeons.Remove(dungeon.ID);
 }
Ejemplo n.º 5
0
 public void AddDungeon(Dungeon dungeon)
 {
     dungeons.Add(dungeon.ID, dungeon);
     dungeon.World = this;
 }
Ejemplo n.º 6
0
 public void RemoveDungeon(Dungeon dungeon)
 {
     dungeons.Remove(dungeon.ID);
 }
Ejemplo n.º 7
0
 public void AddDungeon(Dungeon dungeon)
 {
     dungeons.Add(dungeon.ID, dungeon);
     dungeon.World = this;
 }
Ejemplo n.º 8
0
 private void WriteDungeon(BinaryWriter writer, Dungeon dungeon)
 {
     WriteProperties(writer, dungeon.Properties);
 }
Ejemplo n.º 9
0
 public Dungeon(Dungeon copy) :
     this()
 {
     properties.SetAll(copy.properties);
 }
Ejemplo n.º 10
0
        //-----------------------------------------------------------------------------
        // Overridden methods
        //-----------------------------------------------------------------------------
        public void OnOpen()
        {
            Room playerRoom = GameControl.LastRoomOnMap;

            dungeon				= playerRoom.Dungeon;
            playerRoomLocation	= playerRoom.Location;
            playerFloorNumber	= 0;
            viewFloorIndex		= 0;
            floorViewSpeed		= 8;
            isChangingFloors	= false;
            cursorTimer			= 0;
            viewFloor			= null;

            // Add the dungeon floors.
            DungeonFloor[] levelFloors = dungeon.GetFloors();
            lowestFloorNumber	= levelFloors[0].FloorNumber;
            highestFloorNumber	= levelFloors[levelFloors.Length - 1].FloorNumber;
            floors.Clear();
            discoveredFloors.Clear();

            for (int i = 0; i < levelFloors.Length; i++) {
                DungeonMapFloor floor = new DungeonMapFloor(levelFloors[i]);
                floors.Add(floor);

                if (floor.DungeonFloor.Level == playerRoom.Level) {
                    playerFloorNumber	= floor.FloorNumber;
                    viewFloor			= floor;
                    viewFloorIndex		= discoveredFloors.Count;
                }
                if (floor.IsDiscovered || dungeon.HasMap)
                    discoveredFloors.Add(floor);
            }

            floorViewPosition = viewFloorIndex * 80;
        }
Ejemplo n.º 11
0
 public Dungeon(Dungeon copy)
     : this()
 {
     properties.SetAll(copy.properties);
 }