示例#1
0
文件: WCReset.cs 项目: tarsupin/Nexus
        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);
            }
        }
示例#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);
 }
示例#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";
        }
示例#4
0
文件: WCReset.cs 项目: tarsupin/Nexus
        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);
            }
        }