Instantly share code, notes, and snippets.

Embed
What would you like to do?
7.7 Custom extended ftEngine
Import fantomX
Class CustomEngine Extends ftEngine
Method OnObjectCollision:Int(obj_one:ftObject, obj_two:ftObject)
If (obj_one.GetText() = "PLAYER" And obj_two.GetText() = "ENEMY")
obj_two.SetText("DESTROYED")
obj_two.SetColWith(obj_one.GetColGroup(), False)
Else If (obj_two.GetText() = "PLAYER" And obj_one.GetText() = "ENEMY")
obj_one.SetText("DESTROYED")
obj_one.SetColWith(obj_two.GetColGroup(), False)
End
Return 0
End
End
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment