Commit e90413d5 authored by thatcosmonaut's avatar thatcosmonaut
Browse files

state method links in docs

parent 1643ea26
Loading
Loading
Loading
Loading
+20 −20
Original line number Diff line number Diff line
@@ -13,49 +13,49 @@ and callback functions to execute when states are entered, updated, or exited.
Methods
-------

* :func:`void Start() <Start>`
* :func:`void StartAt(State otherState) <State.StartAt>`
* :func:`void Reset() <State.Reset>`
* :func:`void Update(float deltaTime) <State.Update>`
* :func:`void FixedUpdate() <State.FixedUpdate>`
* :func:`Transition ChangeTo(State otherState) <State.ChangeTo>`
* :func:`Transition ChangeToSubState(State otherState) <State.ChangeToSubState>`
* :func:`void SendSignal(string signal) <State.SendSignal>`
* :func:`Transition OnTransitionTo(State otherState) <State.OnTransitionTo>`
* :func:`Transition ReplaceTransitionCondition(State otherState) <State.ReplaceTransitionCondition`
* :func:`Start() <Start>`
* :func:`StartAt(State otherState) <StartAt>`
* :func:`Reset() <Reset>`
* :func:`Update(float deltaTime) <Update>`
* :func:`FixedUpdate() <FixedUpdate>`
* :func:`ChangeTo(State otherState) <ChangeTo>`
* :func:`ChangeToSubState(State otherState) <ChangeToSubState>`
* :func:`SendSignal(string signal) <SendSignal>`
* :func:`OnTransitionTo(State otherState) <OnTransitionTo>`
* :func:`ReplaceTransitionCondition(State otherState) <ReplaceTransitionCondition`

Method Reference
------------------

.. function:: void Start()
.. function:: Start()

The final step in initializing the state machine. Should be called once and only
once on the root state before any updates are called.

.. function:: void StartAt(State subState)
.. function:: StartAt(State subState)

    :param State subState: The substate to begin at.

Sets the starting sub-state of a state. Essentially, you can think of this method
as creating a sub-level of the state.

.. function:: void Reset()
.. function:: Reset()

Resets a state to its starting sub-state.

.. function:: void Update(float deltaTime)
.. function:: Update(float deltaTime)

    :param float deltaTime: The change in time since the last call to Update.

Updates the state machine, checking for state transitions and updating timers.
Should only be called on the root state.

.. function:: void FixedUpdate()
.. function:: FixedUpdate()

A convenience method intended for Unity. Allows for the OnFixedUpdate callback
to be used. Should only be called on the root state.

.. function:: Transition ChangeTo(State otherState)
.. function:: ChangeTo(State otherState)

    :param State otherState: The state to create a `Transition` to.
    :returns: The `Transition` object between the two states.
@@ -85,7 +85,7 @@ and then it will emit dust particles.
For a complete list of transition conditions and callback methods please refer
to <transition>

.. function:: AnyStateTransition ChangeToSubState(State otherState)
.. function:: ChangeToSubState(State otherState)

    :param State otherState: The state to create an `AnyStateTransition` to.
    :returns: The `AnyStateTransition` to the substate.
@@ -118,14 +118,14 @@ Now, `redState`, `blueState`, `greenState`, and `yellowState` can all
transition between each other,
but we've narrowed this down to 4 transitions instead of 12. Nice!

.. function:: void SendSignal(string signal)
.. function:: SendSignal(string signal)

    :param string signal: The signal to send to the state.

For use with the `IfSignalCaught` transition condition.
This signal propagates recursively until a state with no substate is reached.

.. function:: Transition OnTransitionTo(State otherState)
.. function:: OnTransitionTo(State otherState)

    :param State otherState: The other state.
    :returns: The already existing `Transition` object between these two states.
@@ -144,7 +144,7 @@ behavior when inheriting classes that implement a state machine.

Jumping now emits 500 dust particles instead of 100!

.. function:: Transition ReplaceTransitionCondition(State otherState)
.. function:: ReplaceTransitionCondition(State otherState)

    :param State otherState: The other state.
    :returns: The already existing `Transition` object between these two states.