You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
3.1 KiB
71 lines
3.1 KiB
8 years ago
|
# Sprite commands {#sprite_commands}
|
||
|
|
||
8 years ago
|
## Fade Sprite
|
||
|
Fades a sprite to a target color over a period of time.
|
||
|
|
||
|
Property | Type | Description
|
||
|
--- | --- | ---
|
||
|
Sprite Renderer | UnityEngine.SpriteRenderer | Sprite object to be faded
|
||
8 years ago
|
_duration | Fungus.Variables.FloatData | Length of time to perform the fade
|
||
|
_target Color | Fungus.Variables.ColorData | Target color to fade to. To only fade transparency level, set the color to white and set the alpha to required transparency.
|
||
8 years ago
|
Wait Until Finished | System.Boolean | Wait until the fade has finished before executing the next command
|
||
|
|
||
|
## Set Clickable 2D
|
||
|
Sets a Clickable2D component to be clickable / non-clickable.
|
||
|
|
||
|
Property | Type | Description
|
||
|
--- | --- | ---
|
||
|
Target Clickable2 D | Fungus.Clickable2D | Reference to Clickable2D component on a gameobject
|
||
8 years ago
|
Active State | Fungus.Variables.BooleanData | Set to true to enable the component
|
||
8 years ago
|
|
||
|
## Set Collider
|
||
|
Sets all collider (2d or 3d) components on the target objects to be active / inactive
|
||
|
|
||
|
Property | Type | Description
|
||
|
--- | --- | ---
|
||
|
Target Objects | System.Collections.Generic.List`1[UnityEngine.GameObject] | A list of gameobjects containing collider components to be set active / inactive
|
||
|
Target Tag | System.String | All objects with this tag will have their collider set active / inactive
|
||
8 years ago
|
Active State | Fungus.Variables.BooleanData | Set to true to enable the collider components
|
||
8 years ago
|
|
||
|
## Set Draggable 2D
|
||
|
Sets a Draggable2D component to be draggable / non-draggable.
|
||
|
|
||
|
Property | Type | Description
|
||
|
--- | --- | ---
|
||
|
Target Draggable2 D | Fungus.Draggable2D | Reference to Draggable2D component on a gameobject
|
||
8 years ago
|
Active State | Fungus.Variables.BooleanData | Set to true to enable the component
|
||
8 years ago
|
|
||
|
## Set Mouse Cursor
|
||
|
Sets the mouse cursor sprite.
|
||
|
|
||
|
Property | Type | Description
|
||
|
--- | --- | ---
|
||
|
Cursor Texture | UnityEngine.Texture2D | Texture to use for cursor. Will use default mouse cursor if no sprite is specified
|
||
|
Hot Spot | UnityEngine.Vector2 | The offset from the top left of the texture to use as the target point
|
||
|
|
||
|
## Set Sorting Layer
|
||
|
Sets the Renderer sorting layer of every child of a game object. Applies to all Renderers (including mesh, skinned mesh, and sprite).
|
||
|
|
||
|
Property | Type | Description
|
||
|
--- | --- | ---
|
||
|
Target Object | UnityEngine.GameObject | Root Object that will have the Sorting Layer set. Any children will also be affected
|
||
|
Sorting Layer | System.String | The New Layer Name to apply
|
||
|
|
||
|
## Set Sprite Order
|
||
|
Controls the render order of sprites by setting the Order In Layer property of a list of sprites.
|
||
|
|
||
|
Property | Type | Description
|
||
|
--- | --- | ---
|
||
|
Target Sprites | System.Collections.Generic.List`1[UnityEngine.SpriteRenderer] | List of sprites to set the order in layer property on
|
||
8 years ago
|
Order In Layer | Fungus.Variables.IntegerData | The order in layer value to set on the target sprites
|
||
8 years ago
|
|
||
|
## Show Sprite
|
||
|
Makes a sprite visible / invisible by setting the color alpha.
|
||
|
|
||
|
Property | Type | Description
|
||
|
--- | --- | ---
|
||
|
Sprite Renderer | UnityEngine.SpriteRenderer | Sprite object to be made visible / invisible
|
||
8 years ago
|
_visible | Fungus.Variables.BooleanData | Make the sprite visible or invisible
|
||
8 years ago
|
Affect Children | System.Boolean | Affect the visibility of child sprites
|
||
|
|