Update CallbackRefArgument to replace references to CallbackValueArgument |
Add related |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 7: | Line 7: | ||
|Name=Callback Ref Argument | |Name=Callback Ref Argument | ||
}} | }} | ||
Similar to [[Component:CallbackValueArgument|CallbackValueArgument]] but instead of a value it's a reference for an action. | |||
There are some [[Sync Delegate|Sync Delegates]] in the game that match this component's requirements, but not many. | |||
<!--T:2--> | <!--T:2--> | ||
== Fields == | == Fields == | ||
{{Table ComponentFields | {{Table ComponentFields | ||
| | |Reference|'''A'''|TypeAdv0=true| The reference to give to <code>Callback</code> | ||
|Callback| | |Callback|{{RootFieldType|SyncDelegate`1|[[Type:Action`1|Action`1]]<A>}}|TypeAdv1=true| The [[Sync Delegate]] to call and provide <code>Reference</code> to. | ||
}} | |||
== Sync Delegates == | |||
{{Table ComponentTriggers | |||
|Call()|[[Type:Action|Action]]| Call <code>Callback</code> sync delegate and provide it <code>Reference</code>. | |||
|CallAndDestroy()|[[Type:Action|Action]]| Do <code>Call()</code> and then destroy this component. | |||
}} | }} | ||
Line 20: | Line 29: | ||
<!--T:4--> | <!--T:4--> | ||
== Examples == | == Examples == | ||
Can be used to call a {{RootFieldType|SyncDelegate`1|[[Type:Action`1|Action`1]]<T>}} (an action that takes a reference type) and give it <code>Reference</code> as an argument. | |||
<!--T:5--> | <!--T:5--> | ||
== Related Components == | == Related Components == | ||
* [[Component:CallbackValueArgument|CallbackValueArgument]] | |||
</translate> | </translate> | ||
[[Category:Generics{{#translation:}}]] | [[Category:Generics{{#translation:}}]] | ||
[[Category:Components{{#translation:}}|Callback Ref Argument]] | [[Category:Components{{#translation:}}|Callback Ref Argument`1]] | ||
[[Category:Components:Uncategorized{{#translation:}}|Callback Ref Argument]] | [[Category:Generic Components{{#translation:}}|Callback Ref Argument`1]] | ||
[[Category:Components:Uncategorized{{#translation:}}|Callback Ref Argument`1]] |
Latest revision as of 16:38, 7 November 2024
This article or section is a Stub. You can help the Resonite Wiki by expanding it.
Component image
Similar to CallbackValueArgument but instead of a value it's a reference for an action.
There are some Sync Delegates in the game that match this component's requirements, but not many.
Fields
Name | Type | Description |
---|---|---|
persistent
|
Bool | Determines whether or not this item will be saved to the server. |
UpdateOrder
|
Int | Controls the order in which this component is updated. |
Enabled
|
Bool | Controls whether or not this component is enabled. |
Reference
|
A | The reference to give to Callback
|
Callback
|
Action`1<A> | The Sync Delegate to call and provide Reference to.
|
Sync Delegates
Method Name | Method type and Arguments. | Description |
---|---|---|
Call()
|
Action | Call Callback sync delegate and provide it Reference .
|
CallAndDestroy()
|
Action | Do Call() and then destroy this component.
|
Usage
Examples
Can be used to call a Action`1<T> (an action that takes a reference type) and give it Reference
as an argument.