Physics object should not define defaults and leave that to superclasses

Co-authored-by: r3cp3ct <45179536+r3cp3ct@users.noreply.github.com>
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
main
sigonasr2, Sig, Sigo 2 years ago committed by GitHub
parent ca4073dbd9
commit a982d13302
  1. 29
      src/sig/objects/Erinoah.java
  2. 20
      src/sig/objects/actor/PhysicsObject.java

@ -1,12 +1,13 @@
package sig.objects;
import sig.RabiClone;
import sig.engine.Rectangle;
import sig.engine.Sprite;
import sig.engine.Transform;
import sig.engine.objects.AnimatedObject;
import sig.objects.actor.PhysicsObject;
import sig.objects.actor.RenderedObject;
public class Erinoah extends AnimatedObject implements RenderedObject{
public class Erinoah extends PhysicsObject implements RenderedObject{
public Erinoah(double x, double y) {
super(Sprite.ERINOAH,6.5,RabiClone.p);
@ -27,5 +28,29 @@ public class Erinoah extends AnimatedObject implements RenderedObject{
public Transform getSpriteTransform() {
return Transform.NONE;
}
@Override
public boolean rightKeyHeld() {
// TODO Auto-generated method stub
return false;
}
@Override
public boolean leftKeyHeld() {
// TODO Auto-generated method stub
return false;
}
@Override
public Rectangle getCollisionBounds() {
// TODO Auto-generated method stub
return null;
}
@Override
public void setCollisionBounds(Rectangle bounds) {
// TODO Auto-generated method stub
}
}

@ -3,8 +3,6 @@ package sig.objects.actor;
import sig.RabiClone;
import sig.engine.AnimatedSprite;
import sig.engine.Panel;
import sig.engine.Rectangle;
import sig.engine.Transform;
import sig.engine.objects.AnimatedObject;
import sig.engine.objects.CollisionEntity;
import sig.map.Tile;
@ -30,8 +28,6 @@ public abstract class PhysicsObject extends AnimatedObject implements CollisionE
super(spr, animationSpd, panel);
}
@Override
public void update(double updateMult) {
super.update(updateMult);
@ -205,21 +201,5 @@ public abstract class PhysicsObject extends AnimatedObject implements CollisionE
x_acceleration = 0;
}
}
@Override
public void draw(byte[] p) {}
@Override
public Transform getSpriteTransform() {
return null;
}
@Override
public Rectangle getCollisionBounds() {
return null;
}
@Override
public void setCollisionBounds(Rectangle bounds){}
}

Loading…
Cancel
Save