SnapshotDebugger

Simple implementation of a time-travel debugger that takes snapshots of the states at each frame in order to be able to restore the state of the timeline.

Constructors

Link copied to clipboard
constructor(timeline: Timeline)

Types

Link copied to clipboard
data class GraphState(val behaviorValues: Map<BehaviorID, Any?>, val nodeValues: Map<NodeID, Any?>, val children: Map<NodeID, Collection<NodeID>>)

Data structure to hold on to a "snapshot" of the current state of the timeline so that previous states can be restored.

Properties

Functions

Link copied to clipboard
open override fun nextState()

Reset to the next frame.

Link copied to clipboard
open override fun persistState()

Persist the state of the current frame.

Link copied to clipboard
open override fun resetState(frame: Long)

Reset the state to the given frame.

Link copied to clipboard
open override fun rollbackState()

Rollback to the previous frame.