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/RabiClone.java

49 lines
1000 B

3 years ago
package sig;
import javax.swing.JFrame;
import java.awt.event.KeyEvent;
import java.util.ArrayList;
import java.util.List;
3 years ago
import sig.engine.Panel;
import sig.objects.Player;
import sig.engine.Object;
3 years ago
public class RabiClone {
3 years ago
public static final String PROGRAM_NAME="Sig's Java Project Template";
public static int UPCOUNT=0;
public static Panel p;
public static List<Object> OBJ = new ArrayList<Object>();
3 years ago
public static void main(String[] args) {
3 years ago
JFrame f = new JFrame(PROGRAM_NAME);
p = new Panel(f);
3 years ago
p.init();
f.add(p);
f.addComponentListener(p);
f.addKeyListener(p);
3 years ago
f.setSize(1280,720);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setVisible(true);
3 years ago
p.render();
OBJ.add(new Player(p));
long lastGameTime = System.nanoTime();
while (true) {
long timePassed = System.nanoTime()-lastGameTime;
lastGameTime=System.nanoTime();
double updateMult = timePassed/1000000000d;
for (Object o : OBJ) {
o.update(updateMult);
}
}
}
3 years ago
}