TimeLine Class

Summary

The TimeLine holding the TimeStone's data for its TimeAgents
graph BT Type-->Base0["object"] Type["TimeLine"] class Type type-node

Syntax

public class TimeLine

Fields

Name Constant Value Summary
TickDeltaTimeDataId DeltaTime
The DeltaTime id to persist the tick in the timeline
static
tickGuid
The id to persist the tick data in the timeline. The first data in the timeline is always the tick delta times.
static
TimeLineData
The data, ordered in a Dictionary by the hash (TimeAgent.guid + dataId) to optimize the performances. Then each entry contains the ordered list of data for each tick. Data will be stored this way (pseudo-code) : Dictionary [hashForTickDeltaTimes] = [ {Value=0, DeltaTime=0, origin=Record, Type=float}, {Value=0.005, DeltaTime=0.005, origin=Record, Type=float}, {Value=0.005, DeltaTime=0.005, origin=Record, Type=float} ] [hashForComponent1Position] = [ {Value={1,0,1}, DeltaTime=0, origin=Record, Type=Vector3}, {Value=1,1,1, DeltaTime=0.005, origin=Record, Type=Vector3}, {Value=1,2,1, DeltaTime=0.005, origin=Record, Type=Vector3} ] [hashForComponent2Position] = [...]

Methods

Name Value Summary
Clear() void
Clear the data
GetClosestDataAtTime<T>(float, Guid, string) TimeLine.TimeData<T>
Get the closest Data at given time
GetClosestTickIndexAtTime(float) int
Get the closest tick for a given time.
GetDataAt<T>(int, Guid, string, bool) TimeLine.TimeData<T>
Returns the data persisted at index for the timeAgent
GetTickCount() int
The TimeLine's tick count
GetTimeAtTickIndex(int) float
Get the time corresponding to a tick
PersistTimeDataAt<T>(int, Guid, string, float, T, TimeStone.TimeTickOrigin, TimeStone.TimeLineAddTickBehaviour) void
Persist new TimeData in the TimeLine.
Remove(int, int) void
Remove ticks from tickFrom to tickTo