Update BjornGraphicsComponent.java

This commit is contained in:
YanchaoMiao 2020-05-24 17:20:53 +08:00 committed by Ilkka Seppälä
parent e9b20f674e
commit 1b5da55d45
No known key found for this signature in database
GPG Key ID: 31B7C8F5CC412ECB

View File

@ -4,9 +4,20 @@ import static org.slf4j.LoggerFactory.getLogger;
import org.slf4j.Logger;
/**
* BjornGraphicsComponent is a class for our main game star
* This class creat a Graphics component for Bjorn.
*/
public class BjornGraphicsComponent implements GraphicsComponent {
private static final Logger LOGGER = getLogger(BjornGraphicsComponent.class);
/**
* This method is a logger for Bjorn when happens a Graphics update.
* In real scenario, there will be code for Graphics Update.
*
* @param gameObject is a object in the game, here it is Bjorn
*/
@Override
public void update(GameObject gameObject) {
LOGGER.info("positive:" + gameObject.getPositionOFx() + "," + gameObject.getPositionOFy());