28 lines
510 B
D
28 lines
510 B
D
module game.entity.coin;
|
|
|
|
import game.data;
|
|
import game.animation.animation;
|
|
|
|
class Coin: Entity {
|
|
private {
|
|
Animation animation;
|
|
}
|
|
|
|
this(in Texture2D texture, in Rectangle frame, in Vector2 position) {
|
|
super(texture, frame, position);
|
|
|
|
animation = Animation(texture, 5, 1, 0.1, 0);
|
|
}
|
|
|
|
override void update() {
|
|
animation.update();
|
|
}
|
|
|
|
override void processEvents() {}
|
|
|
|
override void draw() {
|
|
animation.draw(position);
|
|
}
|
|
}
|
|
|