Exemplo n.º 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;
 }
Exemplo n.º 2
0
 public AnimSprite Clone()
 {
     AnimSprite animSprite = new AnimSprite(SpriteType, _framesCount, FrameWidth, FrameHeight);
     animSprite.TimePerFrame = this.TimePerFrame;
     return animSprite;
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 5
0
 public static void DrawAnimationSprite(AnimSprite animSprite, Vector2 v, Color color)
 {
     SpriteBatch.Draw(animSprite, v, color);
 }
Exemplo n.º 6
0
 public static void DrawAnimationSprite(AnimSprite animSprite, Rectangle rectangle, Color color)
 {
     SpriteBatch.Draw(animSprite, rectangle, color);
 }
Exemplo n.º 7
0
 public static void Draw(this SpriteBatch s, AnimSprite animSprite, Vector2 vector, Color color)
 {
     s.Draw(animSprite.Texture, vector, animSprite.SourceRect, color);
 }
Exemplo n.º 8
0
 public static void Draw(this SpriteBatch s, AnimSprite animSprite, Rectangle rect, Color color)
 {
     s.Draw(animSprite.Texture, rect, animSprite.SourceRect, color);
 }