public Player(FightEngine engine, PlayerProfile profile, Team team) : base(engine) { if (profile == null) throw new ArgumentNullException("profile"); if (team == null) throw new ArgumentNullException("team"); m_profile = profile; m_spritemanager = Engine.GetSubSystem<Drawing.SpriteSystem>().CreateManager(Profile.SpritePath); m_animationmanager = Engine.GetSubSystem<Animations.AnimationSystem>().CreateManager(Profile.AnimationPath); m_soundmanager = Engine.GetSubSystem<Audio.SoundSystem>().CreateManager(Profile.SoundPath); m_statemanager = Engine.GetSubSystem<StateMachine.StateSystem>().CreateManager(this, Profile.StateFiles); m_commandmanager = Engine.GetSubSystem<Commands.CommandSystem>().CreateManager(Profile.CommandPath); m_constants = new PlayerConstants(this, Engine.GetSubSystem<IO.FileSystem>().OpenTextFile(Profile.ConstantsPath)); m_dimensions = new CharacterDimensions(Constants); m_palettes = BuildPalettes(); m_palettenumber = 0; m_power = 0; m_palfx = new PaletteFx(); m_team = team; m_helpers = new Dictionary<Int32, List<Helper>>(); if (Engine.GetSubSystem<InitializationSettings>().PreloadCharacterSprites == true) { SpriteManager.LoadAllSprites(); } SpriteManager.UseOverride = true; SetLocalAnimation(0, 0); CurrentScale = Constants.Scale; PushFlag = true; }
public CharacterDimensions(PlayerConstants constants) { if (constants == null) throw new ArgumentNullException("constants"); m_groundfrontwidth = constants.GroundFront; m_groundbackwidth = constants.GroundBack; m_airfrontwidth = constants.Airfront; m_airbackwidth = constants.Airback; m_height = constants.Height; m_frontwidthoverride = 0; m_backwidthoverride = 0; m_frontedgewidthoverride = 0; m_backedgewidthoverride = 0; }
public CharacterDimensions(PlayerConstants constants) { if (constants == null) { throw new ArgumentNullException("constants"); } m_groundfrontwidth = constants.GroundFront; m_groundbackwidth = constants.GroundBack; m_airfrontwidth = constants.Airfront; m_airbackwidth = constants.Airback; m_height = constants.Height; m_frontwidthoverride = 0; m_backwidthoverride = 0; m_frontedgewidthoverride = 0; m_backedgewidthoverride = 0; }
public Player(FightEngine engine, PlayerProfile profile, PlayerMode mode, Team team) : base(engine) { if (profile == null) { throw new ArgumentNullException(nameof(profile)); } if (team == null) { throw new ArgumentNullException(nameof(team)); } m_profile = profile; m_spritemanager = Engine.GetSubSystem <Drawing.SpriteSystem>().CreateManager(Profile.SpritePath); m_animationmanager = Engine.GetSubSystem <Animations.AnimationSystem>().CreateManager(Profile.AnimationPath); m_soundmanager = Engine.GetSubSystem <Audio.SoundSystem>().CreateManager(Profile.SoundPath); m_statemanager = Engine.GetSubSystem <StateMachine.StateSystem>().CreateManager(this, Profile.StateFiles); m_commandmanager = Engine.GetSubSystem <Commands.CommandSystem>().CreateManager(mode, Profile.CommandPath); m_constants = new PlayerConstants(this, Engine.GetSubSystem <IO.FileSystem>().OpenTextFile(Profile.ConstantsPath)); m_dimensions = new CharacterDimensions(Constants); m_palettes = BuildPalettes(); m_palettenumber = 0; m_power = 0; m_palfx = new PaletteFx(); m_team = team; m_helpers = new Dictionary <int, List <Helper> >(); if (Engine.GetSubSystem <InitializationSettings>().PreloadCharacterSprites) { SpriteManager.LoadAllSprites(); } SpriteManager.UseOverride = true; SetLocalAnimation(0, 0); CurrentScale = Constants.Scale; PushFlag = true; }