Summary
A variable-size list of
Animancer.AnimancerEvents which keeps itself sorted
according to their Animancer.AnimancerEvent.normalizedTime.
- Assembly
- Animancer
.dll - Namespace
- Animancer
- Interfaces
-
- IEnumerable
<AnimancerEvent> - ICloneable
<AnimancerEvent .Sequence >
- IEnumerable
- Base Types
-
- Object
graph BT
Type-->Base0["Object"]
Type-.->Interface0["IEnumerable<AnimancerEvent>"]
Type-.->Interface1["ICloneable<AnimancerEvent.Sequence>"]
Type["AnimancerEvent.Sequence"]
class Type type-node
Syntax
public class AnimancerEvent.Sequence : IEnumerable<AnimancerEvent>,
ICloneable<AnimancerEvent.Sequence>
Remarks
Animancer Lite doesn't allow events (except for ) in runtime builds.
Documentation:
Animancer Events
Constructors
| Name | Summary |
|---|---|
| Sequence |
Creates a new Animancer.AnimancerEvent.Sequence which starts at 0 Animancer.AnimancerEvent.Sequence.Capacity.
Adding anything to the sequence will set the Animancer.AnimancerEvent.Sequence.Capacity = Animancer.AnimancerEvent.Sequence.DefaultCapacity
and then double it whenever the Animancer.AnimancerEvent.Sequence.Count would exceed the Animancer.AnimancerEvent.Sequence.Capacity.
|
| Sequence |
Creates a new Animancer.AnimancerEvent.Sequence and copies the contents of `copyFrom` into it. |
| Sequence |
[Pro-Only]
Creates a new Animancer.AnimancerEvent.Sequence which starts with the specified
Animancer.AnimancerEvent.Sequence.Capacity. It will be initially empty, but will have room for the
given number of elements before any reallocations are required.
|
Fields
| Name | Constant Value | Summary |
|---|---|---|
| DefaultCapacity | 4 |
The initial
Animancer.AnimancerEvent.Sequence.Capacity which will be used if another value is not specified.static
|
Properties
| Name | Value | Summary |
|---|---|---|
| Capacity | int |
[Pro-Only] The size of the internal array used to hold events.
|
| Count | int |
[Pro-Only] The number of events in this sequence, excluding the
Animancer.AnimancerEvent.Sequence.EndEvent. |
| EndEvent | AnimancerEvent |
A
Animancer.AnimancerEvent.callback which will be triggered every frame
after the Animancer.AnimancerEvent.normalizedTime has passed as long as the animation is playing.
|
| IsEmpty | bool |
Does this sequence have no events in it, including the
Animancer.AnimancerEvent.Sequence.EndEvent? |
| Names | StringReference[] |
The names of the events, excluding the
Animancer.AnimancerEvent.Sequence.EndEvent. |
| NormalizedEndTime | float |
Shorthand for
EndEvent.normalizedTime. |
| OnEnd | Action |
A callback which will be triggered every frame after the
Animancer.AnimancerEvent.normalizedTime has passed as long as the animation is playing.
|
| this[int] | AnimancerEvent |
[Pro-Only] Returns the event at the specified `index`.
|
| this[ |
AnimancerEvent |
[Pro-Only] Returns the event with the specified `name`.
|
| Version | int |
The number of times the contents of this sequence have been modified.
This applies to general events, but not the
Animancer.AnimancerEvent.Sequence.EndEvent.
|
Methods
| Name | Value | Summary |
|---|---|---|
| Add |
int |
[Pro-Only]
Adds the given event to this sequence. The
Animancer.AnimancerEvent.Sequence.Count is increased by one
and if required, the Animancer.AnimancerEvent.Sequence.Capacity is doubled to fit the new event.
|
| Add |
int |
[Pro-Only]
Adds the given event to this sequence. The
Animancer.AnimancerEvent.Sequence.Count is increased by one
and if required, the Animancer.AnimancerEvent.Sequence.Capacity is doubled to fit the new event.
|
| Add |
int |
[Pro-Only]
Adds the given event to this sequence. The
Animancer.AnimancerEvent.Sequence.Count is increased by one
and if required, the Animancer.AnimancerEvent.Sequence.Capacity is doubled to fit the new event.
|
| Add |
int |
[Pro-Only]
Adds the given event to this sequence. The
Animancer.AnimancerEvent.Sequence.Count is increased by one
and if required, the Animancer.AnimancerEvent.Sequence.Capacity is doubled to fit the new event.
|
| AddAllEvents |
void |
[Pro-Only]
Copies the
UnityEngine.AnimationClip.events into this Animancer.AnimancerEvent.Sequence.
|
| AddCallback |
void |
[Pro-Only] Adds the specified `callback` to the event at the specified `index`.
|
| AddCallback |
void |
[Pro-Only] Adds the specified `callback` to the event with the specified `name`.
|
| AddCallback |
Action |
[Pro-Only]
Adds the specified `callback` to the event at the specified `index`.
Animancer.AnimancerEvent.GetCurrentParameter``1 will be used to get the callback's parameter.
|
| AddCallback |
Action |
[Pro-Only]
Adds the specified `callback` to the event with the specified `name`.
Animancer.AnimancerEvent.GetCurrentParameter``1 will be used to get the callback's parameter.
|
| AddCallbacks |
int |
[Pro-Only]
Adds the specified `callback` to every event with the specified `name`
and returns the number of events that were found.
|
| AddCallbacks |
int |
[Pro-Only]
Adds the specified `callback` to every event with the specified `name`
and returns the number of events that were found.
Animancer.AnimancerEvent.GetCurrentParameter``1 will be used to get the callback's parameter.
|
| AddRange |
void |
[Pro-Only]
Adds every event in the `enumerable` to this sequence using
Animancer.AnimancerEvent.Sequence.Add(Animancer.AnimancerEvent).
|
| Clear |
void |
Removes all events, including the
Animancer.AnimancerEvent.Sequence.EndEvent. |
| Clone |
AnimancerEvent |
Creates a new
Animancer.AnimancerEvent.Sequence and copies the contents of this into it. |
| Clone |
AnimancerEvent |
Creates a new object with the same type and values this.
|
| CopyFrom |
void | |
| DeepToString |
string |
Returns a string containing the details of all events in this sequence.
|
| Get |
float |
The default
Animancer.AnimancerEvent.normalizedTime for an Animancer.AnimancerEvent.Sequence.EndEvent
when playing forwards is 1 (the end of the animation)
and when playing backwards is 0 (the start of the animation).
`speed` 0 or System.Single.NaN will also return 1.
static
|
| Get |
float |
The default
Animancer.AnimancerState.NormalizedTime for an animation to start
at when playing forwards is 0 (the start of the animation)
and when playing backwards is 1 (the end of the animation).
`speed` 0 or System.Single.NaN will also return 0.
static
|
| GetEnumerator |
FastEnumerator |
[Pro-Only]
Returns a
Animancer.FastEnumerator`1 for the events in this sequence,
excluding the Animancer.AnimancerEvent.Sequence.EndEvent.
|
| GetName |
StringReference |
Returns the name of the event at the specified `index`
or
null if it's outside of the Animancer.AnimancerEvent.Sequence.Names array.
|
| Get |
float |
Returns the `normalizedStartTime` if it isn't
System.Single.NaN,
otherwise calls Animancer.AnimancerEvent.Sequence.GetDefaultNormalizedStartTime(System.Single).
static
|
| Get |
float |
Returns the
Animancer.AnimancerEvent.Sequence.NormalizedEndTime but converts System.Single.NaN
to its corresponding default value: positive speed ends at 1 and negative speed ends at 0.
|
| IndexOf |
int |
[Pro-Only] Returns the index of the `animancerEvent` or
-1 if there is no such event. |
| IndexOf |
int |
[Pro-Only] Returns the index of the `animancerEvent` or
-1 if there is no such event. |
| IndexOf |
int |
Returns the index of the first event with the specified `name`
or
-1 if there is no such event.
|
| IndexOfRequired |
int |
[Pro-Only] Returns the index of the `animancerEvent`.
|
| IndexOfRequired |
int |
[Pro-Only] Returns the index of the `animancerEvent`.
|
| IndexOfRequired |
int |
Returns the index of the first event with the specified `name`.
|
| Remove |
bool |
[Pro-Only]
Removes the `animancerEvent` from this sequence by decrementing the
Animancer.AnimancerEvent.Sequence.Count and copying all events after the removed one down one place.
Returns true if the event was found and removed.
|
| Remove |
void |
[Pro-Only]
Removes the event at the specified `index` from this sequence by decrementing the
Animancer.AnimancerEvent.Sequence.Count and copying all events after the removed one down one place.
|
| Remove |
bool |
[Pro-Only]
Removes the event with the specified `name` from this sequence by decrementing the
Animancer.AnimancerEvent.Sequence.Count and copying all events after the removed one down one place.
Returns true if the event was found and removed.
|
| RemoveCallback |
void |
[Pro-Only] Removes the specified `callback` from the event at the specified `index`.
|
| RemoveCallback |
void |
[Pro-Only] Removes the specified `callback` from the event with the specified `name`.
|
| RemoveCallbacks |
int |
[Pro-Only]
Removes the specified `callback` from every event with the specified `name`
and returns the number of events that were found.
|
| SetCallback |
void |
[Pro-Only] Replaces the
Animancer.AnimancerEvent.callback of the event at the specified `index`. |
| SetCallback |
void |
[Pro-Only] Replaces the
Animancer.AnimancerEvent.callback of the event with the specified `name`. |
| SetCallbacks |
int |
[Pro-Only]
Replaces the
Animancer.AnimancerEvent.callback of every event with the specified `name`
and returns the number of events that were found.
|
| SetName |
void |
Sets the name of the event at the specified `index`.
|
| SetNormalizedTime |
int |
[Pro-Only] Sets the
Animancer.AnimancerEvent.normalizedTime of the matching `animancerEvent`. |
| SetNormalizedTime |
int |
[Pro-Only] Sets the
Animancer.AnimancerEvent.normalizedTime of the event at the specified `index`. |
| SetNormalizedTime |
int |
[Pro-Only] Sets the
Animancer.AnimancerEvent.normalizedTime of the event with the specified `name`. |