using CodeStage.AntiCheat.ObscuredTypes; using System; using System.Collections.Generic; using UnityEngine; using Random = UnityEngine.Random; public class MapData : MonoBehaviour { public Material material_skybox; public GameObject[] gos_map; [SerializeField] public List m_MapZoneData; void Start() { RenderSettings.skybox = material_skybox; RenderSettings.ambientMode = UnityEngine.Rendering.AmbientMode.Trilight; RenderSettings.ambientSkyColor = Color.gray; RenderSettings.ambientEquatorColor = new Color32(180, 148, 123, 255); RenderSettings.ambientGroundColor = new Color32(79, 79, 115, 255); RenderSettings.fog = false; RenderSettings.reflectionIntensity = 0f; } public MapZoneData Get_MapZoneData(int index) { return m_MapZoneData[index]; } public void Set_MazeMap(int index) { DSUtil.InActivateGameObjects(gos_map, index); } public void Set_MazeNextPortal(int index, bool active) { var mzd = Get_MapZoneData(index); if (!DSUtil.CheckNull(mzd.go_mazeNextPortal)) mzd.go_mazeNextPortal.SetActive(active); } } [Serializable] public class MapZoneData { public GameObject go_portal; public GameObject go_reincarnation; public GameObject go_mazeNextPortal; public Transform tf_Farmer; public Transform[] tf_Obj; } public class ChoiceMapData { ObscuredInt _Difficult; public int n_Difficult { get { return _Difficult; } set { _Difficult = value; _Difficult.RandomizeCryptoKey(); } } ObscuredInt _MapID; public int n_MapID { get { return _MapID; } set { _MapID = value; _MapID.RandomizeCryptoKey(); } } ObscuredInt _PortalIndex; public int n_PortalIndex { get { return _PortalIndex; } set { _PortalIndex = value; _PortalIndex.RandomizeCryptoKey(); } } ObscuredInt _DungeonLv; public int n_DungeonLv { get { return _DungeonLv; } set { _DungeonLv = value; _DungeonLv.RandomizeCryptoKey(); } } public BattleMapConfigTableData Get_MapData() { return table_battlemapconfig.Ins.Get_Data(n_MapID); } public DungeonMapConfigTableData Get_DungeonMapData_orNull() { var mapData = Get_MapData(); return mapData.e_Dungeon == eDungeon.None ? null : table_dungeonmapconfig.Ins.Get_Data_orNull(mapData.e_Dungeon, n_DungeonLv); } public int Get_DungeonIndex() { var dgData = Get_DungeonMapData_orNull(); return DSUtil.CheckNull(dgData) ? 0 : MyEnumToInt.Ins.Get_Int(dgData.e_DungeonType) - 1; } public void Set_MazeMapIndex() { n_PortalIndex = Random.Range(0, table_GlobalValue.Ins.Get_Int("MazeMapCount")); } }