Skip to content

Commit c4708ff

Browse files
committed
deltas
1 parent 8350f47 commit c4708ff

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

src/main/java/com/game/engine/entities/Entity.java

+12
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,18 @@ public void update(Batch batch, float delta){
3939

4040
}
4141

42+
public void sendMessage(Component.MESSAGE messageType, String ... args){
43+
String fullMessage = messageType.toString();
44+
45+
for (String string : args) {
46+
fullMessage += Component.MESSAGE_TOKEN + string;
47+
}
48+
49+
for(Component component: _components){
50+
component.receiveMessage(fullMessage);
51+
}
52+
}
53+
4254
public String getEntityId(){
4355
return this.entityId;
4456
}

src/main/java/com/game/engine/systems/RenderingSystem.java

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
public class RenderingSystem implements System {
88

99
ArrayList<Component> components;
10+
1011
@Override
1112
public void registerComponent(Component component) {
1213
// TODO Auto-generated method stub
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)