Summary
Creates a new
Animancer.EventNamesAttribute
containing the specified `names`.- Assembly
- Animancer
.dll - Namespace
- Animancer
- Containing Type
- EventNamesAttribute
Syntax
public EventNamesAttribute(params string[] names)
Remarks
Example:
public class AttackState
{
[SerializeField]
[EventNames("Hit Start", "Hit End")]
private ClipTransition _Animation;
protected virtual void Awake()
{
_Animation.Events.SetCallback("Hit Start", OnHitStart);
_Animation.Events.SetCallback("Hit End", OnHitEnd);
}
private void OnHitStart() { }
private void OnHitEnd() { }
}
Parameters
Name | Type | Description |
---|---|---|
names | string[] |
Return Value
Type | Description |
---|---|
void |