Browse Source

Refactored FungusState to use IFungusState interface

master
Christopher 8 years ago
parent
commit
aa66d50f37
  1. 5
      Assets/Fungus/Flowchart/Scripts/FungusState.cs
  2. 17
      Assets/Tests/Lua/IFungusState.cs
  3. 12
      Assets/Tests/Lua/IFungusState.cs.meta

5
Assets/Fungus/Flowchart/Scripts/FungusState.cs

@ -13,6 +13,11 @@ namespace Fungus
public class FungusState : MonoBehaviour
{
[SerializeField] protected Flowchart selectedFlowchart;
#region IFungusState implementation
public virtual Flowchart SelectedFlowchart { get { return selectedFlowchart; } set { selectedFlowchart = value; } }
#endregion
}
}

17
Assets/Tests/Lua/IFungusState.cs

@ -0,0 +1,17 @@
using UnityEngine;
using System.Collections;
namespace Fungus
{
/// <summary>
/// Used by the Flowchart window to serialize the currently active Flowchart object
/// so that the same Flowchart can be displayed while editing & playing.
/// </summary>
public interface IFungusState
{
/// <summary>
/// The currently selected Flowchart.
/// </summary>
Flowchart SelectedFlowchart { get; set; }
}
}

12
Assets/Tests/Lua/IFungusState.cs.meta

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 36cb688eedcc4436780e68405a4ba494
timeCreated: 1474015940
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Loading…
Cancel
Save