1234567891011121314151617181920212223242526272829303132333435363738 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- /// <summary>
- /// 实现消息的实体
- /// </summary>
- public class EventData
- {
- public EventID ID;
- public EventData(EventID id)
- {
- this.ID = id;
- }
- public void Send()
- {
- if (EventManager.Instance != null) EventManager.Instance.SendEvent(this);
- }
- public static EventData CreateEvent(EventID eventid)
- {
- EventData data = new EventData(eventid);
- return data;
- }
- }
- public class EventData1 : EventData
- {
- public GameObject SelectObj;
- public EventData1(EventID id, GameObject obj) : base(id)
- {
- ID = id;
- SelectObj = obj;
- }
- }
|