Skip to content

Commit d20ed6b

Browse files
committed
refactor: removed redundant onClick() since kotlin now properly reads Consumer<>, closes #1188
1 parent 804e331 commit d20ed6b

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

fxgl/src/main/kotlin/com/almasb/fxgl/dsl/EntityBuilder.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,6 @@ class EntityBuilder {
180180
entity.zIndex = z
181181
}
182182

183-
fun onClick(action: (Entity) -> Unit) = this.also {
184-
onClick(Consumer(action))
185-
}
186-
187183
fun onClick(action: Consumer<Entity>) = this.also {
188184
entity.viewComponent.addEventHandler(MouseEvent.MOUSE_CLICKED, EventHandler { action.accept(entity) })
189185
}

0 commit comments

Comments
 (0)