Template:Table ComponentTriggers: Difference between revisions

Template page
m Clean up template a little bit so it looks correct with the wiki theming, add example.
update table headers and example
 
Line 1: Line 1:
== Method type and Arguments ==
Explains what kind of method it is ([[Type:Action`1|Action]], [[Type:Func`1|Func`1]], etc) and the variable types and names of the arguments (ex: "point: [[Types:Float3|Float3]], weight: [[Types:Float|Float]]"
== Examples ==
From [[Component:RandomObjectSpawner|RandomObjectSpawner]]
{{Table ComponentTriggers
|Spawn()|[[Type:Action`1|Action]]| Spawns a slot randomly selected from <code>Templates</code>, located at the origin of this component's parent slot.
|SpawnAtPoint()|[[Type:Action`1|Action`1]]&lt;point: [[Types:Float3|Float3]]&gt;| Spawns a slot randomly selected from <code>Templates</code>, located at the position specified in the <code>Float3</code> argument
}}
<onlyinclude><includeonly>{| class="wikitable mw-collapsible"
<onlyinclude><includeonly>{| class="wikitable mw-collapsible"
|+ Triggers
|+ Triggers
|-
|-
! Name
! Method Name
! Arguments
! Method type and Arguments.
! Description
! Description
{{#if:{{{1|}}}|
{{#if:{{{1|}}}|
Line 237: Line 249:
|-
|-
|}</includeonly></onlyinclude>
|}</includeonly></onlyinclude>
== Examples ==
From [[Component:RandomObjectSpawner|RandomObjectSpawner]]
{{Table ComponentTriggers
|Spawn()|''None''| Spawns a slot randomly selected from <code>Templates</code>, located at the origin of this component's parent slot.
|SpawnAtPoint()|'''[[Types:Float3|Float3]]'''| Spawns a slot randomly selected from <code>Templates</code>, located at the position specified in the <code>Float3</code> argument
}}

Latest revision as of 19:39, 13 November 2024

Method type and Arguments

Explains what kind of method it is (Action, Func`1, etc) and the variable types and names of the arguments (ex: "point: Float3, weight: Float"

Examples

From RandomObjectSpawner

Triggers
Method Name Method type and Arguments. Description
Spawn() Action Spawns a slot randomly selected from Templates, located at the origin of this component's parent slot.
SpawnAtPoint() Action`1<point: Float3> Spawns a slot randomly selected from Templates, located at the position specified in the Float3 argument