Last active
December 9, 2016 14:16
-
-
Save codetravis/5390c8ae2010f64e3056eae6e62b8039 to your computer and use it in GitHub Desktop.
7.7 Custom extended ftEngine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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