wiki.sine.space | sinespace

Difference between revisions of "Scripting/ScriptClass"

From wiki.sine.space
Jump to: navigation, search
(Created page with "=Properties= {{ScriptFunction|SGameObject|GameObject|{get;}|Return the GameObject which component added.|5= collider = Space.Scene.Find("Cube").Collider<br> ''--get the sampl...")
 
 
Line 7: Line 7:
 
''--get the game object from collider component.''<br>
 
''--get the game object from collider component.''<br>
 
Space.Log(obj.Name)<br>
 
Space.Log(obj.Name)<br>
''--output name of the component added to.''
+
''--output name of the component added.''
 
}}
 
}}
  

Latest revision as of 07:41, 31 December 2020

Properties

GameObject

SGameObject GameObject {get;}

Return the GameObject which component added.

collider = Space.Scene.Find("Cube").Collider

--get the sample component collider here.
obj = collider.GameObject
--get the game object from collider component.
Space.Log(obj.Name)

--output name of the component added.



Alive

bool Alive {get;}

Return if the component is alive.

collider = Space.Scene.Find("Cube").Collider

--get the sample component collider here.
obj = collider.GameObject
--get the game object from collider component.
Space.Log(obj.Alive)

--print true to console.