Advertisement
Guest User

Untitled

a guest
Oct 4th, 2024
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.52 KB | Source Code | 0 0
  1. package entity;
  2.  
  3. import java.awt.Image;
  4.  
  5. import core.Position;
  6. import core.Size;
  7. import game.state.State;
  8.  
  9. public abstract class GameObject {
  10.     protected Position position;
  11.     protected Position homePosition;
  12.     protected Size size;
  13.    
  14.     public GameObject() {
  15.         position = new Position(50, 50);
  16.         size = new Size(64, 64);
  17.     }
  18.    
  19.     public abstract void update(State state);
  20.     public abstract Image getSprite();
  21.    
  22.     public Position getPosition() {
  23.         return position;
  24.     }
  25.    
  26.     public Size getSize() {
  27.         return size;
  28.     }
  29. }
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement