using AX.MessageSystem; using System.Collections; using System.Collections.Generic; using UnityEngine; public class ReplayHeadquater : ReplaySimpleObject { // Use this for initialization public override void Start () { base.Start(); MessageDispatcher.AddListener("ReplayEvent", ReplayTipEvent); } public override void OnDestroy() { base.OnDestroy(); MessageDispatcher.RemoveListener("ReplayEvent", ReplayTipEvent); } private void ReplayTipEvent(IMessage obj) { var eventData = (EventData)obj.Data; if (eventData.eventType == RecordEventType.AlongWindTip && eventData.cloneObjType ==CloneObjType.Headquarters) { ResourceLoadWindow.Instance.LoadTextHintWindow("指挥部未设置在上风向或侧风向", Mathf.Clamp((2 / GlobalVariable.ReplaySpeed), 1, 2)); } } public override void SetCloneGameObject(GameObject obj, string json) { obj.AddComponent(); //obj.AddComponent(); obj.AddComponent(); obj.AddComponent(); } }