Make GameObjectSpawned Immutable with @Value

This commit is contained in:
Dutta64
2020-06-27 05:47:00 -06:00
committed by Lucwousin
parent 956fc953ea
commit 3c76031534
3 changed files with 6 additions and 10 deletions

View File

@@ -170,9 +170,7 @@ public class GameEventManager
.filter(Objects::nonNull)
.forEach(object ->
{
final GameObjectSpawned objectSpawned = new GameObjectSpawned();
objectSpawned.setTile(tile);
objectSpawned.setGameObject(object);
final GameObjectSpawned objectSpawned = new GameObjectSpawned(tile, object);
eventBus.post(GameObjectSpawned.class, objectSpawned);
});