Update BjornInputComponent.java
This commit is contained in:
parent
1b5da55d45
commit
4a4c136757
@ -1,8 +1,19 @@
|
|||||||
package com.iluwater.component;
|
package com.iluwater.component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* BjornInputComponent is a class for our main game star
|
||||||
|
* This class creat a Input component for Bjorn.
|
||||||
|
*/
|
||||||
|
|
||||||
public class BjornInputComponent implements InputComponent {
|
public class BjornInputComponent implements InputComponent {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method is a logger for Bjorn when happens a Input update.
|
||||||
|
* In real scenario, there will be code for dealing with IO.
|
||||||
|
*
|
||||||
|
* @param gameObject is a object in the game, here it is Bjorn
|
||||||
|
*/
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void update(GameObject gameObject) {
|
public void update(GameObject gameObject) {
|
||||||
gameObject.setPositionOFx(gameObject.getPositionOFx() + gameObject.getVelocity());
|
gameObject.setPositionOFx(gameObject.getPositionOFx() + gameObject.getVelocity());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user