using ET; using UnityEngine; public static class RenderUtils { public static int MapHeight { get { var layer = BattleMgr.Instance.Layer; return layer == null ? 0 : layer.Data.Terrain.ZoneData.TotalHeight; } } private static UnityEngine.Vector3 vecTemp; public static UnityEngine.Vector3 UnityPosFromBattle(CommonLang.Geometry.Vector3 pos) { vecTemp.Set(pos.X, pos.Z, MapHeight - pos.Y); return vecTemp; } public static UnityEngine.Quaternion UnityRotationFromBattle(float rotation) { vecTemp.Set(0, rotation * Mathf.Rad2Deg + 90, 0); return Quaternion.Euler(vecTemp); } }