Example #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);
        }
Example #2
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);
        }
Example #3
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);
        }