protected override void LoadContent() { spriteBatch = new SpriteBatch(graphics.GraphicsDevice); GameServices.AddService <GraphicsDevice>(graphics.GraphicsDevice); GameServices.AddService <SpriteBatch>(spriteBatch); GameServices.AddService <ContentManager>(Content); SpriteSturcture spriteSturcture = new SpriteSturcture("player", "Player", 2, 3); MotionStructure motionStructure = new MotionStructure(Center, 300f); DrawStructure drawStructure = new DrawStructure(Vector2.One, 0f, Color.White, SpriteEffects.None, 1.0f); Animation animation = new Animation("Flash", new List <int> { 1, 2, 3, 4, 5, 6 }, 10); AnimationStructure animationStructure = new AnimationStructure(animation); GameObject gameObject = new GameObject(spriteSturcture, motionStructure, drawStructure, animationStructure); GameContent.AddObject(gameObject); }
public GameObject(SpriteSturcture spriteSturcture, MotionStructure motionStructure, DrawStructure drawStructure, AnimationStructure animationStructure) : base(spriteSturcture, motionStructure, drawStructure, animationStructure) { Generic = (GameObject)base.MemberwiseClone(); }