Exemplo n.º 1
0
        public static void ResetWorld()
        {
            ConsoleTrack.possibleTabs = "Example: `reset world`";
            ConsoleTrack.helpText     = "Reset the entire world, losing any progress made.";

            if (ConsoleTrack.activate)
            {
                WorldScene      scene    = (WorldScene)Systems.scene;
                CampaignState   campaign = scene.campaign;
                StartNodeFormat start    = scene.worldData.start;

                // Adjust Campaign Level Status
                campaign.levelStatus = new Dictionary <byte, Dictionary <string, CampaignLevelStatus> >();

                // Reload Campaign State
                campaign.SetWorld(campaign.worldId);
                campaign.SetZone(campaign.zoneId);
                campaign.SetPosition(campaign.curX, campaign.curY, campaign.lastDir);
                campaign.SetLives(campaign.lives);
                campaign.SetWounds(campaign.health, campaign.armor);
                campaign.SetHead(campaign.head);
                campaign.SetUpgrades(campaign.suit, campaign.hat, campaign.shoes, campaign.powerAtt, campaign.powerMob, campaign.health, campaign.armor);
                campaign.SetLevelStatus(campaign.levelStatus);

                // Update Campaign Positions
                campaign.lastDir = (byte)DirCardinal.None;
                campaign.curX    = start.x;
                campaign.curY    = start.y;
                campaign.zoneId  = start.zoneId;

                // Update Character
                scene.character.SetCharacter(campaign);
            }
        }
Exemplo n.º 2
0
 public WorldUI(WorldScene scene)
 {
     this.scene        = scene;
     this.atlas        = Systems.mapper.atlas[(byte)AtlasGroup.Tiles];
     this.bottomRow    = (short)(Systems.screen.viewHeight - (byte)WorldmapEnum.TileHeight);
     this.worldContent = this.scene.worldContent;
     this.statusText   = new UIStatusText(null, (short)Systems.screen.viewHalfWidth, 5);
 }
Exemplo n.º 3
0
        public WorldChar(WorldScene scene)
        {
            this.scene = scene;
            this.atlas = Systems.mapper.atlas[(byte)AtlasGroup.Objects];

            // Assign Character Details based on Campaign State
            this.faceRight = true;
            this.head      = Head.GetHeadBySubType((byte)HeadSubType.LanaHead);
            this.hat       = Hat.GetHatBySubType(0);
            this.suit      = Suit.GetSuitBySubType((byte)SuitSubType.RedBasic);

            this.SpriteName = "Stand";
        }
Exemplo n.º 4
0
        public static void ResetPosition()
        {
            ConsoleTrack.possibleTabs = "Example: `reset position`";
            ConsoleTrack.helpText     = "Reset your position to the original start point.";

            if (ConsoleTrack.activate)
            {
                WorldScene      scene    = (WorldScene)Systems.scene;
                StartNodeFormat start    = scene.worldData.start;
                CampaignState   campaign = scene.campaign;

                // Update Campaign Positions
                campaign.lastDir = (byte)DirCardinal.None;
                campaign.curX    = start.x;
                campaign.curY    = start.y;
                campaign.zoneId  = start.zoneId;

                // Update Character
                scene.character.SetCharacter(campaign);
            }
        }