protected override void LoadContent() { Config.AddConfig(@"content/config/graphics.cfg"); Config.LoadValues(); Graphics.PreferredBackBufferWidth = (int)Config.Resolution.X; Graphics.PreferredBackBufferHeight = (int)Config.Resolution.Y; if (!Graphics.IsFullScreen) { //graphics.ToggleFullScreen(); Graphics.ApplyChanges(); } spriteBatch = new SpriteBatch(this.GraphicsDevice); interfaceManager = new InterfaceManager((int)Config.StaticResolution.X, (int)Config.StaticResolution.Y, this, gameEngine); gameEngine = new Engine((int)Config.StaticResolution.X, (int)Config.StaticResolution.Y); particleEngine = new ParticleEngine(); animationManager = new AnimationManager(); LoadEngineData(); LoadTextures(); interfaceManager.CreateMenus(); AnimationSequence playerSequence = new AnimationSequence(gameEngine.Player.Hitbox, 0, (int)Config.Graphics.AnimationType.Player_Movement, Color.White); playerSequence.Add(0, 4, 100); playerSequence.Add(5, 9, 100); animationManager.AddAnimationSequence(playerSequence); gameEngine.Player.Tag = playerSequence; MediaPlayer.Volume = 0.2F; MediaPlayer.IsRepeating = true; MediaPlayer.Play(backgroundSong); }
public AnimationSequence ToAnimationSequence(List<InstructionSet> instructionSetList) { AnimationSequence animationSequence = new AnimationSequence(); animationSequence.Name = this.Name; foreach (TimedKeyframeListSave tkls in TimedKeyframeListSaves) { animationSequence.Add(tkls.ToTimedKeyframeList(instructionSetList)); } return animationSequence; }
public override void AppendAction(IAction skyAction) { AnimationSequence.Add(skyAction); setAction(skyAction); }