Esempio n. 1
0
 public void SetSprite(Libraries.Sprite sprite)
 {
     Sprite           = sprite;
     CurrentAnimation = sprite.DefaultAnimation;
     CurrentFrame     = 0;
     CurrentTime      = 0f;
 }
Esempio n. 2
0
 public SpriteState(Libraries.Sprite sprite, float x = 0f, float y = 0f)
 {
     this.sprite = sprite;
     this.x      = x;
     this.y      = y;
     Visible     = true;
 }
Esempio n. 3
0
 public Entity AddSprite(string path, float x = 0f, float y = 0f)
 {
     Libraries.Sprite sprite = scene.SpriteLibrary.Register(path);
     spriteState = new SpriteState(sprite, x, y);
     if (bodyState != null)
     {
         spriteState.AddBody(bodyState);
     }
     return(this);
 }
Esempio n. 4
0
 public SpriteComponent(Libraries.Sprite sprite)
 {
     SetSprite(sprite);
 }