Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function SonicReaction(Actor, Other)
- DestroyActor(Other.this)
- end
- function BlockReaction(Actor, Other)
- print("goodbye cruel world!")
- end
- function TileReaction(Actor)
- print("hit a wall")
- end
- function LuaInit()
- sonic = Logic.Actors[1]
- tails = Logic.Actors[2]
- transform = sonic.TransformComponent
- AddReaction(sonic.this, sonic.BoxColliderComponent.this, "Sonic", "SonicReaction") --Actor to Actor collision
- AddReaction(sonic.this, sonic.BoxColliderComponent.this, "Block", "BlockReaction") -- Actor to Actor Collision
- AddReaction(sonic.this, sonic.BoxColliderComponent.this, "Wall", "TileReaction") -- Actor to wall/tile collision
- print(Square.x, Square.y)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement