public SimpleModel(Texture texture, IntRect rect, float scale, float hpScale) { this.texture = texture; if(texture == null) throw new Exception("null texture"); this.rect = rect; sourceRect = new IntRect(0, 0, rect.Width, rect.Height); this.scale = scale; this.hpScale = hpScale; animationPlayer = new AnimationPlayer(); healthHexSprite = new Sprite(healthHexTexture); extraHexRingSprite = new Sprite(extraHexRingTexture); sprite = new Sprite(texture); }
//collide and animation internal Projectile(Moveable owner, Vector2f start, Moveable d, Func<Moveable, bool> doA, Animation animation, float scale, bool collide) : this(owner, start, d, doA, null, new IntRect(0, 0, animation.FrameWidth, animation.FrameHeight), scale) { this.collide = collide; animationPlayer = new AnimationPlayer(); animationPlayer.PlayAnimation(animation); }
internal FightObject(Texture text, Vector2f pos, IntRect sourceRect, bool animationplayer) : this(text, pos,sourceRect) { if (animationplayer) animationPlayer = new AnimationPlayer(); }