Summary
A variable-size list of
Animancer.AnimancerEvent
s which keeps itself sorted according to their
Animancer.AnimancerEvent.normalizedTime
.
- Assembly
- Animancer
.dll - Namespace
- Animancer
- Interfaces
-
- IEnumerable
<AnimancerEvent> - ICopyable
<AnimancerEvent .Sequence >
- IEnumerable
- Base Types
-
- Object
graph BT
Type-->Base0["Object"]
Type-.->Interface0["IEnumerable<AnimancerEvent>"]
Type-.->Interface1["ICopyable<AnimancerEvent.Sequence>"]
Type["AnimancerEvent.Sequence"]
class Type type-node
Syntax
public class AnimancerEvent.Sequence : IEnumerable<AnimancerEvent>,
ICopyable<AnimancerEvent.Sequence>
Remarks
Animancer Lite does not 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 | 8 |
The initial
Animancer.AnimancerEvent.Sequence.Capacity that 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 that will be triggered every frame after the Animancer.AnimancerEvent.normalizedTime has
passed. If you want it to only get triggered once, you can either have the event clear itself or just
use a regular event instead.
|
IsEmpty | bool |
Indicates whether the sequence has any events in it (including the
Animancer.AnimancerEvent.Sequence.EndEvent ). |
Names | string[] |
[Pro-Only] The names of the events (excluding the
Animancer.AnimancerEvent.Sequence.EndEvent ). |
NormalizedEndTime | float |
[Pro-Only] Shorthand for
EndEvent.normalizedTime . |
OnEnd | Action |
Shorthand for the
EndEvent.callback . |
Should |
string |
[Assert-Only]
If this property is set, any attempt to modify this sequence will trigger
Animancer.OptionalWarning.LockedEvents (which will include this value in its message).
|
this[int] | AnimancerEvent |
[Pro-Only] Returns the event at the specified `index`.
|
this[string] | AnimancerEvent |
[Pro-Only] Returns the event with the specified `name`.
|
Version | int |
[Pro-Only]
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`.
|
AddRange |
void |
[Pro-Only]
Adds every event in the `enumerable` 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.
|
Assert |
void |
[Assert-Conditional]
Throws an
System.ArgumentOutOfRangeException if the Animancer.AnimancerEvent.normalizedTime of any events
is less than 0 or greater than or equal to 1.
This does not include the Animancer.AnimancerEvent.Sequence.EndEvent since it works differently to other events.
|
Assert |
void |
[Assert-Conditional]
Calls
Animancer.AnimancerEvent.Sequence.AssertNormalizedTimes(Animancer.AnimancerState) if `isLooping` is true.
|
Clear |
void |
Removes all events, including the
Animancer.AnimancerEvent.Sequence.EndEvent . |
ContentsAreEqual |
bool |
Are all events in this sequence identical to the ones in the `other` sequence?
|
CopyFrom |
void |
Copies the contents of `copyFrom` into this object, replacing its previous contents.
|
CopyTo |
void |
[
System.Collections.Generic.ICollection`1 ] [Pro-Only]
Copies all the events from this sequence into the `array`, starting at the `index`.
|
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 |
string |
[Pro-Only]
Returns the name of the event at the specified `index` or
null if it is outside of the
Animancer.AnimancerEvent.Sequence.Names array.
|
Get |
float |
[Pro-Only]
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 |
[Pro-Only]
Returns the index of the 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 |
[Pro-Only] Returns the index of the event with the specified `name`.
|
OnSequenceModified |
void |
[Assert-Conditional] Logs
Animancer.OptionalWarning.LockedEvents if necessary. |
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`.
|
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`. |
SetName |
void |
[Pro-Only]
Sets the name of the event at the specified `index`. If the
Animancer.AnimancerEvent.Sequence.Names did not previously
include that `index` it will be resized with a size equal to the Animancer.AnimancerEvent.Sequence.Count .
|
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`. |
Set |
void |
[Assert-Conditional]
Sets the
Animancer.AnimancerEvent.Sequence.ShouldNotModifyReason for Animancer.OptionalWarning.LockedEvents .
|