2020-03-08 13:24:46 +01:00
|
|
|
using UnityEngine;
|
|
|
|
using UnityAtoms.BaseAtoms;
|
|
|
|
|
|
|
|
namespace UnityAtoms.FSM
|
|
|
|
{
|
|
|
|
[EditorIcon("atom-icon-hotpink")]
|
2020-03-09 00:16:40 +01:00
|
|
|
[AddComponentMenu("Unity Atoms/FSM/Finite State Machine Instancer")]
|
|
|
|
public class FiniteStateMachineInstancer : AtomVariableInstancer<
|
2020-03-08 13:24:46 +01:00
|
|
|
FiniteStateMachine,
|
|
|
|
StringPair,
|
|
|
|
string,
|
|
|
|
StringEvent,
|
|
|
|
StringPairEvent,
|
|
|
|
StringStringFunction,
|
|
|
|
AtomCollection,
|
|
|
|
AtomList>
|
|
|
|
{
|
|
|
|
protected override void ImplSpecificSetup()
|
|
|
|
{
|
|
|
|
if (_base.TransitionStarted != null)
|
|
|
|
{
|
|
|
|
_inMemoryCopy.TransitionStarted = Instantiate(_base.TransitionStarted);
|
|
|
|
}
|
|
|
|
if (_base.CompleteCurrentTransition != null)
|
|
|
|
{
|
|
|
|
_inMemoryCopy.CompleteCurrentTransition = Instantiate(_base.CompleteCurrentTransition);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|