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