Update BjornPhysicsComponent.java
This commit is contained in:
parent
4a4c136757
commit
6523047361
@ -1,13 +1,23 @@
|
|||||||
package com.iluwater.component;
|
package com.iluwater.component;
|
||||||
|
|
||||||
import static org.slf4j.LoggerFactory.getLogger;
|
import static org.slf4j.LoggerFactory.getLogger;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* BjornPhysicsComponent is a class for our main game star
|
||||||
|
* This class creat a Physics component for Bjorn.
|
||||||
|
*/
|
||||||
public class BjornPhysicsComponent implements PhysicsComponent{
|
public class BjornPhysicsComponent implements PhysicsComponent{
|
||||||
|
|
||||||
private static final Logger LOGGER = getLogger(BjornPhysicsComponent.class);
|
private static final Logger LOGGER = getLogger(BjornPhysicsComponent.class);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method is a logger for Bjorn when happens a Physics update.
|
||||||
|
* In real scenario, there will be code for Physics Update.
|
||||||
|
*
|
||||||
|
* @param gameObject is a object in the game, here it is Bjorn
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void update(GameObject gameObject) {
|
public void update(GameObject gameObject) {
|
||||||
if(gameObject.getPositionOFx() == gameObject.getPositionOFy()){
|
if(gameObject.getPositionOFx() == gameObject.getPositionOFy()){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user