public void AddZoneScriptEvent(int idx, LuaEngine.EZoneCallbacks ev) { string assetName = "zone_" + idx; DiagManager.Instance.LogInfo(String.Format("Zone.AddZoneScriptEvent(): Added event {0} to zone {1}!", ev.ToString(), assetName)); ScriptEvents[ev] = new ScriptEvent(LuaEngine.MakeZoneScriptCallbackName(assetName, ev)); }
public IEnumerator <YieldInstruction> RunScriptEvent(LuaEngine.EZoneCallbacks ev, params object[] parms) { if (ScriptEvents.ContainsKey(ev)) { yield return(CoroutineManager.Instance.StartCoroutine(ScriptEvents[ev].Apply(parms))); } }
public void RemoveZoneScriptEvent(int idx, LuaEngine.EZoneCallbacks ev) { string assetName = "zone_" + idx; DiagManager.Instance.LogInfo(String.Format("Zone.RemoveZoneScriptEvent(): Removed event {0} from zone {1}!", ev.ToString(), assetName)); if (ScriptEvents.ContainsKey(ev)) { ScriptEvents.Remove(ev); } }