Browse Source

Merge pull request #420 from FungusGames/task-manager-namespace

Task manager namespace
master
Chris Gregan 9 years ago
parent
commit
95eb67a32e
  1. 2
      Assets/Fungus/FungusScript/Resources/Types/RegisterTypes.txt
  2. 6
      Assets/Fungus/FungusScript/Thirdparty/TaskManager/TaskManager.cs
  3. 7
      Assets/Tests/FungusScript/DummyCollection.cs

2
Assets/Fungus/FungusScript/Resources/Types/RegisterTypes.txt

@ -21,6 +21,7 @@ Fungus.PortraitState, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicK
Fungus.SayDialog, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null Fungus.SayDialog, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
Fungus.SpriteVariable, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null Fungus.SpriteVariable, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
Fungus.StringVariable, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null Fungus.StringVariable, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
Fungus.Task, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
Fungus.TextureVariable, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null Fungus.TextureVariable, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
Fungus.TransformVariable, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null Fungus.TransformVariable, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
Fungus.Variable, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null Fungus.Variable, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
@ -34,7 +35,6 @@ System.IntPtr, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c
System.Single, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Single, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Type, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Type, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.UInt32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.UInt32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Task, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
UnityEngine.AudioClip, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null UnityEngine.AudioClip, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
UnityEngine.AudioClipLoadType, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null UnityEngine.AudioClipLoadType, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
UnityEngine.AudioDataLoadState, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null UnityEngine.AudioDataLoadState, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null

6
Assets/Fungus/FungusScript/Thirdparty/TaskManager/TaskManager.cs vendored

@ -56,6 +56,10 @@
using UnityEngine; using UnityEngine;
using System.Collections; using System.Collections;
// Using the Fungus namespace to minimize conflicts with other assets.
namespace Fungus
{
/// A Task object represents a coroutine. Tasks can be started, paused, and stopped. /// A Task object represents a coroutine. Tasks can be started, paused, and stopped.
/// It is an error to attempt to start a task that has been stopped or which has /// It is an error to attempt to start a task that has been stopped or which has
/// naturally terminated. /// naturally terminated.
@ -212,3 +216,5 @@ class TaskManager : MonoBehaviour
return new TaskState(coroutine); return new TaskState(coroutine);
} }
} }
}

7
Assets/Tests/FungusScript/DummyCollection.cs

@ -1,6 +1,7 @@
using UnityEngine; using UnityEngine;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using MoonSharp.Interpreter;
namespace Fungus namespace Fungus
{ {
@ -10,6 +11,12 @@ namespace Fungus
public List<string> stringList = new List<string>(); public List<string> stringList = new List<string>();
public List<Sprite> spriteList = new List<Sprite>(); public List<Sprite> spriteList = new List<Sprite>();
void Awake()
{
// Register this type with MoonSharp
UserData.RegisterType(GetType());
}
} }
} }
Loading…
Cancel
Save