using AX.InputSystem; using AX.MessageSystem; using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class OnDragAlongWindCheck : ObjDrag { public override void ObjDragExitExecute(IMessage obj) { if (SelectedObjs.selectedObj!=gameObject) { return; } var data = (ObjDragCmdArgs)obj.Data; prevPos = data.mousePosition; dragStart = data.dragStart; var gameObjID = (long)obj.Sender; hitObj = EntitiesManager.Instance.GetEntityByID(gameObjID); DragData dragdata = new DragData() { name = gameObject.name, postion = transform.position }; AddRecordEventDrag(RecordEventType.ObjDragExit, dragdata); checkAlongWind(); } private void checkAlongWind() { if (ReplaySetting.PlayStatus != PlayStatus.isReplay) { int count = AlongWindCheck.CheckPos(transform.position); if (count > 0) { ResourceLoadWindow.Instance.LoadTextHintWindow("未设置在上风向或侧风向", 2); AddRecordAlongWindPosTipEvent(); } } } private void AddRecordAlongWindPosTipEvent() { if (ReplaySetting.PlayStatus == PlayStatus.isEditor && RecordManager.Instance.recordStatus == RecordStatus.normal) { var eventData = new EventData(); eventData.time = RecordManager.Instance.RecordTimer; eventData.cloneObjType = GetComponent().gameObjType; eventData.eventType = RecordEventType.AlongWindTip; var data = new CautionAreaTipData(); data.gameObjID = GetComponent().gameObjID; string json = JsonUtility.ToJson(data); eventData.json = json; RecordManager.Instance.jsonData.eventDataList.Add(eventData); } } }