Class Channel<TValue>
Generic Channel implementation capable of storing keyframes of the given Type.
Inherited Members
Namespace: Fusee.Xirkit
Assembly: Fusee.Xirkit.dll
Syntax
public class Channel<TValue> : ChannelBase
Type Parameters
Name | Description |
---|---|
TValue | The type of keyframes' values that the channel should store. |
Constructors
Channel(Channel<TValue>.LerpFunc)
Initializes a new instance of the Channel<TValue> class. Adds the right Lerpfunction.
Declaration
public Channel(Channel<TValue>.LerpFunc lerpFunc)
Parameters
Type | Name | Description |
---|---|---|
Channel.LerpFunc<> | lerpFunc | The right lerpfunction. |
Channel(Channel<TValue>.LerpFunc, TValue)
Initializes a new instance of the Channel<TValue> class. Adds a Keyframe with a specific value and the right lerpFunction.
Declaration
public Channel(Channel<TValue>.LerpFunc lerpFunc, TValue value)
Parameters
Type | Name | Description |
---|---|---|
Channel.LerpFunc<> | lerpFunc | The right lerpfunction. |
TValue | value | The value of the firs keyframe. |
Channel(Channel<TValue>.SetChanelValue, Channel<TValue>.LerpFunc)
Initializes a new instance of the Channel<TValue> class. Adds one default Keyframe and the right Lerpfunction.
Declaration
public Channel(Channel<TValue>.SetChanelValue timeChanged, Channel<TValue>.LerpFunc lerpFunc)
Parameters
Type | Name | Description |
---|---|---|
Channel.SetChanelValue<> | timeChanged | The time changed. |
Channel.LerpFunc<> | lerpFunc | The lerp function. |
Properties
Duration
Retrieves the overall duration of this channel.
Declaration
public override float Duration { get; }
Property Value
Type | Description |
---|---|
System.Single |
Overrides
Value
Gets the last calculated value.
Declaration
public TValue Value { get; }
Property Value
Type | Description |
---|---|
TValue |
Methods
AddKeyframe(Keyframe<TValue>)
Adds a keyframe to this channel.
Declaration
public void AddKeyframe(Keyframe<TValue> keyframe)
Parameters
Type | Name | Description |
---|---|---|
Keyframe<TValue> | keyframe | The keyframe. |
AddKeyframe(Single, TValue)
Creates a new Keyframe and add's him to the channel.
Declaration
public void AddKeyframe(float time, TValue value)
Parameters
Type | Name | Description |
---|---|---|
System.Single | time | The time of the new keyframe. |
TValue | value | The value of the new keyframe. |
GetValueAt(Single)
Returns the value of a keyframe at a specific time.
Declaration
public TValue GetValueAt(float time)
Parameters
Type | Name | Description |
---|---|---|
System.Single | time | The time. |
Returns
Type | Description |
---|---|
TValue | The calculated value |
RemoveKeyframe(Single)
Removes a keyframe at a specific time (time = key).
Declaration
public void RemoveKeyframe(float time)
Parameters
Type | Name | Description |
---|---|---|
System.Single | time | The time of the keyframe that has to be removed. |
SetTick(Single)
Increments the current time and advances between the best fitting keyframes.
Declaration
public override void SetTick(float time)
Parameters
Type | Name | Description |
---|---|---|
System.Single | time | The time to advance this channel about. |
Overrides
Events
TimeChanged
Occurs when the channel time changed.
Declaration
public event Channel<TValue>.SetChanelValue TimeChanged
Event Type
Type | Description |
---|---|
Channel.SetChanelValue<> |