DamageSkinService

Provides functions related to damage skin.

# Methods

[{"index":"void Play(Entity targetEntity, string skinId, float delayPerAttack, table damages, DamageSkinTweenType tweenType, boolean bCritical, Vector2 offset = Vector2(0, 0), Vector2 scale = Vector2(0, 0), float playRate = 1, float alpha = 1, LitMode litMode = LitMode.Default)","0":"Activates damage skins. If (0, 0) is specified or omitted for scale, (1, 1) is used. The type for damage is integer, DamageSkinTextType. DamageSkinTextType does not reflect the specified critical. playRate is replaced with 1 if it's equal to or less than 0. LitMode can be set to the damage skin play function. The default value is LitMode.Default."}]

[{"index":"void Play(Entity targetEntity, string skinId, float delayPerAttack, table damages, DamageSkinTweenType tweenType, table criticals, Vector2 offset = Vector2(0, 0), Vector2 scale = Vector2(0, 0), float playRate = 1, float alpha = 1, LitMode litMode = LitMode.Default)","0":"The damage skin is displayed depending on whether it is critical or not. If (0, 0) is specified or omitted for scale, (1, 1) is used. The damages table and the criticals table must be the same length. The type for damages is an integer, DamageSkinTextType. DamageSkinTextType does not reflect the specified critical. playRate is replaced with 1 if it's equal to or less than 0. LitMode can be set to the damage skin play function. The default value is LitMode.Default."}]

[{"index":"void PlayTextDamage(Entity targetEntity, string skinId, DamageSkinTextType textType, DamageSkinTweenType tweenType, Vector2 offset = Vector2(0, 0), Vector2 scale = Vector2(0, 0), float playRate = 1, float alpha = 1, LitMode litMode = LitMode.Default)","0":"Displays the damage skin that is suitable for DamageSkinTextType. If (0, 0) is specified or omitted for scale, (1, 1) is used. playRate is replaced with 1 if it's equal to or less than 0. LitMode can be set to the damage skin play function. The default value is LitMode.Default."}]

[{"index":"void PreloadAsync(string skinId, func completeCallback) (ClientOnly)","0":"Calls the damage skin that is suitable for skinId in advance. This function executes asynchronously, and you can be notified of operation completion through completeCallback."}]

##### inherited from Service:

[{"index":"EventHandlerBase ConnectEvent(string key, IScriptFunction eventHandler)","0":"Links events. When a key-type event occurs in this service, a handler is notified. The handler receives event parameters."}]

[{"index":"EventHandlerBase ConnectEvent(Type eventType, IScriptFunction eventHandler)","0":"Links events. This service notifies a handler when an eventType event occurs. The handler receives event parameters."}]

[{"index":"boolean DisconnectEvent(string key, EventHandlerBase eventHandler)","0":"Disconnects the event with the key-type event and the handler."}]

[{"index":"boolean DisconnectEvent(Type eventType, EventHandlerBase eventHandler)","0":"Disconnects the eventType event from its handler."}]

[{"index":"void SendEvent(EventType sendEvent)","0":"Generates an event."}]

# Examples
    
    
    @Component
    script TriggerDamageSkinApplier extends Component
        @EventSender("Self")
        handler HandleTriggerEnterEvent(TriggerEnterEvent event)
        --------------- Native Event Sender Info ----------------
        -- Sender: TriggerComponent
        -- Space: Server, Client
        ---------------------------------------------------------
    
        -- Parameters
        local TriggerBodyEntity = event.TriggerBodyEntity
        ---------------------------------------------------------
        _DamageSkinService:Play(TriggerBodyEntity, "000000", 0.05, {1, 2, 3}, DamageSkinTweenType.Default, false)
        end
    end