-
Notifications
You must be signed in to change notification settings - Fork 1
Home
2D Game Engine V1 Built off The Game engine is built off several classes that support each other. The engine help you create a game in less steps then you would if you did not have it. The game engine has functions like creating the main frame, listening for input, creating a screen, creating and handling buttons along with other features. Classes Main The game class contains the main thread and gameHandler, it sets a lot of application settings for you and make it so you only need a small main class to start your application. You only need to add a main function that creates a new game instance. To create the instance you need to give it tree variables, with, height and a title. When you have done that you have to create a “screen” out of it. Screen is the word that has been used to identify a new image in the application.
Screen The screen class is what handles drawing and displaying your code on the screen within the application. You access this line of code, this line creates a new image and a new class to create a screen from. Functions • onCreate • onUpdate • onDraw • getScreenFactory • showScreen • getCurrentScreen • getGame Handler MouseHandler The mouse handler gets mouse input and mouse position. Functions • mouseClicked • mousePressed • mouseReleased • mouseEntered • mouseExited • mouseDragged • mouseMoved • isMousePressed • getX • setX • getY • setY • getMouse • resetMousePressed • resetMouseCord
IMouseHandler You can extend the mouse handler and then overwrite the main functions or you can let the main functions be and overwrite these functions instead. Functions • Moved • Exited • Entered • Clicked • Pressed • Released • Dragged KeyboardHandler The keyboard handler gets keyboard input and keyboard position. Functions • keyTyped • keyPressed • keyReleased • isKeyPressed • isKeyReleased IKeyboardHandler You can extend the keyboard handler and then overwrite the main functions or you can let the main functions be and overwrite these functions instead. Functions • Typed • Pressed • Released Entity
Computer Text Time Date Usages