Browse Source

Refactored FungusLua comments

master
Christopher 9 years ago
parent
commit
83bc89c1ab
  1. 16
      Assets/Fungus/Thirdparty/FungusLua/Scripts/ExecuteHandler.cs
  2. 1
      Assets/Fungus/Thirdparty/FungusLua/Scripts/FungusPrefs.cs
  3. 1
      Assets/Fungus/Thirdparty/FungusLua/Scripts/InfoText.cs
  4. 5
      Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaBindings.cs
  5. 5
      Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaEnvironment.cs
  6. 9
      Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaScript.cs
  7. 5
      Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaStore.cs
  8. 9
      Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaUtils.cs
  9. 3
      Assets/Fungus/Thirdparty/FungusLua/Scripts/PODTypeFactory.cs
  10. 11
      Assets/Fungus/Thirdparty/FungusLua/Scripts/StringSubstituter.cs

16
Assets/Fungus/Thirdparty/FungusLua/Scripts/ExecuteHandler.cs vendored

@ -8,18 +8,15 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using UnityEngine;
using MoonSharp.Interpreter;
using Debug = UnityEngine.Debug;
using Object = UnityEngine.Object;
namespace Fungus
{
[Serializable]
/// <summary>
/// Executes an LuaScript component in the same gameobject when a condition occurs.
/// </summary>
public class ExecuteHandler : MonoBehaviour, IExecuteHandlerConfigurator
{
[Flags]
@ -53,33 +50,26 @@ namespace Fungus
}
[SerializeField] protected float executeAfterTime = 1f;
public float ExecuteAfterTime { get { return executeAfterTime; } set { executeAfterTime = value; } }
[SerializeField] protected bool repeatExecuteTime = true;
public bool RepeatExecuteTime { get { return repeatExecuteTime; } set { repeatExecuteTime = value; } }
[SerializeField] protected float repeatEveryTime = 1f;
public float RepeatEveryTime { get { return repeatEveryTime; } set { repeatEveryTime = value; } }
[SerializeField] protected int executeAfterFrames = 1;
public int ExecuteAfterFrames { get { return executeAfterFrames; } set { executeAfterFrames = value; } }
[SerializeField] protected bool repeatExecuteFrame = true;
public bool RepeatExecuteFrame { get { return repeatExecuteFrame; } set { repeatExecuteFrame = value; } }
[SerializeField] protected int repeatEveryFrame = 1;
public int RepeatEveryFrame { get { return repeatEveryFrame; } set { repeatEveryFrame = value; } }
[SerializeField] protected bool hasFailed;
[SerializeField] protected ExecuteMethod executeMethods = ExecuteMethod.Start;
public ExecuteMethod ExecuteMethods { get { return executeMethods; } set { executeMethods = value; } }
[Tooltip("Name of the method on a component in this gameobject to call when executing.")]

1
Assets/Fungus/Thirdparty/FungusLua/Scripts/FungusPrefs.cs vendored

@ -4,7 +4,6 @@
*/
using UnityEngine;
using System.Collections;
namespace Fungus
{

1
Assets/Fungus/Thirdparty/FungusLua/Scripts/InfoText.cs vendored

@ -4,7 +4,6 @@
*/
using UnityEngine;
using System.Collections;
namespace Fungus
{

5
Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaBindings.cs vendored

@ -5,15 +5,11 @@
using UnityEngine;
using System;
using System.Reflection;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using MoonSharp.Interpreter;
namespace Fungus
{
/// <summary>
/// Base class for a component which registers Lua Bindings.
/// When the Lua Environment initialises, it finds all components in the scene that inherit
@ -178,5 +174,4 @@ namespace Fungus
}
}
}
}

5
Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaEnvironment.cs vendored

@ -9,14 +9,15 @@ using System.Collections.Generic;
using System;
using System.Linq;
using System.Diagnostics;
using System.Text.RegularExpressions;
using MoonSharp.Interpreter;
using MoonSharp.Interpreter.Interop;
using MoonSharp.Interpreter.Loaders;
using MoonSharp.RemoteDebugger;
namespace Fungus
{
/// <summary>
/// Wrapper for a MoonSharp Lua Script instance.
/// </summary>
public class LuaEnvironment : MonoBehaviour
{
/// <summary>

9
Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaScript.cs vendored

@ -6,11 +6,6 @@
// Adapted from the Unity Test Tools project (MIT license)
// https://bitbucket.org/Unity-Technologies/unitytesttools/src/a30d562427e9/Assets/UnityTestTools/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using UnityEngine;
using MoonSharp.Interpreter;
using Debug = UnityEngine.Debug;
@ -18,7 +13,9 @@ using Object = UnityEngine.Object;
namespace Fungus
{
/// <summary>
/// Executes Lua script defined in a string property or in an external file.
/// </summary>
public class LuaScript : MonoBehaviour
{
/// <summary>

5
Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaStore.cs vendored

@ -4,14 +4,10 @@
*/
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using MoonSharp.Interpreter;
using MoonSharp.Interpreter.Serialization;
namespace Fungus
{
/// <summary>
/// Wrapper for a prime Lua table that persists across scene loads.
/// This is useful for transferring values from one scene to another. One one LuaStore component may exist
@ -105,5 +101,4 @@ namespace Fungus
}
}
}
}

9
Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaUtils.cs vendored

@ -9,16 +9,14 @@ using System.Collections.Generic;
using System;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Text.RegularExpressions;
using MoonSharp.Interpreter;
using MoonSharp.Interpreter.Interop;
using MoonSharp.Interpreter.Loaders;
using MoonSharp.RemoteDebugger;
namespace Fungus
{
/// <summary>
/// A collection of utilites to use in Lua for common Unity / Fungus tasks.
/// </summary>
public class LuaUtils : LuaEnvironment.Initializer, StringSubstituter.ISubstitutionHandler
{
public enum FungusModuleOptions
@ -496,5 +494,4 @@ namespace Fungus
SayDialog.activeSayDialog = sayDialog;
}
}
}

3
Assets/Fungus/Thirdparty/FungusLua/Scripts/PODTypeFactory.cs vendored

@ -4,11 +4,9 @@
*/
using UnityEngine;
using System.Collections;
namespace Fungus
{
/// <summary>
/// Factory class to create new instances of common POD value types used by Unity.
/// Supports the same types as the SerializedProperty class: Color, Vector2, Vector3, Vector4, Quaternion & Rect.
@ -85,5 +83,4 @@ namespace Fungus
return new Rect(x,y,width, height);
}
}
}

11
Assets/Fungus/Thirdparty/FungusLua/Scripts/StringSubstituter.cs vendored

@ -4,7 +4,6 @@
*/
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@ -32,10 +31,10 @@ namespace Fungus
protected List<ISubstitutionHandler> substitutionHandlers = new List<ISubstitutionHandler>();
/**
* The StringBuilder instance used to substitute strings optimally.
* This property is public to support client code optimisations.
*/
/// <summary>
/// The StringBuilder instance used to substitute strings optimally.
/// This property is public to support client code optimisations.
/// </summary>
protected StringBuilder stringBuilder;
public StringBuilder _StringBuilder { get { return stringBuilder; } }
@ -124,7 +123,5 @@ namespace Fungus
return result;
}
}
}
Loading…
Cancel
Save