An easy to use Unity 3D library for creating illustrated Interactive Fiction games and more.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#if UNITY_EDITOR
|
|
|
|
using UnityEditor;
|
|
|
|
#endif
|
|
|
|
using UnityEngine;
|
|
|
|
using System;
|
|
|
|
using System.Collections;
|
|
|
|
using Fungus;
|
|
|
|
|
|
|
|
public class SequenceController : MonoBehaviour
|
|
|
|
{
|
|
|
|
public float stepTime;
|
|
|
|
|
|
|
|
public Sequence startSequence;
|
|
|
|
|
|
|
|
[System.NonSerialized]
|
|
|
|
public Sequence activeSequence;
|
|
|
|
|
|
|
|
public void Execute()
|
|
|
|
{
|
|
|
|
if (startSequence == null)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
ExecuteSequence(startSequence);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void ExecuteSequence(Sequence sequence)
|
|
|
|
{
|
|
|
|
if (sequence == null)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
#if UNITY_EDITOR
|
|
|
|
Selection.activeGameObject = sequence.gameObject;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
activeSequence = sequence;
|
|
|
|
sequence.ExecuteNextCommand();
|
|
|
|
}
|
|
|
|
}
|