贺州人民医院电子沙盘
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

61 lines
1.9 KiB

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<CloneGameObjInfo>().gameObjType;
eventData.eventType = RecordEventType.AlongWindTip;
var data = new CautionAreaTipData();
data.gameObjID = GetComponent<CloneGameObjInfo>().gameObjID;
string json = JsonUtility.ToJson(data);
eventData.json = json;
RecordManager.Instance.jsonData.eventDataList.Add(eventData);
}
}
}