Skip to content

Commit

Permalink
📕� Added Javadocs
Browse files Browse the repository at this point in the history
  • Loading branch information
jabo-bernardo committed Jun 9, 2020
1 parent 5c4639c commit c76f5bf
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions src/dev/jabo/kree/GameObject.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,15 @@ public class GameObject {
private String name;

private Scene parentScene;


/**
*
* @authpr jabo-bernardo
*
* @param parentScene Scene where this object is part of
* @param name GameObject name
*
* */
public GameObject(Scene parentScene, String name) {
this.name = name;
this.parentScene = parentScene;
Expand Down Expand Up @@ -48,7 +56,12 @@ public void Render(Graphics g) {
}
}

// Get reference of component
/**
*
* @param componentName Component Name
*
* @return Component
* */
public Component getComponent(String componentName) {
for(int i = 0; i < components.length; i++) {
if(components[i].name == componentName) {
Expand All @@ -58,7 +71,11 @@ public Component getComponent(String componentName) {
return null;
}

// Add component
/**
*
* @param component component to add
*
* */
public void addComponent(Component component) {

component.gameObject = this;
Expand Down

0 comments on commit c76f5bf

Please sign in to comment.