using UnityEngine; using Games.Events; using System.Collections; using System.Collections.Generic; public class EventSenderInfo { public int _SendID; public bool _State; public List Events = new List(); } public class MovieEventSend : MonoBehaviour { public enum EventType { None, ChangeMesh, AddMesh, DoAction, StartTimeLine, Dissolve, ShowGameObj, HideGameObj, DestroyObj, } [System.Serializable] public class EventInfo { public EventType EventType; public int EveneID = -1; } public bool RemoveOnDisable = true; public bool SendOnAwake = false; public EventInfo[] Events; public void OnEnable() { if(SendOnAwake) Send(true); } public void OnDisable() { if(RemoveOnDisable) Send(false); } public void Send(bool state) { EventSenderInfo info = new EventSenderInfo(); info._SendID = gameObject.GetInstanceID(); info._State = state; for (int i=0;i