You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
580 B
30 lines
580 B
3 years ago
|
package sig.objects;
|
||
|
|
||
|
import sig.DrawLoop;
|
||
|
import sig.engine.Object;
|
||
|
import sig.engine.Panel;
|
||
|
import sig.engine.Sprite;
|
||
|
import java.awt.event.KeyEvent;
|
||
|
|
||
|
public class Player extends Object{
|
||
|
|
||
|
public Player(Panel panel) {
|
||
|
super(panel);
|
||
|
this.setSprite(Sprite.NANA);
|
||
|
}
|
||
|
|
||
|
|
||
|
@Override
|
||
|
public void update(double updateMult) {
|
||
|
if (KeyHeld(KeyEvent.VK_RIGHT)) {
|
||
|
setX(getX()+32*updateMult);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public void draw(int[] p) {
|
||
|
DrawLoop.Draw_Sprite(this.getX(), this.getY(), this.getSprite());
|
||
|
}
|
||
|
|
||
|
}
|