Useful functions
Add new component
KapEngine include component system. Because of this system, you can add components in your GameObject. To do that you have this function :
Get contains component
If you can add components, you can get all components that GameObject contains. For that you can use these functions :
getComponent("ComponentName"), will disappear in next versions. Prepare your code
You can also get all same components in one GameObject since KapEngine 1.2.1 :
Remove component
If you can add components, logically you can remove components. To do that, you can use this function :
Check contains component
You can check if your GameObject contains a specific component with the function below :
Check GameObject is active
You can also check if your GameObject is active by this function :
Get scene
As you can read in scene category, scenes are one of main system in KapEngine. Because of GameObjects are stock in scene, you can get the scene where your GameObject is stock with this function :
Last updated