
com.almasb.fxgl.entity.components.CollidableComponent.kt Maven / Gradle / Ivy
/*
* FXGL - JavaFX Game Library. The MIT License (MIT).
* Copyright (c) AlmasB ([email protected]).
* See LICENSE for details.
*/
package com.almasb.fxgl.entity.components
import java.io.Serializable
import java.util.ArrayList
/**
* Marks an entity as collidable.
*
* @author Almas Baimagambetov (AlmasB) ([email protected])
*/
class CollidableComponent(collidable: Boolean) : BooleanComponent(collidable) {
private val ignoredTypes = ArrayList()
fun getIgnoredTypes(): List {
return ignoredTypes
}
fun addIgnoredType(type: Serializable) {
ignoredTypes.add(type)
}
fun removeIgnoredType(type: Serializable) {
ignoredTypes.remove(type)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy