"Subclassing" fxSceneObject2D
by Jason McIntosh · in Torque Game Builder · 03/02/2005 (11:47 am) · 3 replies
I want to create "subclasses" of fxSceneObject2D so I don't have to cram all my onCollision() handling into one function for every object in the game. I'm struggling on how to accomplish this, though. Is this even close?
$myObject = new fxSceneObject2D( MyClass ) {};Could I then do:MyClass::onCollision( etc etc )
{
// Handle collision for this type of obj.
}It's just too crazy not to modularize the code somehow.About the author
#2
03/03/2005 (2:49 am)
So stop talking about it and give it up :)
#3
Script Inheritance Extension and Object-Oriented Scripting Methodology
03/03/2005 (6:47 am)
Perhaps he means this resource:Script Inheritance Extension and Object-Oriented Scripting Methodology
Torque Owner Bryan Edds