Exemple #1
0
 //public Rectangle Bounds { get {return new Rectangle((int)(X + 16), (int)Y, Width - 16, Height - 16);}}
 public Hero(GameManager gameManager)
     : base(gameManager)
 {
     animSprite = TextureManager.GetAnimSprite(AnimSprites.HeroRun);
     animSprite.TimePerFrame = 50;
     Width = 32;
     Height = 32;
     Friction = 0.4f;
     Speed = 2.0f;
     JumpPower = 20;
 }
Exemple #2
0
 public AnimSprite Clone()
 {
     AnimSprite animSprite = new AnimSprite(SpriteType, _framesCount, FrameWidth, FrameHeight);
     animSprite.TimePerFrame = this.TimePerFrame;
     return animSprite;
 }
Exemple #3
0
 public static void Draw(this SpriteBatch s, AnimSprite animSprite, Vector2 vector, Color color)
 {
     s.Draw(TextureManager.GetTexture(animSprite.SpriteType), vector, animSprite.SourceRect, color);
 }
Exemple #4
0
 public static void Draw(this SpriteBatch s, AnimSprite animSprite, Rectangle rect, Color color)
 {
     s.Draw(TextureManager.GetTexture(animSprite.SpriteType), rect, animSprite.SourceRect, color);
 }
 public static void DrawAnimationSprite(AnimSprite animSprite, Vector2 v, Color color)
 {
     SpriteBatch.Draw(animSprite, v, color);
 }
 public static void DrawAnimationSprite(AnimSprite animSprite, Rectangle rectangle, Color color)
 {
     SpriteBatch.Draw(animSprite, rectangle, color);
 }
 public static void Draw(this SpriteBatch s, AnimSprite animSprite, Vector2 vector, Color color)
 {
     s.Draw(animSprite.Texture, vector, animSprite.SourceRect, color);
 }
 public static void Draw(this SpriteBatch s, AnimSprite animSprite, Rectangle rect, Color color)
 {
     s.Draw(animSprite.Texture, rect, animSprite.SourceRect, color);
 }