I have this code here using my API:
package org.midnightas.os.game.dots;
import java.awt.Graphics2D;
import org.midnightas.os2.Key;
import org.midnightas.os2.MidnightasOS;
import org.midnightas.os2.gameapi.Game;
public class Dots extends Game {
public Dots(MidnightasOS midnightasos) {
super(midnightasos);
}
@Override
public void init() {
}
@Override
public void keyPressed(Key arg0) {
}
@Override
public void render(Graphics2D arg0) {
}
@Override
public void tick() {
}
static {
System.out.println("MOS Dots crashed.");
MidnightasOS.setGame(Dots.class);
}
}
The static block is supposed to be ran calling MidnightasOS.setGame(Class);
However that is not happening.
I have also debugged using System.out to no avail.
Is the problem within MidnightasOS? I will post it's code if necessary.
I'm doing this because I'm trying to create an artificial operating system with Linux and the Raspberry PI.
This shall be a game console like the Game Boy.
I'm trying to load all Game classes so at least one of them would use MidnightasOS.setGame(Class);
Thanks for reading.