Skip to content

Latest commit

 

History

History
11 lines (6 loc) · 801 Bytes

File metadata and controls

11 lines (6 loc) · 801 Bytes

System that listens for Collision events and checks each of the involved Entities for a CollisionComponent. If either of the Entities is found to have a CollisionComponent, its onCollide member function is called with the two objects. The first parameter to onCollide is always the Entity to which the CollisionComponent is attached.

Behavior

Whenever the OnCollision function Component is called, the CollisionSystem performs the following for each Entity involved in the collision:

  • If the Entity has a CollisionComponent
    • Call onCollision(go, other), with go and other being the references to the two Entities involved.