Package de.coreengine.system.gameObjects
Class FPCamera
- java.lang.Object
-
- de.coreengine.system.GameObject
-
- de.coreengine.system.gameObjects.FPCamera
-
public class FPCamera extends GameObject
Represents a first person camera to walk around- Author:
- Darius Dinger
-
-
Field Summary
-
Fields inherited from class de.coreengine.system.GameObject
parent
-
-
Constructor Summary
Constructors Constructor Description FPCamera(float x, float y, float z)
Create new fp cam and grab mouse
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Camera
getCamera()
boolean
isSprinting()
boolean
isWalking()
void
onInit()
This method gets called once in the GameObject life cycle.void
onRender()
In this method the GameObject gets rendered onto the screen (if it has an graphical representation).void
onUpdate()
This method gets called every frame before the render method.-
Methods inherited from class de.coreengine.system.GameObject
addActionToPhysicWorld, addChild, addRigidBodyToWorld, getScene, onAdd, onLoad, onPauseUpdate, onRemove, onSave, onSyncronize, removeChild, setShouldRender, setShouldSyncronize, setShouldUpdate
-
-
-
-
Method Detail
-
onInit
public void onInit()
Description copied from class:GameObject
This method gets called once in the GameObject life cycle. Even if the GameObject gets removed and readded, this method dont gets called again. Its like an additional constructor, except that its not gets called when the GameObject gets created, but when its first has to action.- Overrides:
onInit
in classGameObject
-
onUpdate
public void onUpdate()
Description copied from class:GameObject
This method gets called every frame before the render method. Here is place for the GameObject logic updates, e.g. input handling, physics, actions, ...- Overrides:
onUpdate
in classGameObject
-
onRender
public void onRender()
Description copied from class:GameObject
In this method the GameObject gets rendered onto the screen (if it has an graphical representation). Its primary used for MasterRenderer calls.- Overrides:
onRender
in classGameObject
-
getCamera
public Camera getCamera()
- Returns:
- Camera object that used by the first person camera
-
isWalking
public boolean isWalking()
- Returns:
- Is the player currently walking
-
isSprinting
public boolean isSprinting()
- Returns:
- Is the player currently sprinting
-
-