Created
March 31, 2016 05:47
-
-
Save g0ldPRO/cd442d068257081ae13fc07a9629c92e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using UnityEngine; | |
[RequireComponent(typeof(MeshFilter)), RequireComponent(typeof(MeshRenderer))] | |
public class MapCreator : MonoBehaviour | |
{ | |
public GameObject LadderTop; | |
public GameObject LadderTop2; | |
public MapHandler MH; | |
public GameObject LightHousePrefab; | |
public GameObject LightHousePrefab1; | |
public GameObject Leaves; | |
private GameObject[] TileMaker; | |
public GameObject TileMakerPrefab; | |
private static int Animations = 147; | |
private GameObject[] AniWaterLayer = new GameObject[MapCreator.Animations * 4]; | |
public GameObject[] AniWaterPrefab; | |
public GameObject[] Turbines; | |
public GameObject[] EnviromentalSounds; | |
public GameObject[] StairPrefab; | |
public GameObject TreePrefab; | |
public GameObject RockPrefab; | |
public GameObject LinkPrefab; | |
public GameObject AniDoorPrefab; | |
public GameObject AniDoubleDoorPrefab; | |
public GameObject StoreDoor; | |
public GameObject GymDoor; | |
public GameObject GameLight; | |
public GameObject Lab1; | |
public GameObject Lab2; | |
public GameObject FireLight; | |
public GameObject PokeFloor; | |
public GameObject EffectLight; | |
public GameObject[] Lights; | |
public GameObject PokeCenterLight; | |
public GameObject SkullLight1; | |
public GameObject SkullLight2; | |
public GameObject TowerFog; | |
public GameObject SandStorm; | |
public int Width; | |
public int Height; | |
public bool outside; | |
public string Song; | |
public int[,] Tiles; | |
public int[,] Tiles2; | |
public int[,] Tiles3; | |
public int[,] Tiles4; | |
public int[,] Colliders; | |
public int[,] Links; | |
public string mapName; | |
public int dimensionY; | |
public int dimensionX; | |
public int a; | |
public bool loading; | |
public bool dark; | |
public string MapWeather; | |
public float OverLap = 0.0001f; | |
private DSSock Socket; | |
private LoadGame Loader; | |
public string region; | |
public string npcString = string.Empty; | |
private byte Quality; | |
public UILabel MapLabel; | |
public List<Vector3>[] newVertices; | |
public List<int>[] newTriangles; | |
public List<Vector2>[] newUV; | |
public List<Vector3>[] newVertices2; | |
public List<int>[] newTriangles2; | |
public List<Vector2>[] newUV2; | |
public List<Vector3>[] newVertices3; | |
public List<int>[] newTriangles3; | |
public List<Vector2>[] newUV3; | |
public List<Vector3>[] newVertices4; | |
public List<int>[] newTriangles4; | |
public List<Vector2>[] newUV4; | |
public int[] newCount1; | |
public int[] newCount2; | |
public int[] newCount3; | |
public int[] newCount4; | |
private Mesh mesh; | |
private void Start() | |
{ | |
this.Socket = GameObject.Find("Socket").GetComponent<DSSock>(); | |
if (GameObject.Find("GameLoader")) | |
{ | |
this.Loader = GameObject.Find("GameLoader").GetComponent<LoadGame>(); | |
if (!this.Loader.Bundle) | |
{ | |
this.Socket.con.Add("PRO> Using Local Resources."); | |
} | |
else | |
{ | |
this.Socket.con.Add("PRO> Using Bundled Resources."); | |
} | |
} | |
} | |
public void DestroyMap() | |
{ | |
GameObject[] array = GameObject.FindGameObjectsWithTag("Tile"); | |
GameObject[] array2 = array; | |
for (int i = 0; i < array2.Length; i++) | |
{ | |
GameObject obj = array2[i]; | |
UnityEngine.Object.Destroy(obj); | |
} | |
} | |
public void loadMap() | |
{ | |
if (PlayerPrefs.GetInt("LightQuality", 1) == 1) | |
{ | |
this.EffectLight = this.Lights[0]; | |
this.Quality = 1; | |
} | |
else | |
{ | |
this.EffectLight = this.Lights[1]; | |
this.Quality = 2; | |
} | |
this.Leaves.SetActive(false); | |
this.dark = false; | |
this.loading = true; | |
this.DestroyMap(); | |
this.outside = true; | |
this.npcString = string.Empty; | |
TextAsset textAsset; | |
if (!this.Loader) | |
{ | |
textAsset = (Resources.Load("Maps/" + this.mapName) as TextAsset); | |
} | |
else if (this.Loader.Bundle) | |
{ | |
textAsset = (this.Loader.Bundle.LoadAsset(this.mapName) as TextAsset); | |
} | |
else | |
{ | |
textAsset = (Resources.Load("Maps/" + this.mapName) as TextAsset); | |
} | |
Stream input = new MemoryStream(textAsset.bytes); | |
BinaryReader binaryReader = new BinaryReader(input); | |
if (binaryReader.PeekChar() != -1) | |
{ | |
if (binaryReader.ReadInt16() == 2) | |
{ | |
int num = binaryReader.ReadInt32(); | |
binaryReader.ReadInt32(); | |
int num2 = binaryReader.ReadInt32(); | |
binaryReader.ReadInt32(); | |
this.dimensionY = num; | |
this.dimensionX = num2; | |
this.Width = num2 - 1; | |
this.Height = num - 1; | |
this.Colliders = new int[this.dimensionX, this.dimensionY]; | |
this.Links = new int[this.dimensionX, this.dimensionY]; | |
for (int i = 0; i < this.dimensionY; i++) | |
{ | |
for (int j = 0; j < this.dimensionX; j++) | |
{ | |
this.Colliders[j, i] = (int)binaryReader.ReadInt16(); | |
} | |
} | |
} | |
if (binaryReader.ReadInt16() == 2) | |
{ | |
int num = binaryReader.ReadInt32(); | |
binaryReader.ReadInt32(); | |
int num2 = binaryReader.ReadInt32(); | |
binaryReader.ReadInt32(); | |
this.dimensionY = num; | |
this.dimensionX = num2; | |
this.Tiles = new int[this.dimensionX, this.dimensionY]; | |
for (int i = 0; i < this.dimensionY; i++) | |
{ | |
for (int j = 0; j < this.dimensionX; j++) | |
{ | |
this.Tiles[j, i] = (int)binaryReader.ReadInt16(); | |
if (this.Tiles[j, i] < 0) | |
{ | |
this.Tiles[j, i] = -this.Tiles[j, i] + 32767; | |
} | |
} | |
} | |
} | |
if (binaryReader.ReadInt16() == 2) | |
{ | |
int num = binaryReader.ReadInt32(); | |
binaryReader.ReadInt32(); | |
int num2 = binaryReader.ReadInt32(); | |
binaryReader.ReadInt32(); | |
this.dimensionY = num; | |
this.dimensionX = num2; | |
this.Tiles2 = new int[this.dimensionX, this.dimensionY]; | |
for (int i = 0; i < this.dimensionY; i++) | |
{ | |
for (int j = 0; j < this.dimensionX; j++) | |
{ | |
this.Tiles2[j, i] = (int)binaryReader.ReadInt16(); | |
if (this.Tiles2[j, i] < 0) | |
{ | |
this.Tiles2[j, i] = -this.Tiles2[j, i] + 32767; | |
} | |
} | |
} | |
} | |
if (binaryReader.ReadInt16() == 2) | |
{ | |
int num = binaryReader.ReadInt32(); | |
binaryReader.ReadInt32(); | |
int num2 = binaryReader.ReadInt32(); | |
binaryReader.ReadInt32(); | |
this.dimensionY = num; | |
this.dimensionX = num2; | |
this.Tiles3 = new int[this.dimensionX, this.dimensionY]; | |
for (int i = 0; i < this.dimensionY; i++) | |
{ | |
for (int j = 0; j < this.dimensionX; j++) | |
{ | |
this.Tiles3[j, i] = (int)binaryReader.ReadInt16(); | |
if (this.Tiles3[j, i] < 0) | |
{ | |
this.Tiles3[j, i] = -this.Tiles3[j, i] + 32767; | |
} | |
} | |
} | |
} | |
if (binaryReader.ReadInt16() == 2) | |
{ | |
int num = binaryReader.ReadInt32(); | |
binaryReader.ReadInt32(); | |
int num2 = binaryReader.ReadInt32(); | |
binaryReader.ReadInt32(); | |
this.dimensionY = num; | |
this.dimensionX = num2; | |
this.Tiles4 = new int[this.dimensionX, this.dimensionY]; | |
for (int i = 0; i < this.dimensionY; i++) | |
{ | |
for (int j = 0; j < this.dimensionX; j++) | |
{ | |
this.Tiles4[j, i] = (int)binaryReader.ReadInt16(); | |
if (this.Tiles4[j, i] < 0) | |
{ | |
this.Tiles4[j, i] = -this.Tiles4[j, i] + 32767; | |
} | |
} | |
} | |
} | |
int count = (int)binaryReader.ReadInt16(); | |
this.MapWeather = new string(binaryReader.ReadChars(count)); | |
if (this.MapWeather != "None" && this.MapWeather != "Rain" && this.MapWeather != "Snow" && this.MapWeather != "Tower Fog" && this.MapWeather != "Sandstorm" && this.MapWeather != "Drought" && this.MapWeather != "FlashDark" && this.MapWeather != "Leaves") | |
{ | |
this.MapWeather = "None"; | |
} | |
if (this.MapWeather != "None") | |
{ | |
this.Socket.Rain.SetActive(false); | |
this.Socket.Snow.SetActive(false); | |
this.Socket.Draught.SetActive(false); | |
this.SandStorm.SetActive(false); | |
} | |
binaryReader.ReadInt16(); | |
binaryReader.ReadInt16(); | |
if (binaryReader.ReadByte() == 0) | |
{ | |
this.outside = false; | |
} | |
count = (int)binaryReader.ReadInt16(); | |
this.region = new string(binaryReader.ReadChars(count)); | |
binaryReader.ReadInt16(); | |
int num3 = (int)(binaryReader.ReadInt16() - 1); | |
binaryReader.ReadInt16(); | |
binaryReader.ReadInt16(); | |
binaryReader.ReadInt16(); | |
binaryReader.ReadInt16(); | |
binaryReader.ReadInt16(); | |
binaryReader.ReadInt16(); | |
binaryReader.ReadInt16(); | |
binaryReader.ReadInt16(); | |
for (int k = 0; k < num3; k++) | |
{ | |
count = (int)binaryReader.ReadInt16(); | |
binaryReader.ReadChars(count); | |
this.Links[(int)binaryReader.ReadInt16(), (int)binaryReader.ReadInt16()] = 1; | |
binaryReader.ReadInt16(); | |
binaryReader.ReadInt16(); | |
} | |
binaryReader.ReadInt16(); | |
int num4 = (int)(binaryReader.ReadInt16() - 1); | |
for (int l = 0; l < 45; l++) | |
{ | |
binaryReader.ReadInt16(); | |
} | |
for (int m = 0; m < num4; m++) | |
{ | |
count = (int)binaryReader.ReadInt16(); | |
string str = new string(binaryReader.ReadChars(count)); | |
this.npcString = this.npcString + this.mapName + "|"; | |
this.npcString = this.npcString + binaryReader.ReadInt16().ToString() + "|"; | |
this.npcString = this.npcString + binaryReader.ReadInt16().ToString() + "|"; | |
this.npcString = this.npcString + binaryReader.ReadByte().ToString() + "|"; | |
byte b = binaryReader.ReadByte(); | |
this.npcString = this.npcString + binaryReader.ReadInt16().ToString() + "|"; | |
this.npcString = this.npcString + str + "|"; | |
count = (int)binaryReader.ReadInt16(); | |
binaryReader.ReadChars(count); | |
count = (int)binaryReader.ReadInt16(); | |
string str2 = new string(binaryReader.ReadChars(count)); | |
binaryReader.ReadInt16(); | |
binaryReader.ReadInt16(); | |
binaryReader.ReadInt16(); | |
binaryReader.ReadInt16(); | |
binaryReader.ReadInt16(); | |
binaryReader.ReadInt16(); | |
binaryReader.ReadInt16(); | |
binaryReader.ReadInt16(); | |
binaryReader.ReadInt16(); | |
binaryReader.ReadInt16(); | |
binaryReader.ReadInt16(); | |
binaryReader.ReadInt16(); | |
binaryReader.ReadInt16(); | |
binaryReader.ReadInt16(); | |
if (binaryReader.ReadInt16() == 0) | |
{ | |
this.npcString += "N|"; | |
} | |
else | |
{ | |
this.npcString += "Y|"; | |
} | |
binaryReader.ReadInt16(); | |
binaryReader.ReadSingle(); | |
binaryReader.ReadSingle(); | |
this.npcString = this.npcString + binaryReader.ReadInt16().ToString() + "|"; | |
this.npcString = this.npcString + b.ToString() + "|"; | |
this.npcString += "0|"; | |
this.npcString = this.npcString + str2 + "*"; | |
binaryReader.ReadInt16(); | |
binaryReader.ReadInt16(); | |
binaryReader.ReadInt16(); | |
binaryReader.ReadInt16(); | |
binaryReader.ReadInt16(); | |
binaryReader.ReadInt16(); | |
binaryReader.ReadInt16(); | |
binaryReader.ReadInt16(); | |
binaryReader.ReadInt16(); | |
binaryReader.ReadInt16(); | |
binaryReader.ReadInt16(); | |
binaryReader.ReadInt16(); | |
binaryReader.ReadInt16(); | |
binaryReader.ReadInt16(); | |
} | |
} | |
if (binaryReader != null) | |
{ | |
((IDisposable)binaryReader).Dispose(); | |
} | |
this.MapLabel.text = this.mapName; | |
this.createTest(); | |
this.loading = false; | |
this.Leaves.SetActive(false); | |
if (this.mapName.ToLower() == "viridian forest") | |
{ | |
this.Leaves.SetActive(true); | |
this.MapWeather = "Leaves"; | |
} | |
else if (this.mapName.ToLower() == "love island") | |
{ | |
this.Leaves.SetActive(true); | |
this.MapWeather = "Leaves"; | |
} | |
else if (this.mapName.ToLower() == "safari exclusive") | |
{ | |
this.Leaves.SetActive(true); | |
this.MapWeather = "Leaves"; | |
} | |
else if (this.mapName.ToLower() == "start") | |
{ | |
this.Leaves.SetActive(true); | |
this.MapWeather = "Leaves"; | |
} | |
if (this.MapWeather == "Leaves") | |
{ | |
this.Leaves.SetActive(true); | |
} | |
this.MH.PlayerPosition(this.mapName); | |
this.Socket.NPCLock = false; | |
if (this.Socket.CanMove) | |
{ | |
int num5 = this.Socket.NPCLOS(0); | |
if (num5 > 0) | |
{ | |
this.Socket.NPCLock = false; | |
if (this.Socket.inBattle) | |
{ | |
return; | |
} | |
this.Socket.LockPlayer(); | |
cNPC component = this.Socket.NPCS[num5 - 1].GetComponent<cNPC>(); | |
component.waitmove = -100f; | |
component.QUE.Clear(); | |
component.SetLOSActive(this.Socket.NPCVect); | |
} | |
} | |
Resources.UnloadUnusedAssets(); | |
} | |
public void destroyTree(int x, int y) | |
{ | |
GameObject[] array = GameObject.FindGameObjectsWithTag("MapEffects"); | |
GameObject[] array2 = array; | |
for (int i = 0; i < array2.Length; i++) | |
{ | |
GameObject gameObject = array2[i]; | |
if (gameObject.transform.position.x == (float)x && gameObject.transform.position.y == (float)(-(float)y)) | |
{ | |
UnityEngine.Object.Destroy(gameObject); | |
return; | |
} | |
} | |
} | |
public void destroyRock(int x, int y) | |
{ | |
GameObject[] array = GameObject.FindGameObjectsWithTag("MapEffects"); | |
GameObject[] array2 = array; | |
for (int i = 0; i < array2.Length; i++) | |
{ | |
GameObject gameObject = array2[i]; | |
if (gameObject.transform.position.x == (float)x && gameObject.transform.position.y == (float)(-(float)y)) | |
{ | |
DestroyRock component = gameObject.GetComponent<DestroyRock>(); | |
component.RemoveMe(); | |
return; | |
} | |
} | |
} | |
public void DestroyTotalMap() | |
{ | |
this.DestroyMap(); | |
if (this.TileMaker != null) | |
{ | |
for (int i = 0; i < this.TileMaker.Length; i++) | |
{ | |
UnityEngine.Object.Destroy(this.TileMaker[i]); | |
} | |
} | |
GameObject[] array = GameObject.FindGameObjectsWithTag("MapEffects"); | |
GameObject[] array2 = array; | |
for (int j = 0; j < array2.Length; j++) | |
{ | |
GameObject obj = array2[j]; | |
UnityEngine.Object.Destroy(obj); | |
} | |
} | |
private void FixedUpdate() | |
{ | |
if (Time.timeScale == 0f) | |
{ | |
return; | |
} | |
if (Time.timeScale != 1f || this.Socket.SaySpeed > 150f || PlayerPrefs.GetFloat("DANMENUMAINPOSX", 0f) != 0f) | |
{ | |
Time.timeScale = 1f; | |
if (this.Socket.LoggedIn) | |
{ | |
this.Socket.sendPacket("btt"); | |
} | |
} | |
} | |
public void createTest() | |
{ | |
if (this.TileMaker != null) | |
{ | |
for (int i = 0; i < this.TileMaker.Length; i++) | |
{ | |
UnityEngine.Object.Destroy(this.TileMaker[i]); | |
} | |
} | |
for (int j = 0; j < MapCreator.Animations; j++) | |
{ | |
if (this.AniWaterLayer[j * 4] != null) | |
{ | |
UnityEngine.Object.Destroy(this.AniWaterLayer[j * 4]); | |
} | |
if (this.AniWaterLayer[j * 4 + 1] != null) | |
{ | |
UnityEngine.Object.Destroy(this.AniWaterLayer[j * 4 + 1]); | |
} | |
if (this.AniWaterLayer[j * 4 + 2] != null) | |
{ | |
UnityEngine.Object.Destroy(this.AniWaterLayer[j * 4 + 2]); | |
} | |
if (this.AniWaterLayer[j * 4 + 3] != null) | |
{ | |
UnityEngine.Object.Destroy(this.AniWaterLayer[j * 4 + 3]); | |
} | |
this.AniWaterLayer[j * 4] = (UnityEngine.Object.Instantiate(this.AniWaterPrefab[j], base.transform.position, Quaternion.identity) as GameObject); | |
this.AniWaterLayer[j * 4 + 1] = (UnityEngine.Object.Instantiate(this.AniWaterPrefab[j], base.transform.position, Quaternion.identity) as GameObject); | |
this.AniWaterLayer[j * 4 + 2] = (UnityEngine.Object.Instantiate(this.AniWaterPrefab[j], base.transform.position, Quaternion.identity) as GameObject); | |
this.AniWaterLayer[j * 4 + 3] = (UnityEngine.Object.Instantiate(this.AniWaterPrefab[j], base.transform.position, Quaternion.identity) as GameObject); | |
this.AniWaterLayer[j * 4].GetComponent<Renderer>().sortingOrder = -3; | |
this.AniWaterLayer[j * 4 + 1].GetComponent<Renderer>().sortingOrder = -2; | |
this.AniWaterLayer[j * 4 + 2].GetComponent<Renderer>().sortingOrder = -1; | |
} | |
GameObject[] array = GameObject.FindGameObjectsWithTag("MapEffects"); | |
GameObject[] array2 = array; | |
for (int k = 0; k < array2.Length; k++) | |
{ | |
GameObject obj = array2[k]; | |
UnityEngine.Object.Destroy(obj); | |
} | |
if (this.mapName.ToLower() == "pokemon tower 2f" || this.mapName.ToLower() == "pokemon tower 3f" || this.mapName.ToLower() == "pokemon tower 4f" || this.mapName.ToLower() == "pokemon tower 5f" || this.mapName.ToLower() == "pokemon tower 6f" || this.mapName.ToLower() == "pokemon tower 7f" || this.mapName.ToLower() == "ecruteak gym") | |
{ | |
UnityEngine.Object.Instantiate(this.TowerFog, new Vector3(10f, -20f, 0f), Quaternion.identity); | |
this.MapWeather = "Tower Fog"; | |
} | |
else if (this.MapWeather == "Tower Fog") | |
{ | |
UnityEngine.Object.Instantiate(this.TowerFog, new Vector3(10f, -20f, 0f), Quaternion.identity); | |
} | |
this.SandStorm.SetActive(false); | |
if (this.MapWeather == "Sandstorm") | |
{ | |
this.SandStorm.SetActive(true); | |
} | |
int num = 0; | |
int num2 = 0; | |
int num3 = 42; | |
int num4 = 64; | |
int num5 = 1024; | |
int num6 = num3 * num4; | |
this.TileMaker = new GameObject[num6 * 4]; | |
for (int l = 0; l < num6; l++) | |
{ | |
this.TileMaker[l] = (UnityEngine.Object.Instantiate(this.TileMakerPrefab, base.transform.position, Quaternion.identity) as GameObject); | |
this.TileMaker[l].name = "Chunk_Layer1_" + num.ToString() + "_" + num2.ToString(); | |
this.TileMaker[l].transform.parent = base.transform; | |
num++; | |
if (num >= num4) | |
{ | |
num = 0; | |
num2++; | |
} | |
} | |
num = 0; | |
num2 = 0; | |
for (int m = 0; m < num6; m++) | |
{ | |
this.TileMaker[m + num6] = (UnityEngine.Object.Instantiate(this.TileMakerPrefab, base.transform.position, Quaternion.identity) as GameObject); | |
this.TileMaker[m + num6].name = "Chunk_Layer2_" + num.ToString() + "_" + num2.ToString(); | |
this.TileMaker[m + num6].transform.parent = base.transform; | |
num++; | |
if (num >= num4) | |
{ | |
num = 0; | |
num2++; | |
} | |
} | |
num = 0; | |
num2 = 0; | |
for (int n = 0; n < num6; n++) | |
{ | |
this.TileMaker[n + num6 * 2] = (UnityEngine.Object.Instantiate(this.TileMakerPrefab, base.transform.position, Quaternion.identity) as GameObject); | |
this.TileMaker[n + num6 * 2].name = "Chunk_Layer3_" + num.ToString() + "_" + num2.ToString(); | |
this.TileMaker[n + num6 * 2].transform.parent = base.transform; | |
num++; | |
if (num >= num4) | |
{ | |
num = 0; | |
num2++; | |
} | |
} | |
num = 0; | |
num2 = 0; | |
for (int num7 = 0; num7 < num6; num7++) | |
{ | |
this.TileMaker[num7 + num6 * 3] = (UnityEngine.Object.Instantiate(this.TileMakerPrefab, base.transform.position, Quaternion.identity) as GameObject); | |
this.TileMaker[num7 + num6 * 3].name = "Chunk_Layer4_" + num.ToString() + "_" + num2.ToString(); | |
this.TileMaker[num7 + num6 * 3].transform.parent = base.transform; | |
num++; | |
if (num >= num4) | |
{ | |
num = 0; | |
num2++; | |
} | |
} | |
this.newVertices = new List<Vector3>[num6]; | |
this.newTriangles = new List<int>[num6]; | |
this.newUV = new List<Vector2>[num6]; | |
this.newVertices2 = new List<Vector3>[num6]; | |
this.newTriangles2 = new List<int>[num6]; | |
this.newUV2 = new List<Vector2>[num6]; | |
this.newVertices3 = new List<Vector3>[num6]; | |
this.newTriangles3 = new List<int>[num6]; | |
this.newUV3 = new List<Vector2>[num6]; | |
this.newVertices4 = new List<Vector3>[num6]; | |
this.newTriangles4 = new List<int>[num6]; | |
this.newUV4 = new List<Vector2>[num6]; | |
this.newCount1 = new int[num6]; | |
this.newCount2 = new int[num6]; | |
this.newCount3 = new int[num6]; | |
this.newCount4 = new int[num6]; | |
for (int num8 = 0; num8 < num6; num8++) | |
{ | |
this.newVertices[num8] = new List<Vector3>(); | |
this.newTriangles[num8] = new List<int>(); | |
this.newUV[num8] = new List<Vector2>(); | |
this.newVertices2[num8] = new List<Vector3>(); | |
this.newTriangles2[num8] = new List<int>(); | |
this.newUV2[num8] = new List<Vector2>(); | |
this.newVertices3[num8] = new List<Vector3>(); | |
this.newTriangles3[num8] = new List<int>(); | |
this.newUV3[num8] = new List<Vector2>(); | |
this.newVertices4[num8] = new List<Vector3>(); | |
this.newTriangles4[num8] = new List<int>(); | |
this.newUV4[num8] = new List<Vector2>(); | |
} | |
setUVs setUVs = new setUVs(); | |
int[] array3 = new int[num3]; | |
int[] array4 = new int[num3]; | |
int[] array5 = new int[num3]; | |
int[] array6 = new int[num3]; | |
for (int num9 = 0; num9 < this.Width + 1; num9++) | |
{ | |
for (int num10 = 0; num10 < this.Height + 1; num10++) | |
{ | |
if (this.Links[num9, num10] > 0 && (num9 > 0 || num10 > 0)) | |
{ | |
UnityEngine.Object.Instantiate(this.LinkPrefab, new Vector3((float)num9, (float)(-(float)num10) + 0.5f, 0f), Quaternion.identity); | |
} | |
bool flag = false; | |
Vector3 vector; | |
if (this.Tiles[num9, num10] >= 1) | |
{ | |
int num11 = this.Tiles[num9, num10]; | |
vector.x = (float)num9; | |
vector.y = (float)(-(float)num10); | |
vector.z = 0f; | |
if (((float)num11 / 8f - (float)(num11 / 8)) * 8f < 0f) | |
{ | |
setUVs.TileX = 8f - ((float)num11 / 8f - (float)(num11 / 8)) * 8f; | |
} | |
else | |
{ | |
setUVs.TileX = ((float)num11 / 8f - (float)(num11 / 8)) * 8f; | |
} | |
setUVs.TileX += 1f; | |
setUVs.TileY = (float)(num11 / 8 + 1); | |
if (num11 == 5897) | |
{ | |
this.AniWaterLayer[0].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5896) | |
{ | |
this.AniWaterLayer[4].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5898) | |
{ | |
this.AniWaterLayer[8].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5888) | |
{ | |
this.AniWaterLayer[12].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5889) | |
{ | |
this.AniWaterLayer[16].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5890) | |
{ | |
this.AniWaterLayer[20].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5904) | |
{ | |
this.AniWaterLayer[24].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5905) | |
{ | |
this.AniWaterLayer[28].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5906) | |
{ | |
this.AniWaterLayer[32].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5891) | |
{ | |
this.AniWaterLayer[36].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5892) | |
{ | |
this.AniWaterLayer[40].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5899) | |
{ | |
this.AniWaterLayer[44].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5900) | |
{ | |
this.AniWaterLayer[48].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5900) | |
{ | |
this.AniWaterLayer[48].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5912) | |
{ | |
this.AniWaterLayer[76].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5913) | |
{ | |
this.AniWaterLayer[80].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5914) | |
{ | |
this.AniWaterLayer[84].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5920) | |
{ | |
this.AniWaterLayer[88].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5921) | |
{ | |
this.AniWaterLayer[92].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5922) | |
{ | |
this.AniWaterLayer[96].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5928) | |
{ | |
this.AniWaterLayer[100].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5929) | |
{ | |
this.AniWaterLayer[104].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5930) | |
{ | |
this.AniWaterLayer[108].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5915) | |
{ | |
this.AniWaterLayer[112].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5916) | |
{ | |
this.AniWaterLayer[116].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5923) | |
{ | |
this.AniWaterLayer[120].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5924) | |
{ | |
this.AniWaterLayer[124].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 6002) | |
{ | |
this.AniWaterLayer[208].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5968) | |
{ | |
this.AniWaterLayer[216].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5969) | |
{ | |
this.AniWaterLayer[220].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5970) | |
{ | |
this.AniWaterLayer[224].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5976) | |
{ | |
this.AniWaterLayer[228].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5977) | |
{ | |
this.AniWaterLayer[232].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5978) | |
{ | |
this.AniWaterLayer[236].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5984) | |
{ | |
this.AniWaterLayer[240].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5985) | |
{ | |
this.AniWaterLayer[244].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5986) | |
{ | |
this.AniWaterLayer[248].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5971) | |
{ | |
this.AniWaterLayer[252].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5972) | |
{ | |
this.AniWaterLayer[256].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5979) | |
{ | |
this.AniWaterLayer[260].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5980) | |
{ | |
this.AniWaterLayer[264].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17645) | |
{ | |
this.AniWaterLayer[304].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17646) | |
{ | |
this.AniWaterLayer[308].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17647) | |
{ | |
this.AniWaterLayer[312].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17653) | |
{ | |
this.AniWaterLayer[316].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17654) | |
{ | |
this.AniWaterLayer[320].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17655) | |
{ | |
this.AniWaterLayer[324].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17661) | |
{ | |
this.AniWaterLayer[328].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17662) | |
{ | |
this.AniWaterLayer[332].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17663) | |
{ | |
this.AniWaterLayer[336].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17629) | |
{ | |
this.AniWaterLayer[340].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17630) | |
{ | |
this.AniWaterLayer[344].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17637) | |
{ | |
this.AniWaterLayer[348].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17638) | |
{ | |
this.AniWaterLayer[352].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 28306) | |
{ | |
this.AniWaterLayer[268].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 28314) | |
{ | |
this.AniWaterLayer[272].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 28304) | |
{ | |
this.AniWaterLayer[276].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 28312) | |
{ | |
this.AniWaterLayer[280].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 31321) | |
{ | |
this.AniWaterLayer[284].GetComponent<AniTiles>().addTile(vector, 1, this.Width, this.Height); | |
flag = true; | |
} | |
if (num11 == 31312 || num11 == 31313 || num11 == 31314 || num11 == 31315 || num11 == 31316 || num11 == 31320 || num11 == 31322 || num11 == 31323 || num11 == 31324 || num11 == 31328 || num11 == 31329 || num11 == 31330) | |
{ | |
this.AniWaterLayer[284].GetComponent<AniTiles>().addTile(vector, 1, this.Width, this.Height); | |
} | |
if (num11 == 5902) | |
{ | |
this.AniWaterLayer[284].GetComponent<AniTiles>().addTile(vector, 1, this.Width, this.Height); | |
flag = true; | |
} | |
if (num11 == 5893 || num11 == 5894 || num11 == 5895 || num11 == 5901 || num11 == 5903 || num11 == 5909 || num11 == 5910 || num11 == 5911 || num11 == 5918 || num11 == 5919 || num11 == 5926 || num11 == 5927) | |
{ | |
this.AniWaterLayer[284].GetComponent<AniTiles>().addTile(vector, 1, this.Width, this.Height); | |
} | |
if (num11 == 22227) | |
{ | |
this.AniWaterLayer[288].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 6004) | |
{ | |
this.AniWaterLayer[292].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5942) | |
{ | |
this.AniWaterLayer[300].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17008) | |
{ | |
this.AniWaterLayer[456].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17009) | |
{ | |
this.AniWaterLayer[460].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17010) | |
{ | |
this.AniWaterLayer[464].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17016) | |
{ | |
this.AniWaterLayer[468].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17017) | |
{ | |
this.AniWaterLayer[472].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17018) | |
{ | |
this.AniWaterLayer[476].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17024) | |
{ | |
this.AniWaterLayer[480].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17025) | |
{ | |
this.AniWaterLayer[484].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17026) | |
{ | |
this.AniWaterLayer[488].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17032) | |
{ | |
this.AniWaterLayer[492].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17033) | |
{ | |
this.AniWaterLayer[496].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17034) | |
{ | |
this.AniWaterLayer[500].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17040) | |
{ | |
this.AniWaterLayer[504].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17041) | |
{ | |
this.AniWaterLayer[508].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17042) | |
{ | |
this.AniWaterLayer[512].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17048) | |
{ | |
this.AniWaterLayer[516].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17049) | |
{ | |
this.AniWaterLayer[520].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17050) | |
{ | |
this.AniWaterLayer[524].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17056) | |
{ | |
this.AniWaterLayer[528].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17057) | |
{ | |
this.AniWaterLayer[532].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17058) | |
{ | |
this.AniWaterLayer[536].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17064) | |
{ | |
this.AniWaterLayer[540].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17065) | |
{ | |
this.AniWaterLayer[544].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17066) | |
{ | |
this.AniWaterLayer[548].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17072) | |
{ | |
this.AniWaterLayer[552].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17073) | |
{ | |
this.AniWaterLayer[556].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17074) | |
{ | |
this.AniWaterLayer[560].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (!flag) | |
{ | |
for (int num12 = 0; num12 < num3; num12++) | |
{ | |
if (setUVs.TileY > (float)(num12 * 128) && setUVs.TileY <= (float)((num12 + 1) * 128)) | |
{ | |
int num13 = 0; | |
int num14 = array3[num12]; | |
for (int num15 = 0; num15 < num4; num15++) | |
{ | |
if (array3[num12] <= num5 || (array3[num12] > num15 * num5 && array3[num12] <= (num15 + 1) * num5)) | |
{ | |
num13 = num12 * num4 + num15; | |
if (array3[num12] > num5) | |
{ | |
num14 -= num5 * num15 + 1; | |
} | |
break; | |
} | |
} | |
this.newVertices[num13].Add(new Vector3(vector.x - this.OverLap, vector.y + this.OverLap, vector.z)); | |
this.newVertices[num13].Add(new Vector3(vector.x + 1f + this.OverLap, vector.y + this.OverLap, vector.z)); | |
this.newVertices[num13].Add(new Vector3(vector.x - this.OverLap, vector.y - 1f - this.OverLap, vector.z)); | |
this.newVertices[num13].Add(new Vector3(vector.x + 1f + this.OverLap, vector.y - 1f - this.OverLap, vector.z)); | |
this.newTriangles[num13].Add(2 + num14 * 4); | |
this.newTriangles[num13].Add(0 + num14 * 4); | |
this.newTriangles[num13].Add(3 + num14 * 4); | |
this.newTriangles[num13].Add(3 + num14 * 4); | |
this.newTriangles[num13].Add(0 + num14 * 4); | |
this.newTriangles[num13].Add(1 + num14 * 4); | |
this.newCount1[num13] = num14; | |
array3[num12]++; | |
setUVs.TileY += (float)(-(float)(128 * num12)); | |
if (setUVs.TileY > 32f && setUVs.TileY <= 64f) | |
{ | |
setUVs.TileY += -32f; | |
setUVs.TileX += 8f; | |
} | |
if (setUVs.TileY > 64f && setUVs.TileY <= 96f) | |
{ | |
setUVs.TileY += -64f; | |
setUVs.TileX += 16f; | |
} | |
if (setUVs.TileY > 96f && setUVs.TileY <= 128f) | |
{ | |
setUVs.TileY += -96f; | |
setUVs.TileX += 24f; | |
} | |
setUVs.Fix(); | |
this.newUV[num13].Add(setUVs.uvSwap[2]); | |
this.newUV[num13].Add(setUVs.uvSwap[0]); | |
this.newUV[num13].Add(setUVs.uvSwap[1]); | |
this.newUV[num13].Add(setUVs.uvSwap[3]); | |
break; | |
} | |
} | |
} | |
} | |
flag = false; | |
if (this.Tiles2[num9, num10] >= 1) | |
{ | |
int num11 = this.Tiles2[num9, num10]; | |
vector.x = (float)num9; | |
vector.y = (float)(-(float)num10); | |
vector.z = 0f; | |
if (num11 == 10492) | |
{ | |
UnityEngine.Object.Instantiate(this.EffectLight, vector + new Vector3(0f, 0f, -0f), Quaternion.identity); | |
} | |
else if (num11 == 10493) | |
{ | |
UnityEngine.Object.Instantiate(this.EffectLight, vector + new Vector3(0f, 0.2f, -0f), Quaternion.identity); | |
} | |
else if (num11 == 15059) | |
{ | |
UnityEngine.Object.Instantiate(this.GameLight, vector + new Vector3(0.5f, 0.62f, -0.02f), Quaternion.identity); | |
} | |
else if (num11 == 5948) | |
{ | |
UnityEngine.Object.Instantiate(this.PokeFloor, vector + new Vector3(1f, -1f, -0f), Quaternion.identity); | |
} | |
else if (num11 == 28328) | |
{ | |
UnityEngine.Object.Instantiate(this.Lab2, vector + new Vector3(0.5f, 0f, 0f), Quaternion.identity); | |
flag = true; | |
} | |
else if (num11 == 31379) | |
{ | |
UnityEngine.Object.Instantiate(this.AniDoorPrefab, vector + new Vector3(0.3675f, 0f, 0f), Quaternion.identity); | |
} | |
else if (num11 == 8790) | |
{ | |
UnityEngine.Object.Instantiate(this.StoreDoor, vector + new Vector3(0.25f, -0.07f, 0f), Quaternion.identity); | |
} | |
else if (num11 == 8491) | |
{ | |
UnityEngine.Object.Instantiate(this.GymDoor, vector + new Vector3(0f, 0f, 0f), Quaternion.identity); | |
} | |
else if (num11 == 31418) | |
{ | |
UnityEngine.Object.Instantiate(this.AniDoubleDoorPrefab, vector + new Vector3(0.3675f, -0.5f, 0f), Quaternion.identity); | |
} | |
else if (num11 == 28329) | |
{ | |
flag = true; | |
} | |
else if (num11 == 2850) | |
{ | |
} | |
if (num11 == 5948 || num11 == 5949 || num11 == 5950 || num11 == 5956 || num11 == 5957 || num11 == 5958 || num11 == 5964 || num11 == 5965 || num11 == 5966) | |
{ | |
flag = true; | |
} | |
if (((float)num11 / 8f - (float)(num11 / 8)) * 8f < 0f) | |
{ | |
setUVs.TileX = 8f - ((float)num11 / 8f - (float)(num11 / 8)) * 8f; | |
} | |
else | |
{ | |
setUVs.TileX = ((float)num11 / 8f - (float)(num11 / 8)) * 8f; | |
} | |
setUVs.TileX += 1f; | |
setUVs.TileY = (float)(num11 / 8 + 1); | |
if (num11 == 5897) | |
{ | |
this.AniWaterLayer[1].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5896) | |
{ | |
this.AniWaterLayer[5].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5898) | |
{ | |
this.AniWaterLayer[9].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5888) | |
{ | |
this.AniWaterLayer[13].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5889) | |
{ | |
this.AniWaterLayer[17].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5890) | |
{ | |
this.AniWaterLayer[21].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5904) | |
{ | |
this.AniWaterLayer[25].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5905) | |
{ | |
this.AniWaterLayer[29].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5906) | |
{ | |
this.AniWaterLayer[33].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5891) | |
{ | |
this.AniWaterLayer[37].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5892) | |
{ | |
this.AniWaterLayer[41].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5899) | |
{ | |
this.AniWaterLayer[45].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5900) | |
{ | |
this.AniWaterLayer[49].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 62) | |
{ | |
this.AniWaterLayer[53].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5941) | |
{ | |
this.AniWaterLayer[57].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5932) | |
{ | |
this.AniWaterLayer[53].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5933) | |
{ | |
this.AniWaterLayer[61].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5940) | |
{ | |
this.AniWaterLayer[65].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5934) | |
{ | |
this.AniWaterLayer[69].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5935) | |
{ | |
this.AniWaterLayer[73].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 7382) | |
{ | |
UnityEngine.Object.Instantiate(this.StairPrefab[0], vector + new Vector3(0f, 0.5f, -5f), Quaternion.identity); | |
} | |
if (num11 == 7414) | |
{ | |
UnityEngine.Object.Instantiate(this.StairPrefab[1], vector + new Vector3(0f, 0f, -5f), Quaternion.identity); | |
} | |
if (num11 == 7378) | |
{ | |
UnityEngine.Object.Instantiate(this.StairPrefab[2], vector + new Vector3(0f, 0f, -5f), Quaternion.identity); | |
} | |
if (num11 == 7410) | |
{ | |
UnityEngine.Object.Instantiate(this.StairPrefab[3], vector + new Vector3(0f, 0.5f, -5f), Quaternion.identity); | |
} | |
if (num11 == 86) | |
{ | |
UnityEngine.Object.Instantiate(this.TreePrefab, vector, Quaternion.identity); | |
flag = true; | |
} | |
if (num11 == 87) | |
{ | |
UnityEngine.Object.Instantiate(this.TreePrefab, vector, Quaternion.identity); | |
flag = true; | |
} | |
if (this.Colliders[num9, num10] == 13) | |
{ | |
UnityEngine.Object.Instantiate(this.RockPrefab, vector, Quaternion.identity); | |
flag = true; | |
} | |
if (num11 == 78) | |
{ | |
flag = true; | |
} | |
if (num11 == 79) | |
{ | |
flag = true; | |
} | |
if (num11 == 5912) | |
{ | |
this.AniWaterLayer[77].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5913) | |
{ | |
this.AniWaterLayer[81].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5914) | |
{ | |
this.AniWaterLayer[85].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5920) | |
{ | |
this.AniWaterLayer[89].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5921) | |
{ | |
this.AniWaterLayer[93].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5922) | |
{ | |
this.AniWaterLayer[97].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5928) | |
{ | |
this.AniWaterLayer[101].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5929) | |
{ | |
this.AniWaterLayer[105].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5930) | |
{ | |
this.AniWaterLayer[109].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5915) | |
{ | |
this.AniWaterLayer[113].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5916) | |
{ | |
this.AniWaterLayer[117].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5923) | |
{ | |
this.AniWaterLayer[121].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5924) | |
{ | |
this.AniWaterLayer[125].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5936) | |
{ | |
this.AniWaterLayer[129].GetComponent<AniTiles>().addTile(vector, 4, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5937 || num11 == 5938 || num11 == 5939 || num11 == 5944 || num11 == 5945 || num11 == 5946 || num11 == 5947 || num11 == 5952 || num11 == 5953 || num11 == 5954 || num11 == 5955 || num11 == 5960 || num11 == 5961 || num11 == 5962 || num11 == 5963) | |
{ | |
flag = true; | |
} | |
if (num11 == 5902) | |
{ | |
this.AniWaterLayer[285].GetComponent<AniTiles>().addTile(vector, 1, this.Width, this.Height); | |
flag = true; | |
} | |
if (num11 == 5893 || num11 == 5894 || num11 == 5895 || num11 == 5901 || num11 == 5903 || num11 == 5909 || num11 == 5910 || num11 == 5911 || num11 == 5918 || num11 == 5919 || num11 == 5926 || num11 == 5927) | |
{ | |
this.AniWaterLayer[285].GetComponent<AniTiles>().addTile(vector, 1, this.Width, this.Height); | |
} | |
if (num11 == 5989) | |
{ | |
this.AniWaterLayer[133].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5990) | |
{ | |
this.AniWaterLayer[137].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5991) | |
{ | |
this.AniWaterLayer[141].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5997) | |
{ | |
this.AniWaterLayer[145].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5998) | |
{ | |
this.AniWaterLayer[149].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5999) | |
{ | |
this.AniWaterLayer[153].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 6005) | |
{ | |
this.AniWaterLayer[157].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 6006) | |
{ | |
this.AniWaterLayer[161].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 6007) | |
{ | |
this.AniWaterLayer[165].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5987) | |
{ | |
this.AniWaterLayer[169].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5988) | |
{ | |
this.AniWaterLayer[173].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5995) | |
{ | |
this.AniWaterLayer[177].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5996) | |
{ | |
this.AniWaterLayer[181].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 6488) | |
{ | |
this.AniWaterLayer[185].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 6489) | |
{ | |
this.AniWaterLayer[189].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 6490) | |
{ | |
this.AniWaterLayer[193].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 6496) | |
{ | |
this.AniWaterLayer[197].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 6497) | |
{ | |
this.AniWaterLayer[201].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 6498) | |
{ | |
this.AniWaterLayer[205].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 6002) | |
{ | |
this.AniWaterLayer[209].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 6118) | |
{ | |
this.AniWaterLayer[213].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
UnityEngine.Object.Instantiate(this.FireLight, vector + new Vector3(0f, 0f, -1f), Quaternion.identity); | |
} | |
if (num11 == 6115) | |
{ | |
this.AniWaterLayer[565].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
UnityEngine.Object.Instantiate(this.FireLight, vector + new Vector3(0f, 0f, -1f), Quaternion.identity); | |
} | |
if (num11 == 5968) | |
{ | |
this.AniWaterLayer[217].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5969) | |
{ | |
this.AniWaterLayer[221].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5970) | |
{ | |
this.AniWaterLayer[225].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5976) | |
{ | |
this.AniWaterLayer[229].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5977) | |
{ | |
this.AniWaterLayer[233].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5978) | |
{ | |
this.AniWaterLayer[237].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5984) | |
{ | |
this.AniWaterLayer[241].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5985) | |
{ | |
this.AniWaterLayer[245].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5986) | |
{ | |
this.AniWaterLayer[249].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5971) | |
{ | |
this.AniWaterLayer[253].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5972) | |
{ | |
this.AniWaterLayer[257].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5979) | |
{ | |
this.AniWaterLayer[261].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5980) | |
{ | |
this.AniWaterLayer[265].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17645) | |
{ | |
this.AniWaterLayer[305].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17646) | |
{ | |
this.AniWaterLayer[309].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17647) | |
{ | |
this.AniWaterLayer[313].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17653) | |
{ | |
this.AniWaterLayer[317].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17654) | |
{ | |
this.AniWaterLayer[321].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17655) | |
{ | |
this.AniWaterLayer[325].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17661) | |
{ | |
this.AniWaterLayer[329].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17662) | |
{ | |
this.AniWaterLayer[333].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17663) | |
{ | |
this.AniWaterLayer[337].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17629) | |
{ | |
this.AniWaterLayer[341].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17630) | |
{ | |
this.AniWaterLayer[345].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17637) | |
{ | |
this.AniWaterLayer[349].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17638) | |
{ | |
this.AniWaterLayer[353].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 28306) | |
{ | |
this.AniWaterLayer[269].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 28314) | |
{ | |
this.AniWaterLayer[273].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 28304) | |
{ | |
this.AniWaterLayer[277].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 28312) | |
{ | |
this.AniWaterLayer[281].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27760) | |
{ | |
this.AniWaterLayer[357].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
UnityEngine.Object.Instantiate(this.EnviromentalSounds[0], vector + new Vector3(2f, 0f, -5f), Quaternion.identity); | |
} | |
if (num11 == 27761) | |
{ | |
this.AniWaterLayer[361].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27762) | |
{ | |
this.AniWaterLayer[365].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27763) | |
{ | |
this.AniWaterLayer[369].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27768) | |
{ | |
this.AniWaterLayer[373].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27769) | |
{ | |
this.AniWaterLayer[377].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27770) | |
{ | |
this.AniWaterLayer[381].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27771) | |
{ | |
this.AniWaterLayer[385].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27776) | |
{ | |
this.AniWaterLayer[389].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27777) | |
{ | |
this.AniWaterLayer[393].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27778) | |
{ | |
this.AniWaterLayer[397].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27779) | |
{ | |
this.AniWaterLayer[401].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27784) | |
{ | |
this.AniWaterLayer[405].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27785) | |
{ | |
this.AniWaterLayer[409].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27786) | |
{ | |
this.AniWaterLayer[413].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27787) | |
{ | |
this.AniWaterLayer[417].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27764) | |
{ | |
this.AniWaterLayer[421].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
UnityEngine.Object.Instantiate(this.EnviromentalSounds[0], vector + new Vector3(1f, 0f, -5f), Quaternion.identity); | |
} | |
if (num11 == 27765) | |
{ | |
this.AniWaterLayer[425].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27766) | |
{ | |
this.AniWaterLayer[429].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27772) | |
{ | |
this.AniWaterLayer[433].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27773) | |
{ | |
this.AniWaterLayer[437].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27774) | |
{ | |
this.AniWaterLayer[441].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27780) | |
{ | |
this.AniWaterLayer[445].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27781) | |
{ | |
this.AniWaterLayer[449].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27782) | |
{ | |
this.AniWaterLayer[453].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17651) | |
{ | |
this.AniWaterLayer[585].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 31321) | |
{ | |
this.AniWaterLayer[285].GetComponent<AniTiles>().addTile(vector, 1, this.Width, this.Height); | |
flag = true; | |
} | |
if (num11 == 31312 || num11 == 31313 || num11 == 31314 || num11 == 31315 || num11 == 31316 || num11 == 31320 || num11 == 31322 || num11 == 31323 || num11 == 31324 || num11 == 31328 || num11 == 31329 || num11 == 31330) | |
{ | |
this.AniWaterLayer[285].GetComponent<AniTiles>().addTile(vector, 1, this.Width, this.Height); | |
} | |
if (num11 == 22227) | |
{ | |
this.AniWaterLayer[289].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 6004) | |
{ | |
this.AniWaterLayer[293].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 1891) | |
{ | |
this.AniWaterLayer[297].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5942) | |
{ | |
this.AniWaterLayer[301].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17008) | |
{ | |
this.AniWaterLayer[457].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17009) | |
{ | |
this.AniWaterLayer[461].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17010) | |
{ | |
this.AniWaterLayer[465].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17016) | |
{ | |
this.AniWaterLayer[469].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17017) | |
{ | |
this.AniWaterLayer[473].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17018) | |
{ | |
this.AniWaterLayer[477].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17024) | |
{ | |
this.AniWaterLayer[481].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17025) | |
{ | |
this.AniWaterLayer[485].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17026) | |
{ | |
this.AniWaterLayer[489].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17032) | |
{ | |
this.AniWaterLayer[493].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17033) | |
{ | |
this.AniWaterLayer[497].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17034) | |
{ | |
this.AniWaterLayer[501].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17040) | |
{ | |
this.AniWaterLayer[505].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17041) | |
{ | |
this.AniWaterLayer[509].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17042) | |
{ | |
this.AniWaterLayer[513].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17048) | |
{ | |
this.AniWaterLayer[517].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17049) | |
{ | |
this.AniWaterLayer[521].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17050) | |
{ | |
this.AniWaterLayer[525].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17056) | |
{ | |
this.AniWaterLayer[529].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17057) | |
{ | |
this.AniWaterLayer[533].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17058) | |
{ | |
this.AniWaterLayer[537].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17064) | |
{ | |
this.AniWaterLayer[541].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17065) | |
{ | |
this.AniWaterLayer[545].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17066) | |
{ | |
this.AniWaterLayer[549].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17072) | |
{ | |
this.AniWaterLayer[553].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17073) | |
{ | |
this.AniWaterLayer[557].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17074) | |
{ | |
this.AniWaterLayer[561].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (!flag) | |
{ | |
for (int num16 = 0; num16 < num3; num16++) | |
{ | |
if (setUVs.TileY > (float)(num16 * 128) && setUVs.TileY <= (float)((num16 + 1) * 128)) | |
{ | |
int num13 = 0; | |
int num14 = array4[num16]; | |
for (int num17 = 0; num17 < num4; num17++) | |
{ | |
if (array4[num16] <= num5 || (array4[num16] > num17 * num5 && array4[num16] <= (num17 + 1) * num5)) | |
{ | |
num13 = num16 * num4 + num17; | |
if (array4[num16] > num5) | |
{ | |
num14 -= num5 * num17 + 1; | |
} | |
break; | |
} | |
} | |
this.newVertices2[num13].Add(new Vector3(vector.x, vector.y, vector.z)); | |
this.newVertices2[num13].Add(new Vector3(vector.x + 1f, vector.y, vector.z)); | |
this.newVertices2[num13].Add(new Vector3(vector.x, vector.y - 1f, vector.z)); | |
this.newVertices2[num13].Add(new Vector3(vector.x + 1f, vector.y - 1f, vector.z)); | |
this.newTriangles2[num13].Add(2 + num14 * 4); | |
this.newTriangles2[num13].Add(0 + num14 * 4); | |
this.newTriangles2[num13].Add(3 + num14 * 4); | |
this.newTriangles2[num13].Add(3 + num14 * 4); | |
this.newTriangles2[num13].Add(0 + num14 * 4); | |
this.newTriangles2[num13].Add(1 + num14 * 4); | |
this.newCount2[num13] = num14; | |
array4[num16]++; | |
setUVs.TileY += (float)(-(float)(128 * num16)); | |
if (setUVs.TileY > 32f && setUVs.TileY <= 64f) | |
{ | |
setUVs.TileY += -32f; | |
setUVs.TileX += 8f; | |
} | |
if (setUVs.TileY > 64f && setUVs.TileY <= 96f) | |
{ | |
setUVs.TileY += -64f; | |
setUVs.TileX += 16f; | |
} | |
if (setUVs.TileY > 96f && setUVs.TileY <= 128f) | |
{ | |
setUVs.TileY += -96f; | |
setUVs.TileX += 24f; | |
} | |
setUVs.Fix(); | |
this.newUV2[num13].Add(setUVs.uvSwap[2]); | |
this.newUV2[num13].Add(setUVs.uvSwap[0]); | |
this.newUV2[num13].Add(setUVs.uvSwap[1]); | |
this.newUV2[num13].Add(setUVs.uvSwap[3]); | |
break; | |
} | |
} | |
} | |
} | |
flag = false; | |
if (this.Tiles3[num9, num10] >= 1) | |
{ | |
int num11 = this.Tiles3[num9, num10]; | |
vector.x = (float)num9; | |
vector.y = (float)(-(float)num10); | |
vector.z = 0f; | |
if (num11 == 10492) | |
{ | |
UnityEngine.Object.Instantiate(this.EffectLight, vector + new Vector3(0f, 0.4f, -0f), Quaternion.identity); | |
} | |
else if (num11 == 10493) | |
{ | |
UnityEngine.Object.Instantiate(this.EffectLight, vector + new Vector3(0f, 0.2f, -0f), Quaternion.identity); | |
} | |
else if (num11 == 22150) | |
{ | |
UnityEngine.Object.Instantiate(this.Lights[6], vector + new Vector3(0f, -0.1f, -0f), Quaternion.identity); | |
} | |
else if (num11 == 15059) | |
{ | |
UnityEngine.Object.Instantiate(this.GameLight, vector + new Vector3(0.5f, 0.62f, -0.02f), Quaternion.identity); | |
} | |
else if (num11 == 5948) | |
{ | |
UnityEngine.Object.Instantiate(this.PokeFloor, vector + new Vector3(1f, -1f, -0f), Quaternion.identity); | |
} | |
else if (num11 == 28328) | |
{ | |
UnityEngine.Object.Instantiate(this.Lab2, vector + new Vector3(0.5f, 0f, 0f), Quaternion.identity); | |
flag = true; | |
} | |
else if (num11 == 31379) | |
{ | |
UnityEngine.Object.Instantiate(this.AniDoorPrefab, vector + new Vector3(0.3675f, 0f, 0f), Quaternion.identity); | |
} | |
else if (num11 == 8790) | |
{ | |
UnityEngine.Object.Instantiate(this.StoreDoor, vector + new Vector3(0.25f, -0.07f, 0f), Quaternion.identity); | |
} | |
else if (num11 == 8491) | |
{ | |
UnityEngine.Object.Instantiate(this.GymDoor, vector + new Vector3(0f, 0f, 0f), Quaternion.identity); | |
} | |
else if (num11 == 31418) | |
{ | |
UnityEngine.Object.Instantiate(this.AniDoubleDoorPrefab, vector + new Vector3(0.3675f, -0.5f, 0f), Quaternion.identity); | |
} | |
else if (num11 == 28329) | |
{ | |
flag = true; | |
} | |
if (num11 == 5948 || num11 == 5949 || num11 == 5950 || num11 == 5956 || num11 == 5957 || num11 == 5958 || num11 == 5964 || num11 == 5965 || num11 == 5966) | |
{ | |
flag = true; | |
} | |
if (((float)num11 / 8f - (float)(num11 / 8)) * 8f < 0f) | |
{ | |
setUVs.TileX = 8f - ((float)num11 / 8f - (float)(num11 / 8)) * 8f; | |
} | |
else | |
{ | |
setUVs.TileX = ((float)num11 / 8f - (float)(num11 / 8)) * 8f; | |
} | |
setUVs.TileX += 1f; | |
setUVs.TileY = (float)(num11 / 8 + 1); | |
if (num11 == 5897) | |
{ | |
this.AniWaterLayer[2].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5896) | |
{ | |
this.AniWaterLayer[6].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5898) | |
{ | |
this.AniWaterLayer[10].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5888) | |
{ | |
this.AniWaterLayer[14].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5889) | |
{ | |
this.AniWaterLayer[18].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5890) | |
{ | |
this.AniWaterLayer[22].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5904) | |
{ | |
this.AniWaterLayer[26].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5905) | |
{ | |
this.AniWaterLayer[30].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5906) | |
{ | |
this.AniWaterLayer[34].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5891) | |
{ | |
this.AniWaterLayer[38].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5892) | |
{ | |
this.AniWaterLayer[42].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5899) | |
{ | |
this.AniWaterLayer[46].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5900) | |
{ | |
this.AniWaterLayer[50].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 62) | |
{ | |
this.AniWaterLayer[54].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 86) | |
{ | |
UnityEngine.Object.Instantiate(this.TreePrefab, vector, Quaternion.identity); | |
flag = true; | |
} | |
if (num11 == 87) | |
{ | |
UnityEngine.Object.Instantiate(this.TreePrefab, vector, Quaternion.identity); | |
flag = true; | |
} | |
if (num11 == 78) | |
{ | |
flag = true; | |
} | |
if (num11 == 79) | |
{ | |
flag = true; | |
} | |
if (num11 == 5912) | |
{ | |
this.AniWaterLayer[78].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5913) | |
{ | |
this.AniWaterLayer[82].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5914) | |
{ | |
this.AniWaterLayer[86].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5920) | |
{ | |
this.AniWaterLayer[90].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5921) | |
{ | |
this.AniWaterLayer[94].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5922) | |
{ | |
this.AniWaterLayer[98].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5928) | |
{ | |
this.AniWaterLayer[102].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5929) | |
{ | |
this.AniWaterLayer[106].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5930) | |
{ | |
this.AniWaterLayer[110].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5915) | |
{ | |
this.AniWaterLayer[114].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5916) | |
{ | |
this.AniWaterLayer[118].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5923) | |
{ | |
this.AniWaterLayer[122].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5924) | |
{ | |
this.AniWaterLayer[126].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5936) | |
{ | |
this.AniWaterLayer[130].GetComponent<AniTiles>().addTile(vector, 4, 1, 1); | |
flag = true; | |
} | |
if (num11 == 7382) | |
{ | |
UnityEngine.Object.Instantiate(this.StairPrefab[0], vector + new Vector3(0f, 0.5f, -5f), Quaternion.identity); | |
} | |
if (num11 == 7414) | |
{ | |
UnityEngine.Object.Instantiate(this.StairPrefab[1], vector + new Vector3(0f, 0f, -5f), Quaternion.identity); | |
} | |
if (num11 == 7378) | |
{ | |
UnityEngine.Object.Instantiate(this.StairPrefab[2], vector + new Vector3(0f, 0f, -5f), Quaternion.identity); | |
} | |
if (num11 == 7410) | |
{ | |
UnityEngine.Object.Instantiate(this.StairPrefab[3], vector + new Vector3(0f, 0.5f, -5f), Quaternion.identity); | |
} | |
if (num11 == 5937 || num11 == 5938 || num11 == 5939 || num11 == 5944 || num11 == 5945 || num11 == 5946 || num11 == 5947 || num11 == 5952 || num11 == 5953 || num11 == 5954 || num11 == 5955 || num11 == 5960 || num11 == 5961 || num11 == 5962 || num11 == 5963) | |
{ | |
flag = true; | |
} | |
if (num11 == 5989) | |
{ | |
this.AniWaterLayer[134].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5990) | |
{ | |
this.AniWaterLayer[138].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5991) | |
{ | |
this.AniWaterLayer[142].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5997) | |
{ | |
this.AniWaterLayer[146].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5998) | |
{ | |
this.AniWaterLayer[150].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5999) | |
{ | |
this.AniWaterLayer[154].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 6005) | |
{ | |
this.AniWaterLayer[158].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 6006) | |
{ | |
this.AniWaterLayer[162].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 6007) | |
{ | |
this.AniWaterLayer[166].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5987) | |
{ | |
this.AniWaterLayer[170].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5988) | |
{ | |
this.AniWaterLayer[174].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5995) | |
{ | |
this.AniWaterLayer[178].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5996) | |
{ | |
this.AniWaterLayer[182].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 6488) | |
{ | |
this.AniWaterLayer[186].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 6489) | |
{ | |
this.AniWaterLayer[190].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 6490) | |
{ | |
this.AniWaterLayer[194].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 6496) | |
{ | |
this.AniWaterLayer[198].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 6497) | |
{ | |
this.AniWaterLayer[202].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 6498) | |
{ | |
this.AniWaterLayer[206].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 6002) | |
{ | |
this.AniWaterLayer[210].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 6118) | |
{ | |
this.AniWaterLayer[214].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
UnityEngine.Object.Instantiate(this.FireLight, vector + new Vector3(0f, 0f, -1f), Quaternion.identity); | |
} | |
if (num11 == 6115) | |
{ | |
this.AniWaterLayer[566].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
UnityEngine.Object.Instantiate(this.FireLight, vector + new Vector3(0f, 0f, -1f), Quaternion.identity); | |
} | |
if (num11 == 5968) | |
{ | |
this.AniWaterLayer[218].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5969) | |
{ | |
this.AniWaterLayer[222].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5970) | |
{ | |
this.AniWaterLayer[226].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5976) | |
{ | |
this.AniWaterLayer[230].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5977) | |
{ | |
this.AniWaterLayer[234].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5978) | |
{ | |
this.AniWaterLayer[238].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5984) | |
{ | |
this.AniWaterLayer[242].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5985) | |
{ | |
this.AniWaterLayer[246].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5986) | |
{ | |
this.AniWaterLayer[250].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5971) | |
{ | |
this.AniWaterLayer[254].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5972) | |
{ | |
this.AniWaterLayer[258].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5979) | |
{ | |
this.AniWaterLayer[262].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5980) | |
{ | |
this.AniWaterLayer[266].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17645) | |
{ | |
this.AniWaterLayer[306].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17646) | |
{ | |
this.AniWaterLayer[310].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17647) | |
{ | |
this.AniWaterLayer[314].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17653) | |
{ | |
this.AniWaterLayer[318].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17654) | |
{ | |
this.AniWaterLayer[322].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17655) | |
{ | |
this.AniWaterLayer[326].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17661) | |
{ | |
this.AniWaterLayer[330].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17662) | |
{ | |
this.AniWaterLayer[334].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17663) | |
{ | |
this.AniWaterLayer[338].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17629) | |
{ | |
this.AniWaterLayer[342].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17630) | |
{ | |
this.AniWaterLayer[346].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17637) | |
{ | |
this.AniWaterLayer[350].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17638) | |
{ | |
this.AniWaterLayer[354].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 28306) | |
{ | |
this.AniWaterLayer[270].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 28314) | |
{ | |
this.AniWaterLayer[274].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 28304) | |
{ | |
this.AniWaterLayer[278].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 28312) | |
{ | |
this.AniWaterLayer[282].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 31321) | |
{ | |
this.AniWaterLayer[286].GetComponent<AniTiles>().addTile(vector, 1, this.Width, this.Height); | |
flag = true; | |
} | |
if (num11 == 31312 || num11 == 31313 || num11 == 31314 || num11 == 31315 || num11 == 31316 || num11 == 31320 || num11 == 31322 || num11 == 31323 || num11 == 31324 || num11 == 31328 || num11 == 31329 || num11 == 31330) | |
{ | |
this.AniWaterLayer[286].GetComponent<AniTiles>().addTile(vector, 1, this.Width, this.Height); | |
} | |
if (num11 == 22227) | |
{ | |
this.AniWaterLayer[290].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 6004) | |
{ | |
this.AniWaterLayer[294].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 1891) | |
{ | |
this.AniWaterLayer[298].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5942) | |
{ | |
this.AniWaterLayer[302].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27760) | |
{ | |
this.AniWaterLayer[358].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
UnityEngine.Object.Instantiate(this.EnviromentalSounds[0], vector + new Vector3(2f, 0f, -5f), Quaternion.identity); | |
} | |
if (num11 == 27761) | |
{ | |
this.AniWaterLayer[362].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27762) | |
{ | |
this.AniWaterLayer[366].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27763) | |
{ | |
this.AniWaterLayer[370].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27768) | |
{ | |
this.AniWaterLayer[374].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27769) | |
{ | |
this.AniWaterLayer[378].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27770) | |
{ | |
this.AniWaterLayer[382].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27771) | |
{ | |
this.AniWaterLayer[386].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27776) | |
{ | |
this.AniWaterLayer[390].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27777) | |
{ | |
this.AniWaterLayer[394].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27778) | |
{ | |
this.AniWaterLayer[398].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27779) | |
{ | |
this.AniWaterLayer[402].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27784) | |
{ | |
this.AniWaterLayer[406].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27785) | |
{ | |
this.AniWaterLayer[410].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27786) | |
{ | |
this.AniWaterLayer[414].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27787) | |
{ | |
this.AniWaterLayer[418].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27764) | |
{ | |
this.AniWaterLayer[422].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
UnityEngine.Object.Instantiate(this.EnviromentalSounds[0], vector + new Vector3(1f, 0f, -5f), Quaternion.identity); | |
} | |
if (num11 == 27765) | |
{ | |
this.AniWaterLayer[426].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27766) | |
{ | |
this.AniWaterLayer[430].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27772) | |
{ | |
this.AniWaterLayer[434].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27773) | |
{ | |
this.AniWaterLayer[438].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27774) | |
{ | |
this.AniWaterLayer[442].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27780) | |
{ | |
this.AniWaterLayer[446].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27781) | |
{ | |
this.AniWaterLayer[450].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27782) | |
{ | |
this.AniWaterLayer[454].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17008) | |
{ | |
this.AniWaterLayer[458].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17009) | |
{ | |
this.AniWaterLayer[462].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17010) | |
{ | |
this.AniWaterLayer[466].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17016) | |
{ | |
this.AniWaterLayer[470].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17017) | |
{ | |
this.AniWaterLayer[474].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17018) | |
{ | |
this.AniWaterLayer[478].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17024) | |
{ | |
this.AniWaterLayer[482].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17025) | |
{ | |
this.AniWaterLayer[486].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17026) | |
{ | |
this.AniWaterLayer[490].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17032) | |
{ | |
this.AniWaterLayer[494].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17033) | |
{ | |
this.AniWaterLayer[498].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17034) | |
{ | |
this.AniWaterLayer[502].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17040) | |
{ | |
this.AniWaterLayer[506].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17041) | |
{ | |
this.AniWaterLayer[510].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17042) | |
{ | |
this.AniWaterLayer[514].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17048) | |
{ | |
this.AniWaterLayer[518].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17049) | |
{ | |
this.AniWaterLayer[522].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17050) | |
{ | |
this.AniWaterLayer[526].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17056) | |
{ | |
this.AniWaterLayer[530].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17057) | |
{ | |
this.AniWaterLayer[534].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17058) | |
{ | |
this.AniWaterLayer[538].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17064) | |
{ | |
this.AniWaterLayer[542].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17065) | |
{ | |
this.AniWaterLayer[546].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17066) | |
{ | |
this.AniWaterLayer[550].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17072) | |
{ | |
this.AniWaterLayer[554].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17073) | |
{ | |
this.AniWaterLayer[558].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17074) | |
{ | |
this.AniWaterLayer[562].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17651) | |
{ | |
this.AniWaterLayer[586].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (!flag) | |
{ | |
for (int num18 = 0; num18 < num3; num18++) | |
{ | |
if (setUVs.TileY > (float)(num18 * 128) && setUVs.TileY <= (float)((num18 + 1) * 128)) | |
{ | |
int num13 = 0; | |
int num14 = array5[num18]; | |
for (int num19 = 0; num19 < num4; num19++) | |
{ | |
if (array5[num18] <= num5 || (array5[num18] > num19 * num5 && array5[num18] <= (num19 + 1) * num5)) | |
{ | |
num13 = num18 * num4 + num19; | |
if (array5[num18] > num5) | |
{ | |
num14 -= num5 * num19 + 1; | |
} | |
break; | |
} | |
} | |
this.newVertices3[num13].Add(new Vector3(vector.x, vector.y, vector.z)); | |
this.newVertices3[num13].Add(new Vector3(vector.x + 1f, vector.y, vector.z)); | |
this.newVertices3[num13].Add(new Vector3(vector.x, vector.y - 1f, vector.z)); | |
this.newVertices3[num13].Add(new Vector3(vector.x + 1f, vector.y - 1f, vector.z)); | |
this.newTriangles3[num13].Add(2 + num14 * 4); | |
this.newTriangles3[num13].Add(0 + num14 * 4); | |
this.newTriangles3[num13].Add(3 + num14 * 4); | |
this.newTriangles3[num13].Add(3 + num14 * 4); | |
this.newTriangles3[num13].Add(0 + num14 * 4); | |
this.newTriangles3[num13].Add(1 + num14 * 4); | |
this.newCount3[num13] = num14; | |
array5[num18]++; | |
setUVs.TileY += (float)(-(float)(128 * num18)); | |
if (setUVs.TileY > 32f && setUVs.TileY <= 64f) | |
{ | |
setUVs.TileY += -32f; | |
setUVs.TileX += 8f; | |
} | |
if (setUVs.TileY > 64f && setUVs.TileY <= 96f) | |
{ | |
setUVs.TileY += -64f; | |
setUVs.TileX += 16f; | |
} | |
if (setUVs.TileY > 96f && setUVs.TileY <= 128f) | |
{ | |
setUVs.TileY += -96f; | |
setUVs.TileX += 24f; | |
} | |
setUVs.Fix(); | |
this.newUV3[num13].Add(setUVs.uvSwap[2]); | |
this.newUV3[num13].Add(setUVs.uvSwap[0]); | |
this.newUV3[num13].Add(setUVs.uvSwap[1]); | |
this.newUV3[num13].Add(setUVs.uvSwap[3]); | |
break; | |
} | |
} | |
} | |
} | |
flag = false; | |
if (this.Tiles4[num9, num10] >= 1) | |
{ | |
int num11 = this.Tiles4[num9, num10]; | |
vector.x = (float)num9; | |
vector.y = (float)(-(float)num10); | |
vector.z = -0.01f; | |
if (num11 == 2224 || num11 == 7972 || num11 == 29726) | |
{ | |
UnityEngine.Object.Instantiate(this.EffectLight, vector + new Vector3(0f, 0f, -0f), Quaternion.identity); | |
} | |
else if (num11 == 14669) | |
{ | |
UnityEngine.Object.Instantiate(this.LightHousePrefab, vector + new Vector3(0f, 0f, -0.6f), new Quaternion(0f, -90f, -90f, 0f)); | |
UnityEngine.Object.Instantiate(this.LightHousePrefab1, vector + new Vector3(0f, -2.5f, -0.6f), Quaternion.identity); | |
} | |
else if (num11 == 8033 || num11 == 8036) | |
{ | |
UnityEngine.Object.Instantiate(this.EffectLight, vector + new Vector3(0f, -0.1f, 0f), Quaternion.identity); | |
} | |
else if (num11 == 7945) | |
{ | |
UnityEngine.Object.Instantiate(this.EffectLight, vector + new Vector3(-0.6f, 0.45f, -0f), Quaternion.identity); | |
} | |
else if (num11 == 23772) | |
{ | |
UnityEngine.Object.Instantiate(this.Turbines[0], vector + new Vector3(1.5f, -0.4f, -0f), Quaternion.identity); | |
} | |
else if (num11 == 23769) | |
{ | |
UnityEngine.Object.Instantiate(this.Turbines[1], vector + new Vector3(0.5f, -0.4f, -0f), Quaternion.identity); | |
} | |
else if (num11 == 2229) | |
{ | |
UnityEngine.Object.Instantiate(this.Lights[2], vector + new Vector3(0f, -0.1f, -0f), Quaternion.identity); | |
UnityEngine.Object.Instantiate(this.Lights[2], vector + new Vector3(1f, -0.1f, -0f), Quaternion.identity); | |
if (this.Quality == 1) | |
{ | |
UnityEngine.Object.Instantiate(this.Lights[3], vector + new Vector3(0.5f, -0.1f, -0f), Quaternion.identity); | |
} | |
} | |
else if (num11 == 38591) | |
{ | |
UnityEngine.Object.Instantiate(this.EffectLight, vector + new Vector3(-1f, -1f, -0f), Quaternion.identity); | |
} | |
else if (num11 == 38565) | |
{ | |
UnityEngine.Object.Instantiate(this.EffectLight, vector + new Vector3(1f, -1f, -0f), Quaternion.identity); | |
} | |
else if (num11 == 38559) | |
{ | |
if (this.Quality == 1) | |
{ | |
UnityEngine.Object.Instantiate(this.Lights[7], vector + new Vector3(0f, 0f, -0f), Quaternion.identity); | |
} | |
else | |
{ | |
UnityEngine.Object.Instantiate(this.Lights[1], vector + new Vector3(0f, 0.1f, -0f), Quaternion.identity); | |
} | |
} | |
else if (num11 == 5311) | |
{ | |
UnityEngine.Object.Instantiate(this.EffectLight, vector + new Vector3(0f, 0f, -0f), Quaternion.identity); | |
} | |
else if (num11 == 7946) | |
{ | |
UnityEngine.Object.Instantiate(this.EffectLight, vector + new Vector3(0.4f, 0.45f, -0f), Quaternion.identity); | |
} | |
else if (num11 == 7977) | |
{ | |
UnityEngine.Object.Instantiate(this.EffectLight, vector + new Vector3(-0.5f, 0.5f, -0f), Quaternion.identity); | |
} | |
else if (num11 == 7950) | |
{ | |
UnityEngine.Object.Instantiate(this.EffectLight, vector + new Vector3(0.5f, 0.5f, -0f), Quaternion.identity); | |
} | |
else if (num11 == 7949) | |
{ | |
UnityEngine.Object.Instantiate(this.EffectLight, vector + new Vector3(-0.5f, 0.5f, -0f), Quaternion.identity); | |
} | |
else if (num11 == 7973) | |
{ | |
UnityEngine.Object.Instantiate(this.EffectLight, vector + new Vector3(0f, 0f, -0f), Quaternion.identity); | |
} | |
else if (num11 == 37583) | |
{ | |
UnityEngine.Object.Instantiate(this.EffectLight, vector + new Vector3(0f, 0f, -0f), Quaternion.identity); | |
} | |
else if (num11 == 7978) | |
{ | |
UnityEngine.Object.Instantiate(this.EffectLight, vector + new Vector3(0.5f, 0.5f, -0f), Quaternion.identity); | |
} | |
else if (num11 == 5358) | |
{ | |
UnityEngine.Object.Instantiate(this.EffectLight, vector + new Vector3(0f, 0.4f, -0f), Quaternion.identity); | |
} | |
else if (num11 == 2225) | |
{ | |
UnityEngine.Object.Instantiate(this.EffectLight, vector + new Vector3(0.5f, 0f, -0f), Quaternion.identity); | |
} | |
else if (num11 == 2228) | |
{ | |
UnityEngine.Object.Instantiate(this.EffectLight, vector + new Vector3(-0.5f, 0f, -0f), Quaternion.identity); | |
} | |
else if (num11 == 10478) | |
{ | |
UnityEngine.Object.Instantiate(this.EffectLight, vector + new Vector3(0f, 0f, -0f), Quaternion.identity); | |
} | |
else if (num11 == 2635) | |
{ | |
UnityEngine.Object.Instantiate(this.EffectLight, vector + new Vector3(-0.65f, 0.2f, -0f), Quaternion.identity); | |
} | |
else if (num11 == 2636) | |
{ | |
UnityEngine.Object.Instantiate(this.EffectLight, vector + new Vector3(0.65f, 0.2f, -0f), Quaternion.identity); | |
} | |
else if (num11 == 2574) | |
{ | |
UnityEngine.Object.Instantiate(this.EffectLight, vector + new Vector3(0f, 0.1f, -0f), Quaternion.identity); | |
} | |
else if (num11 == 2593) | |
{ | |
UnityEngine.Object.Instantiate(this.EffectLight, vector + new Vector3(0f, -0.5f, -0f), Quaternion.identity); | |
} | |
else if (num11 == 28276) | |
{ | |
UnityEngine.Object.Instantiate(this.Lab1, vector + new Vector3(1.5f, -0.5f, -0.02f), Quaternion.identity); | |
} | |
else if (num11 == 28328) | |
{ | |
UnityEngine.Object.Instantiate(this.Lab2, vector + new Vector3(0.5f, 0f, 0f), Quaternion.identity); | |
flag = true; | |
} | |
else if (num11 == 22235) | |
{ | |
UnityEngine.Object.Instantiate(this.SkullLight1, vector + new Vector3(0f, -0.5f, 0f), Quaternion.identity); | |
flag = true; | |
} | |
else if (num11 == 22243) | |
{ | |
flag = true; | |
} | |
else if (num11 == 22237) | |
{ | |
UnityEngine.Object.Instantiate(this.SkullLight2, vector + new Vector3(0f, -0.5f, 0f), Quaternion.identity); | |
flag = true; | |
} | |
else if (num11 == 22245) | |
{ | |
flag = true; | |
} | |
else if (num11 == 28329) | |
{ | |
flag = true; | |
} | |
else if (num11 == 17590 || num11 == 17507) | |
{ | |
GameObject gameObject = UnityEngine.Object.Instantiate(this.LadderTop, new Vector3(vector.x, vector.y, (vector.y - 1f) / 30000f + 2E-05f), Quaternion.identity) as GameObject; | |
flag = true; | |
} | |
else if (num11 == 19926) | |
{ | |
GameObject gameObject2 = UnityEngine.Object.Instantiate(this.LadderTop2, new Vector3(vector.x, vector.y, (vector.y - 1f) / 30000f + 2E-05f), Quaternion.identity) as GameObject; | |
flag = true; | |
} | |
if (num11 == 5897) | |
{ | |
this.AniWaterLayer[3].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5896) | |
{ | |
this.AniWaterLayer[7].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5898) | |
{ | |
this.AniWaterLayer[11].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5888) | |
{ | |
this.AniWaterLayer[15].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5889) | |
{ | |
this.AniWaterLayer[19].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5890) | |
{ | |
this.AniWaterLayer[23].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5904) | |
{ | |
this.AniWaterLayer[27].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5905) | |
{ | |
this.AniWaterLayer[31].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5906) | |
{ | |
this.AniWaterLayer[35].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5891) | |
{ | |
this.AniWaterLayer[39].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5892) | |
{ | |
this.AniWaterLayer[43].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5899) | |
{ | |
this.AniWaterLayer[47].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 5900) | |
{ | |
this.AniWaterLayer[51].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 62) | |
{ | |
this.AniWaterLayer[55].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 78) | |
{ | |
flag = true; | |
} | |
if (num11 == 79) | |
{ | |
flag = true; | |
} | |
if (num11 == 6488) | |
{ | |
this.AniWaterLayer[187].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 6489) | |
{ | |
this.AniWaterLayer[191].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 6490) | |
{ | |
this.AniWaterLayer[195].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 6496) | |
{ | |
this.AniWaterLayer[199].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 6497) | |
{ | |
this.AniWaterLayer[203].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 6498) | |
{ | |
this.AniWaterLayer[207].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 28306) | |
{ | |
this.AniWaterLayer[271].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 28314) | |
{ | |
this.AniWaterLayer[275].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 28304) | |
{ | |
this.AniWaterLayer[279].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 28312) | |
{ | |
this.AniWaterLayer[283].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 22227) | |
{ | |
this.AniWaterLayer[291].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 6004) | |
{ | |
this.AniWaterLayer[295].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 1891) | |
{ | |
this.AniWaterLayer[299].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27760) | |
{ | |
this.AniWaterLayer[359].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
UnityEngine.Object.Instantiate(this.EnviromentalSounds[0], vector + new Vector3(2f, 0f, -5f), Quaternion.identity); | |
} | |
if (num11 == 27761) | |
{ | |
this.AniWaterLayer[363].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27762) | |
{ | |
this.AniWaterLayer[367].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27763) | |
{ | |
this.AniWaterLayer[371].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27768) | |
{ | |
this.AniWaterLayer[375].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27769) | |
{ | |
this.AniWaterLayer[379].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27770) | |
{ | |
this.AniWaterLayer[383].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27771) | |
{ | |
this.AniWaterLayer[387].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27776) | |
{ | |
this.AniWaterLayer[391].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27777) | |
{ | |
this.AniWaterLayer[395].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27778) | |
{ | |
this.AniWaterLayer[399].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27779) | |
{ | |
this.AniWaterLayer[403].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27784) | |
{ | |
this.AniWaterLayer[407].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27785) | |
{ | |
this.AniWaterLayer[411].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27786) | |
{ | |
this.AniWaterLayer[415].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27787) | |
{ | |
this.AniWaterLayer[419].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27764) | |
{ | |
this.AniWaterLayer[423].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
UnityEngine.Object.Instantiate(this.EnviromentalSounds[0], vector + new Vector3(1f, 0f, -5f), Quaternion.identity); | |
} | |
if (num11 == 27765) | |
{ | |
this.AniWaterLayer[427].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27766) | |
{ | |
this.AniWaterLayer[431].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27772) | |
{ | |
this.AniWaterLayer[435].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27773) | |
{ | |
this.AniWaterLayer[439].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27774) | |
{ | |
this.AniWaterLayer[443].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27780) | |
{ | |
this.AniWaterLayer[447].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27781) | |
{ | |
this.AniWaterLayer[451].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 27782) | |
{ | |
this.AniWaterLayer[455].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17008) | |
{ | |
this.AniWaterLayer[459].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17009) | |
{ | |
this.AniWaterLayer[463].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17010) | |
{ | |
this.AniWaterLayer[467].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17016) | |
{ | |
this.AniWaterLayer[471].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17017) | |
{ | |
this.AniWaterLayer[475].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17018) | |
{ | |
this.AniWaterLayer[479].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17024) | |
{ | |
this.AniWaterLayer[483].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17025) | |
{ | |
this.AniWaterLayer[487].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17026) | |
{ | |
this.AniWaterLayer[491].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17032) | |
{ | |
this.AniWaterLayer[495].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17033) | |
{ | |
this.AniWaterLayer[499].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17034) | |
{ | |
this.AniWaterLayer[503].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17040) | |
{ | |
this.AniWaterLayer[507].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17041) | |
{ | |
this.AniWaterLayer[511].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17042) | |
{ | |
this.AniWaterLayer[515].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17048) | |
{ | |
this.AniWaterLayer[519].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17049) | |
{ | |
this.AniWaterLayer[523].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17050) | |
{ | |
this.AniWaterLayer[527].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17056) | |
{ | |
this.AniWaterLayer[531].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17057) | |
{ | |
this.AniWaterLayer[535].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17058) | |
{ | |
this.AniWaterLayer[539].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17064) | |
{ | |
this.AniWaterLayer[543].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17065) | |
{ | |
this.AniWaterLayer[547].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17066) | |
{ | |
this.AniWaterLayer[551].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17072) | |
{ | |
this.AniWaterLayer[555].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17073) | |
{ | |
this.AniWaterLayer[559].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 17074) | |
{ | |
this.AniWaterLayer[563].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 19854) | |
{ | |
this.AniWaterLayer[571].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
if (this.Quality == 1) | |
{ | |
UnityEngine.Object.Instantiate(this.Lights[4], new Vector3(vector.x + 0.5f, vector.y - 0.5f, -5f), Quaternion.identity); | |
} | |
else | |
{ | |
UnityEngine.Object.Instantiate(this.Lights[5], new Vector3(vector.x + 0.5f, vector.y - 0.5f, -5f), Quaternion.identity); | |
} | |
} | |
if (num11 == 19855) | |
{ | |
this.AniWaterLayer[575].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 19862) | |
{ | |
this.AniWaterLayer[579].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (num11 == 19863) | |
{ | |
this.AniWaterLayer[583].GetComponent<AniTiles>().addTile(vector, 1, 1, 1); | |
flag = true; | |
} | |
if (((float)num11 / 8f - (float)(num11 / 8)) * 8f < 0f) | |
{ | |
setUVs.TileX = 8f - ((float)num11 / 8f - (float)(num11 / 8)) * 8f; | |
} | |
else | |
{ | |
setUVs.TileX = ((float)num11 / 8f - (float)(num11 / 8)) * 8f; | |
} | |
setUVs.TileX += 1f; | |
setUVs.TileY = (float)(num11 / 8 + 1); | |
if (!flag) | |
{ | |
for (int num20 = 0; num20 < num3; num20++) | |
{ | |
if (setUVs.TileY > (float)(num20 * 128) && setUVs.TileY <= (float)((num20 + 1) * 128)) | |
{ | |
int num13 = 0; | |
int num14 = array6[num20]; | |
for (int num21 = 0; num21 < num4; num21++) | |
{ | |
if (num21 == 0 || (array6[num20] > num21 * num5 && array6[num20] <= (num21 + 1) * num5)) | |
{ | |
num13 = num20 * num4 + num21; | |
if (array6[num20] > num5) | |
{ | |
num14 -= num5 * num21 + 1; | |
} | |
break; | |
} | |
} | |
this.newCount4[num13] = num14; | |
this.newVertices4[num13].Add(new Vector3(vector.x, vector.y, vector.z)); | |
this.newVertices4[num13].Add(new Vector3(vector.x + 1f, vector.y, vector.z)); | |
this.newVertices4[num13].Add(new Vector3(vector.x, vector.y - 1f, vector.z)); | |
this.newVertices4[num13].Add(new Vector3(vector.x + 1f, vector.y - 1f, vector.z)); | |
this.newTriangles4[num13].Add(2 + num14 * 4); | |
this.newTriangles4[num13].Add(0 + num14 * 4); | |
this.newTriangles4[num13].Add(3 + num14 * 4); | |
this.newTriangles4[num13].Add(3 + num14 * 4); | |
this.newTriangles4[num13].Add(0 + num14 * 4); | |
this.newTriangles4[num13].Add(1 + num14 * 4); | |
array6[num20]++; | |
setUVs.TileY += (float)(-(float)(128 * num20)); | |
if (setUVs.TileY > 32f && setUVs.TileY <= 64f) | |
{ | |
setUVs.TileY += -32f; | |
setUVs.TileX += 8f; | |
} | |
if (setUVs.TileY > 64f && setUVs.TileY <= 96f) | |
{ | |
setUVs.TileY += -64f; | |
setUVs.TileX += 16f; | |
} | |
if (setUVs.TileY > 96f && setUVs.TileY <= 128f) | |
{ | |
setUVs.TileY += -96f; | |
setUVs.TileX += 24f; | |
} | |
setUVs.Fix(); | |
this.newUV4[num13].Add(setUVs.uvSwap[2]); | |
this.newUV4[num13].Add(setUVs.uvSwap[0]); | |
this.newUV4[num13].Add(setUVs.uvSwap[1]); | |
this.newUV4[num13].Add(setUVs.uvSwap[3]); | |
break; | |
} | |
} | |
} | |
} | |
} | |
} | |
num = 0; | |
num2 = 0; | |
for (int num22 = 0; num22 < num6; num22++) | |
{ | |
if (this.newVertices[num22].Count > 0) | |
{ | |
this.TileMaker[num22].GetComponent<Renderer>().material = (Resources.Load("MapMaterial/" + (num2 + 1).ToString(), typeof(Material)) as Material); | |
int num23 = this.newCount1[num22] + 1; | |
int index = this.newVertices[num22].Count - 1; | |
this.newVertices[num22].Add(new Vector3(this.newVertices[num22][index].x, this.newVertices[num22][index].y, 0f)); | |
this.newVertices[num22].Add(new Vector3(this.newVertices[num22][index].x, this.newVertices[num22][index].y, 0f)); | |
this.newVertices[num22].Add(new Vector3(this.newVertices[num22][index].x, this.newVertices[num22][index].y, 0f)); | |
this.newVertices[num22].Add(new Vector3(this.newVertices[num22][index].x, this.newVertices[num22][index].y, 0f)); | |
this.newTriangles[num22].Add(2 + num23 * 4); | |
this.newTriangles[num22].Add(0 + num23 * 4); | |
this.newTriangles[num22].Add(3 + num23 * 4); | |
this.newTriangles[num22].Add(3 + num23 * 4); | |
this.newTriangles[num22].Add(0 + num23 * 4); | |
this.newTriangles[num22].Add(1 + num23 * 4); | |
this.newUV[num22].Add(new Vector2(0f, 0f)); | |
this.newUV[num22].Add(new Vector2(0f, 0f)); | |
this.newUV[num22].Add(new Vector2(0f, 0f)); | |
this.newUV[num22].Add(new Vector2(0f, 0f)); | |
this.TileMaker[num22].SetActive(true); | |
this.mesh = this.TileMaker[num22].GetComponent<MeshFilter>().mesh; | |
this.mesh.Clear(); | |
this.mesh.vertices = this.newVertices[num22].ToArray(); | |
this.mesh.triangles = this.newTriangles[num22].ToArray(); | |
this.mesh.uv = this.newUV[num22].ToArray(); | |
this.mesh.Optimize(); | |
this.mesh.RecalculateNormals(); | |
this.TileMaker[num22].GetComponent<Renderer>().sortingOrder = -4; | |
} | |
else | |
{ | |
UnityEngine.Object.Destroy(this.TileMaker[num22]); | |
} | |
num++; | |
if (num >= num4) | |
{ | |
num = 0; | |
num2++; | |
} | |
} | |
num = 0; | |
num2 = 0; | |
for (int num24 = 0; num24 < num6; num24++) | |
{ | |
if (this.newVertices2[num24].Count > 0) | |
{ | |
this.TileMaker[num24 + num6].GetComponent<Renderer>().material = (Resources.Load("MapMaterial/" + (num2 + 1).ToString(), typeof(Material)) as Material); | |
int num25 = this.newCount2[num24] + 1; | |
int index2 = this.newVertices2[num24].Count - 1; | |
this.newVertices2[num24].Add(new Vector3(this.newVertices2[num24][index2].x, this.newVertices2[num24][index2].y, 0f)); | |
this.newVertices2[num24].Add(new Vector3(this.newVertices2[num24][index2].x, this.newVertices2[num24][index2].y, 0f)); | |
this.newVertices2[num24].Add(new Vector3(this.newVertices2[num24][index2].x, this.newVertices2[num24][index2].y, 0f)); | |
this.newVertices2[num24].Add(new Vector3(this.newVertices2[num24][index2].x, this.newVertices2[num24][index2].y, 0f)); | |
this.newTriangles2[num24].Add(2 + num25 * 4); | |
this.newTriangles2[num24].Add(0 + num25 * 4); | |
this.newTriangles2[num24].Add(3 + num25 * 4); | |
this.newTriangles2[num24].Add(3 + num25 * 4); | |
this.newTriangles2[num24].Add(0 + num25 * 4); | |
this.newTriangles2[num24].Add(1 + num25 * 4); | |
this.newUV2[num24].Add(new Vector2(0f, 0f)); | |
this.newUV2[num24].Add(new Vector2(0f, 0f)); | |
this.newUV2[num24].Add(new Vector2(0f, 0f)); | |
this.newUV2[num24].Add(new Vector2(0f, 0f)); | |
this.mesh = this.TileMaker[num24 + num6].GetComponent<MeshFilter>().mesh; | |
this.mesh.Clear(); | |
this.mesh.vertices = this.newVertices2[num24].ToArray(); | |
this.mesh.triangles = this.newTriangles2[num24].ToArray(); | |
this.mesh.uv = this.newUV2[num24].ToArray(); | |
this.mesh.Optimize(); | |
this.mesh.RecalculateNormals(); | |
this.TileMaker[num24 + num6].GetComponent<Renderer>().sortingOrder = -2; | |
} | |
else | |
{ | |
UnityEngine.Object.Destroy(this.TileMaker[num24 + num6]); | |
} | |
num++; | |
if (num >= num4) | |
{ | |
num = 0; | |
num2++; | |
} | |
} | |
num = 0; | |
num2 = 0; | |
for (int num26 = 0; num26 < num6; num26++) | |
{ | |
if (this.newVertices3[num26].Count > 0) | |
{ | |
this.TileMaker[num26 + num6 * 2].GetComponent<Renderer>().material = (Resources.Load("MapMaterial/" + (num2 + 1).ToString(), typeof(Material)) as Material); | |
int num27 = this.newCount3[num26] + 1; | |
int index3 = this.newVertices3[num26].Count - 1; | |
this.newVertices3[num26].Add(new Vector3(this.newVertices3[num26][index3].x, this.newVertices3[num26][index3].y, 0f)); | |
this.newVertices3[num26].Add(new Vector3(this.newVertices3[num26][index3].x, this.newVertices3[num26][index3].y, 0f)); | |
this.newVertices3[num26].Add(new Vector3(this.newVertices3[num26][index3].x, this.newVertices3[num26][index3].y, 0f)); | |
this.newVertices3[num26].Add(new Vector3(this.newVertices3[num26][index3].x, this.newVertices3[num26][index3].y, 0f)); | |
this.newTriangles3[num26].Add(2 + num27 * 4); | |
this.newTriangles3[num26].Add(0 + num27 * 4); | |
this.newTriangles3[num26].Add(3 + num27 * 4); | |
this.newTriangles3[num26].Add(3 + num27 * 4); | |
this.newTriangles3[num26].Add(0 + num27 * 4); | |
this.newTriangles3[num26].Add(1 + num27 * 4); | |
this.newUV3[num26].Add(new Vector2(0f, 0f)); | |
this.newUV3[num26].Add(new Vector2(0f, 0f)); | |
this.newUV3[num26].Add(new Vector2(0f, 0f)); | |
this.newUV3[num26].Add(new Vector2(0f, 0f)); | |
this.mesh = this.TileMaker[num26 + num6 * 2].GetComponent<MeshFilter>().mesh; | |
this.mesh.Clear(); | |
this.mesh.vertices = this.newVertices3[num26].ToArray(); | |
this.mesh.triangles = this.newTriangles3[num26].ToArray(); | |
this.mesh.uv = this.newUV3[num26].ToArray(); | |
this.mesh.Optimize(); | |
this.mesh.RecalculateNormals(); | |
this.TileMaker[num26 + num6 * 2].GetComponent<Renderer>().sortingOrder = -1; | |
} | |
else | |
{ | |
UnityEngine.Object.Destroy(this.TileMaker[num26 + num6 * 2]); | |
} | |
num++; | |
if (num >= num4) | |
{ | |
num = 0; | |
num2++; | |
} | |
} | |
num = 0; | |
num2 = 0; | |
for (int num28 = 0; num28 < num6; num28++) | |
{ | |
if (this.newVertices4[num28].Count > 0) | |
{ | |
this.TileMaker[num28 + num6 * 3].GetComponent<Renderer>().material = (Resources.Load("MapMaterial/" + (num2 + 1).ToString(), typeof(Material)) as Material); | |
int num29 = this.newCount4[num28] + 1; | |
int index4 = this.newVertices4[num28].Count - 1; | |
this.newVertices4[num28].Add(new Vector3(this.newVertices4[num28][index4].x, this.newVertices4[num28][index4].y, 0f)); | |
this.newVertices4[num28].Add(new Vector3(this.newVertices4[num28][index4].x, this.newVertices4[num28][index4].y, 0f)); | |
this.newVertices4[num28].Add(new Vector3(this.newVertices4[num28][index4].x, this.newVertices4[num28][index4].y, 0f)); | |
this.newVertices4[num28].Add(new Vector3(this.newVertices4[num28][index4].x, this.newVertices4[num28][index4].y, 0f)); | |
this.newTriangles4[num28].Add(2 + num29 * 4); | |
this.newTriangles4[num28].Add(0 + num29 * 4); | |
this.newTriangles4[num28].Add(3 + num29 * 4); | |
this.newTriangles4[num28].Add(3 + num29 * 4); | |
this.newTriangles4[num28].Add(0 + num29 * 4); | |
this.newTriangles4[num28].Add(1 + num29 * 4); | |
this.newUV4[num28].Add(new Vector2(0f, 0f)); | |
this.newUV4[num28].Add(new Vector2(0f, 0f)); | |
this.newUV4[num28].Add(new Vector2(0f, 0f)); | |
this.newUV4[num28].Add(new Vector2(0f, 0f)); | |
this.mesh = this.TileMaker[num28 + num6 * 3].GetComponent<MeshFilter>().mesh; | |
this.mesh.Clear(); | |
this.mesh.vertices = this.newVertices4[num28].ToArray(); | |
this.mesh.triangles = this.newTriangles4[num28].ToArray(); | |
this.mesh.uv = this.newUV4[num28].ToArray(); | |
this.mesh.Optimize(); | |
this.mesh.RecalculateNormals(); | |
} | |
else | |
{ | |
UnityEngine.Object.Destroy(this.TileMaker[num28 + num6 * 3]); | |
} | |
num++; | |
if (num >= num4) | |
{ | |
num = 0; | |
num2++; | |
} | |
} | |
for (int num30 = 0; num30 < MapCreator.Animations * 4; num30++) | |
{ | |
this.AniWaterLayer[num30].GetComponent<AniTiles>().CreateLayer(); | |
} | |
this.AniWaterLayer[284].transform.position += new Vector3(0f, 0f, 0.1f); | |
this.AniWaterLayer[285].transform.position += new Vector3(0f, 0f, 0.1f); | |
this.AniWaterLayer[285].GetComponent<Renderer>().sortingOrder = -3; | |
this.AniWaterLayer[286].transform.position += new Vector3(0f, 0f, 0.1f); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment