Пример #1
0
        public virtual Boolean IsPaused(Pause pause)
        {
            if (pause == null)
            {
                throw new ArgumentNullException("pause");
            }

            if (pause.IsActive == false)
            {
                return(false);
            }
            if (this == pause.Creator && pause.ElapsedTime <= pause.MoveTime)
            {
                return(false);
            }

            return(true);
        }
Пример #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 override bool IsPaused(Pause pause)
        {
            if (base.IsPaused(pause) == false)
            {
                return(false);
            }

            if (pause.IsSuperPause)
            {
                if (pause.ElapsedTime <= Data.SuperPauseTime)
                {
                    return(false);
                }
            }
            else
            {
                if (pause.ElapsedTime <= Data.PauseTime)
                {
                    return(false);
                }
            }

            return(true);
        }
Пример #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);
        }
Пример #7
0
		public override Boolean IsPaused(Pause pause)
		{
			if (base.IsPaused(pause) == false) return false;

			if (pause.IsSuperPause == true)
			{
				if (pause.ElapsedTime <= Data.SuperPauseTime) return false;
			}
			else
			{
				if (pause.ElapsedTime <= Data.PauseTime) return false;
			}

			return true;
		}
Пример #8
0
		public override Boolean IsPaused(Pause pause)
		{
			if (pause == null) throw new ArgumentNullException("pause");

			if (pause.IsActive == false) return false;

            if (Data.IsHitSpark == true) return false;

			if (pause.IsSuperPause == true)
			{
				if (Data.SuperMove == true || pause.ElapsedTime <= Data.SuperMoveTime) return false;
			}
			else
			{
				if (pause.ElapsedTime <= Data.PauseTime) return false;
			}

			return true;
		}
Пример #9
0
		public virtual Boolean IsPaused(Pause pause)
		{
			if (pause == null) throw new ArgumentNullException("pause");

			if (pause.IsActive == false) return false;
			if (this == pause.Creator && pause.ElapsedTime <= pause.MoveTime) return false;

			return true;
		}