ClimbableSpriteRendererComponent

Sets up a Climbable Sprite and display the image on the world.

# Properties

[{"index":"string ClipName (Deprecated) (ReadOnly) (HideFromInspector)","0":"This property is deprecated."}]

[{"index":"Color Color (Sync)","0":"Colors the sprite. In case of basic white, the original color is displayed."}]

[{"index":"SpriteDrawMode DrawMode (Sync) (ReadOnly) (HideFromInspector)","0":"Sets the Sprite's draw mode. Tiled can be used."}]

[{"index":"boolean FlipX (Sync)","0":"Determines whether the sprite is inverted relative to the X axis."}]

[{"index":"boolean FlipY (Sync)","0":"Determines whether the sprite is inverted relative to the Y axis."}]

[{"index":"boolean IgnoreMapLayerCheck (Sync)","0":"Doesn't perform automatic replace when designating the Map Layer name into SortingLayer."}]

[{"index":"string MaterialId (Sync)","0":"Specifies the Id of the material that the renderer will use."}]

[{"index":"boolean NeedGizmo (Sync) (HideFromInspector)","0":"Displays the Sprite's Gizmo."}]

[{"index":"int32 OrderInLayer (Sync)","0":"Determines the priority within the same Layer. A greater number indicates higher priority."}]

[{"index":"RenderSettingType RenderSetting (Deprecated) (HideFromInspector)","0":"This property is deprecated."}]

[{"index":"string SortingLayer (Sync)","0":"When two or more entities overlap, the priority is determined according to the Sorting Layer."}]

[{"index":"string SpriteRUID (Sync)","0":"Sets the Sprite RUID for the ladder body."}]

[{"index":"string SpriteRUIDHead (ReadOnly) (HideFromInspector)","0":"Sets the Sprite RUID for the ladder head."}]

[{"index":"string SpriteRUIDTail (ReadOnly) (HideFromInspector)","0":"Sets the Sprite RUID for the ladder tail."}]

[{"index":"Vector2 TiledSize (Sync)","0":"You can set the vertical height of the ladder by changing the Y value. Changing the X value is not supported."}]

##### inherited from Component:

[{"index":"boolean Enable (Sync)","0":"Checks whether Component is activated or not."}]

[{"index":"boolean EnableInHierarchy (ReadOnly) (HideFromInspector)","0":"Displays whether this Component is Enable in the hierarchy. If Entity Enable is false regardless of Component Enable, returns false."}]

[{"index":"Entity Entity (ReadOnly)","0":"The Entity that owns this component."}]

# Methods

[{"index":"void ChangeMaterial(string materialId)","0":"Replaces the material to be applied to the renderer."}]

[{"index":"void ResetColliderBox()","0":"Initializes the collision area to fit the ladder's sprite size."}]

##### inherited from Component:

[{"index":"boolean IsClient()","0":"Returns whether the current execution environment is a client or not."}]

[{"index":"boolean IsServer()","0":"Returns whether the current execution environment is a server or not."}]

# Events

[{"index":"OrderInLayerChangedEvent","0":"This event occurs when changing the Component's OrderInLayer."}]

[{"index":"SortingLayerChangedEvent","0":"This event occurs when changing the component's SortingLayer."}]

[{"index":"SpriteAnimPlayerChangeFrameEvent","0":"This event is raised when changing the sprite animation's frame."}]

[{"index":"SpriteAnimPlayerEndEvent","0":"This event is raised when finishing the sprite animation's playback."}]

[{"index":"SpriteAnimPlayerEndFrameEvent","0":"This event is raised when playing the last frame of sprite animation."}]

[{"index":"SpriteAnimPlayerStartEvent","0":"This event is raised when starting the sprite animation's playback."}]

[{"index":"SpriteAnimPlayerStartFrameEvent","0":"This event is raised when playing the first frame of sprite animation."}]

# Examples

This is an example of changing the `TiledSize` of `ClimbableRendererComponent` and adjusting the collider box's size based on the sprite size when the `TriggerEnterEvnet` occurs, depending on the name of the collided entity.
    
    
    @Component
    script ClimbableResizer extends Component
        @ExecSpace("ServerOnly")
        method void ResizeRenderer(Vector2 tiledSize)
        local entity = _EntityService:GetEntityByPath(EntityPath)
        entity.ClimbableSpriteRendererComponent.TiledSize = tiledSize
        entity.ClimbableSpriteRendererComponent:ResetColliderBox()
        end
    
        @ExecSpace("ServerOnly")
        @EventSender("Self")
        handler HandleTriggerEnterEvent(TriggerEnterEvent event)
        --------------- Native Event Sender Info ----------------
        -- Sender: TriggerComponent
        -- Space: Server, Client
        ---------------------------------------------------------
    
        -- Parameters
        local TriggerBodyEntity = event.TriggerBodyEntity
        ---------------------------------------------------------
    
        if TriggerBodyEntity.Name == "Name" then
        	self:ResizeRenderer(Vector2(1, 5))
        end
        end
    end
    

# SeeAlso

  * EntityService
  * [Using Ladders and Rope](/docs?postId=809)