started with generic collision_system (not working yet)
This commit is contained in:
14
components/collider.go
Normal file
14
components/collider.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package components
|
||||
|
||||
import "github.com/mlange-42/arche/ecs"
|
||||
|
||||
// if the function returns true, the entity will be removed. The
|
||||
// supplied entity is the target entitiy with which the checked one
|
||||
// collided.
|
||||
|
||||
type Collider struct {
|
||||
CollisionHandler func(*ecs.World, *Position, *Position, *Velocity, ecs.Entity) bool
|
||||
EdgeHandler func(*ecs.World, *Position, *Position, *Velocity, ecs.Entity) bool
|
||||
PassoverHandler func(*ecs.World, *Position, *Velocity, *ecs.Entity) bool
|
||||
PassoverFinishedHandler func(*ecs.World, *Position, *Velocity, *ecs.Entity) bool
|
||||
}
|
||||
Reference in New Issue
Block a user