A game highly inspired by Rabi-Ribi being developed using a custom-developed Sig game engine from the ground up with a proper game studio!
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.
RabiClone/src/sig/objects/Player.java

30 lines
580 B

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());
}
}