Пример #1
0
        public FightEngine(SubSystems subsystems)
            : base(subsystems)
        {
            var textfile    = GetSubSystem <IO.FileSystem>().OpenTextFile(@"data/fight.def");
            var filesection = textfile.GetSection("Files");
            var basepath    = GetSubSystem <IO.FileSystem>().GetDirectory(textfile.Filepath);

            Entities         = new EntityCollection(this);
            Pause            = new Pause(this, false);
            SuperPause       = new Pause(this, true);
            Assertions       = new EngineAssertions();
            Camera           = new Camera(this);
            EnvironmentColor = new EnvironmentColor(this);
            EnvironmentShake = new EnvironmentShake(this);
            Speed            = GameSpeed.Normal;
            Fonts            = BuildFontMap(filesection);
            FightSounds      = GetSubSystem <Audio.SoundSystem>().CreateManager(BuildPath(basepath, filesection.GetAttribute <string>("snd")));
            CommonSounds     = GetSubSystem <Audio.SoundSystem>().CreateManager(BuildPath(basepath, filesection.GetAttribute <string>("common.snd")));
            FightSprites     = GetSubSystem <Drawing.SpriteSystem>().CreateManager(BuildPath(basepath, filesection.GetAttribute <string>("sff")));
            FxSprites        = GetSubSystem <Drawing.SpriteSystem>().CreateManager(BuildPath(basepath, filesection.GetAttribute <string>("fightfx.sff")));
            FightAnimations  = GetSubSystem <Animations.AnimationSystem>().CreateManager(textfile.Filepath);
            FxAnimations     = GetSubSystem <Animations.AnimationSystem>().CreateManager(BuildPath(basepath, filesection.GetAttribute <string>("fightfx.air")));
            Elements         = new Elements.Collection(FightSprites, FightAnimations, FightSounds, Fonts);
            RoundInformation = new RoundInformation(this, textfile);
            Team1            = new Team(this, TeamSide.Left);
            Team2            = new Team(this, TeamSide.Right);
            m_combatcheck    = new CombatChecker(this);
            m_logic          = new Logic.PreIntro(this);
            Clock            = new Clock(this);
        }
Пример #2
0
        public void Reset()
        {
            m_logic           = new Logic.PreIntro(this);
            m_slowspeedbuffer = 0;
            TickCount         = 0;
            Speed             = GameSpeed.Normal;

            MatchNumber = 1;
            RoundNumber = 1;

            FightSounds.Stop();
            CommonSounds.Stop();

            Stage.Reset();
            Camera.Reset();
            Pause.Reset();
            SuperPause.Reset();
            Assertions.Reset();
            EnvironmentColor.Reset();
            EnvironmentShake.Reset();
            Elements.Reset();
        }
Пример #3
0
        public void Draw(Boolean debug)
        {
            if (EnvironmentColor.IsActive == false && Assertions.NoBackLayer == false)
            {
                Stage.Draw(BackgroundLayer.Back);
            }

            if (EnvironmentColor.IsActive == true && EnvironmentColor.UnderFlag == true)
            {
                EnvironmentColor.Draw();
            }

            if (Assertions.NoBarDisplay == false)
            {
                Team1.Display.Draw();
                Team2.Display.Draw();
                Clock.Draw();
            }

            Entities.Draw(debug);

            if (EnvironmentColor.IsActive == true && EnvironmentColor.UnderFlag == false)
            {
                EnvironmentColor.Draw();
            }

            if (EnvironmentColor.IsActive == false && Assertions.NoFrontLayer == false)
            {
                Stage.Draw(BackgroundLayer.Front);
            }

            if (m_logic != null)
            {
                m_logic.Draw();
            }

            Team1.Display.ComboCounter.Draw();
            Team2.Display.ComboCounter.Draw();
        }
Пример #4
0
        public void Update(GameTime time)
        {
            if (SpeedSkip() == false)
            {
                return;
            }

            UpdatePauses();

            Elements.Update();

            UpdateLogic();

            Assertions.Reset();

            Stage.PaletteFx.Update();
            if (Pause.IsPaused(Stage) == false && SuperPause.IsPaused(Stage) == false)
            {
                Stage.Update(time);
            }

            EnvironmentColor.Update();

            Entities.Update(time);
            m_combatcheck.Run();

            Team1.Display.Update();
            Team2.Display.Update();

            EnvironmentShake.Update();
            Camera.Update();

            GetSubSystem <Diagnostics.DiagnosticSystem>().Update(this);

            ++TickCount;
        }
Пример #5
0
        public FightEngine(SubSystems subsystems)
            : base(subsystems)
        {
            IO.TextFile textfile = GetSubSystem<IO.FileSystem>().OpenTextFile(@"data/fight.def");
            IO.TextSection filesection = textfile.GetSection("Files");
            String basepath = GetSubSystem<IO.FileSystem>().GetDirectory(textfile.Filepath);

			m_init = null;
            m_entities = new EntityCollection(this);
            m_roundnumber = 0;
            m_stage = null;
            m_idcounter = 0;
            m_tickcount = 0;
            m_pause = new Pause(this, false);
            m_superpause = new Pause(this, true);
            m_asserts = new EngineAssertions();
            m_camera = new Camera(this);
            m_envcolor = new EnvironmentColor(this);
            m_envshake = new EnvironmentShake(this);
            m_speed = GameSpeed.Normal;
            m_slowspeedbuffer = 0;
            m_fontmap = BuildFontMap(filesection);
            m_fightsounds = GetSubSystem<Audio.SoundSystem>().CreateManager(BuildPath(basepath, filesection.GetAttribute<String>("snd")));
            m_commonsounds = GetSubSystem<Audio.SoundSystem>().CreateManager(BuildPath(basepath, filesection.GetAttribute<String>("common.snd")));
            m_fightsprites = GetSubSystem<Drawing.SpriteSystem>().CreateManager(BuildPath(basepath, filesection.GetAttribute<String>("sff")));
            m_fxsprites = GetSubSystem<Drawing.SpriteSystem>().CreateManager(BuildPath(basepath, filesection.GetAttribute<String>("fightfx.sff")));
            m_fightanimations = GetSubSystem<Animations.AnimationSystem>().CreateManager(textfile.Filepath);
            m_fxanimations = GetSubSystem<Animations.AnimationSystem>().CreateManager(BuildPath(basepath, filesection.GetAttribute<String>("fightfx.air")));
            m_elements = new Elements.Collection(FightSprites, FightAnimations, FightSounds, Fonts);
            m_roundinfo = new RoundInformation(this, textfile);
            m_team1 = new Team(this, TeamSide.Left);
            m_team2 = new Team(this, TeamSide.Right);
            m_combatcheck = new CombatChecker(this);
            m_logic = new Logic.PreIntro(this);
			m_clock = new Clock(this);
        }
Пример #6
0
        public FightEngine(SubSystems subsystems)
            : base(subsystems)
        {
            IO.TextFile    textfile    = GetSubSystem <IO.FileSystem>().OpenTextFile(@"data/fight.def");
            IO.TextSection filesection = textfile.GetSection("Files");
            String         basepath    = GetSubSystem <IO.FileSystem>().GetDirectory(textfile.Filepath);

            m_init            = null;
            m_entities        = new EntityCollection(this);
            m_roundnumber     = 0;
            m_stage           = null;
            m_idcounter       = 0;
            m_tickcount       = 0;
            m_pause           = new Pause(this, false);
            m_superpause      = new Pause(this, true);
            m_asserts         = new EngineAssertions();
            m_camera          = new Camera(this);
            m_envcolor        = new EnvironmentColor(this);
            m_envshake        = new EnvironmentShake(this);
            m_speed           = GameSpeed.Normal;
            m_slowspeedbuffer = 0;
            m_fontmap         = BuildFontMap(filesection);
            m_fightsounds     = GetSubSystem <Audio.SoundSystem>().CreateManager(BuildPath(basepath, filesection.GetAttribute <String>("snd")));
            m_commonsounds    = GetSubSystem <Audio.SoundSystem>().CreateManager(BuildPath(basepath, filesection.GetAttribute <String>("common.snd")));
            m_fightsprites    = GetSubSystem <Drawing.SpriteSystem>().CreateManager(BuildPath(basepath, filesection.GetAttribute <String>("sff")));
            m_fxsprites       = GetSubSystem <Drawing.SpriteSystem>().CreateManager(BuildPath(basepath, filesection.GetAttribute <String>("fightfx.sff")));
            m_fightanimations = GetSubSystem <Animations.AnimationSystem>().CreateManager(textfile.Filepath);
            m_fxanimations    = GetSubSystem <Animations.AnimationSystem>().CreateManager(BuildPath(basepath, filesection.GetAttribute <String>("fightfx.air")));
            m_elements        = new Elements.Collection(FightSprites, FightAnimations, FightSounds, Fonts);
            m_roundinfo       = new RoundInformation(this, textfile);
            m_team1           = new Team(this, TeamSide.Left);
            m_team2           = new Team(this, TeamSide.Right);
            m_combatcheck     = new CombatChecker(this);
            m_logic           = new Logic.PreIntro(this);
            m_clock           = new Clock(this);
        }