public void NewGamePlusLoad() { ProceduralGenerationOnMesh.serializedInformation desertInfo = new ProceduralGenerationOnMesh.serializedInformation(); desertInfo.samplePointKeys = desertSamplePointChunks; desertInfo.samplePointLocations = desertSamplePointLocations; desertInfo.samplePointObjects = desertSamplePointObjectNames; desertInfo.triangleIndexes = desertTriangleIndexes; desertInfo.samplePointSizes = desertSamplePointSizes; ProceduralGenerationOnMesh.serializedInformation iceInfo = new ProceduralGenerationOnMesh.serializedInformation(); iceInfo.samplePointKeys = iceSamplePointChunks; iceInfo.samplePointLocations = iceSamplePointLocations; iceInfo.samplePointObjects = iceSamplePointObjectNames; iceInfo.triangleIndexes = iceTriangleIndexes; iceInfo.samplePointSizes = iceSamplePointSizes; SaveSystem.Instance.NewGamePlus = false; newGamePlus = SaveSystem.Instance.NewGamePlus; if (ProceduralGenerationOnMesh.serializedSamplePointsByPlanet.ContainsKey("DesertPlanet")) { ProceduralGenerationOnMesh.serializedSamplePointsByPlanet ["DesertPlanet"] = desertInfo; } else { ProceduralGenerationOnMesh.serializedSamplePointsByPlanet.Add("DesertPlanet", desertInfo); } if (ProceduralGenerationOnMesh.serializedSamplePointsByPlanet.ContainsKey("IcePlanet")) { Debug.Log(System.Environment.StackTrace); ProceduralGenerationOnMesh.serializedSamplePointsByPlanet ["IcePlanet"] = iceInfo; } else { ProceduralGenerationOnMesh.serializedSamplePointsByPlanet.Add("IcePlanet", iceInfo); } int multi = 1; for (int i = 0; i < TimesBeaten; i++) { multi = multi * 2; } ScoreManager.Instance.SetMultiplier(multi); loadFinished = true; }
public void NewGamePlusLoad() { ProceduralGenerationOnMesh.serializedInformation desertInfo = new ProceduralGenerationOnMesh.serializedInformation (); desertInfo.samplePointKeys = desertSamplePointChunks; desertInfo.samplePointLocations = desertSamplePointLocations; desertInfo.samplePointObjects = desertSamplePointObjectNames; desertInfo.triangleIndexes = desertTriangleIndexes; desertInfo.samplePointSizes = desertSamplePointSizes; ProceduralGenerationOnMesh.serializedInformation iceInfo = new ProceduralGenerationOnMesh.serializedInformation (); iceInfo.samplePointKeys = iceSamplePointChunks; iceInfo.samplePointLocations = iceSamplePointLocations; iceInfo.samplePointObjects = iceSamplePointObjectNames; iceInfo.triangleIndexes = iceTriangleIndexes; iceInfo.samplePointSizes = iceSamplePointSizes; SaveSystem.Instance.NewGamePlus = false; newGamePlus = SaveSystem.Instance.NewGamePlus; if (ProceduralGenerationOnMesh.serializedSamplePointsByPlanet.ContainsKey ("DesertPlanet")) { ProceduralGenerationOnMesh.serializedSamplePointsByPlanet ["DesertPlanet"] = desertInfo; } else { ProceduralGenerationOnMesh.serializedSamplePointsByPlanet.Add ("DesertPlanet", desertInfo); } if (ProceduralGenerationOnMesh.serializedSamplePointsByPlanet.ContainsKey ("IcePlanet")) { Debug.Log (System.Environment.StackTrace); ProceduralGenerationOnMesh.serializedSamplePointsByPlanet ["IcePlanet"] = iceInfo; } else { ProceduralGenerationOnMesh.serializedSamplePointsByPlanet.Add ("IcePlanet", iceInfo); } int multi = 1; for(int i = 0; i < TimesBeaten; i++) { multi = multi * 2; } ScoreManager.Instance.SetMultiplier (multi); loadFinished = true; }
public void Load() { //ScoreManager.Instance.score = Score; //ScoreManager.Instance.SetMultiplier(Multiplier); SaveSystem.Instance.TimesBeaten = TimesBeaten; Player.Instance.transform.position = PlayerPosition; Player.Instance.transform.rotation = PlayerRotation; Player.Instance.GetComponent<InterplanetaryObject> ().NearestPlanet = InterplanetaryObject.GetNearestPlanet (PlayerPosition); PickupCache.Instance.LaserBeam.GetComponent<Weapon> ().ammo = BeamAmmo; PickupCache.Instance.Mine.GetComponent<Weapon> ().ammo = MineAmmo; PickupCache.Instance.Rocket.GetComponent<Weapon> ().ammo = RocketAmmo; if (TankBossDead) Destroy(BossManager.Instance.Planet1Tank); if (ScorpionDead) Destroy(BossManager.Instance.Scorpion); if (MineLayerDead) Destroy(BossManager.Instance.MineLayer); if (GoliathDead) Destroy(BossManager.Instance.Goliath); ProceduralGenerationOnMesh.serializedInformation desertInfo = new ProceduralGenerationOnMesh.serializedInformation (); desertInfo.samplePointKeys = desertSamplePointChunks; desertInfo.samplePointLocations = desertSamplePointLocations; desertInfo.samplePointObjects = desertSamplePointObjectNames; desertInfo.triangleIndexes = desertTriangleIndexes; desertInfo.samplePointSizes = desertSamplePointSizes; ProceduralGenerationOnMesh.serializedInformation iceInfo = new ProceduralGenerationOnMesh.serializedInformation (); iceInfo.samplePointKeys = iceSamplePointChunks; iceInfo.samplePointLocations = iceSamplePointLocations; iceInfo.samplePointObjects = iceSamplePointObjectNames; iceInfo.triangleIndexes = iceTriangleIndexes; iceInfo.samplePointSizes = iceSamplePointSizes; if (ProceduralGenerationOnMesh.serializedSamplePointsByPlanet.ContainsKey ("DesertPlanet")) { ProceduralGenerationOnMesh.serializedSamplePointsByPlanet ["DesertPlanet"] = desertInfo; } else { ProceduralGenerationOnMesh.serializedSamplePointsByPlanet.Add ("DesertPlanet", desertInfo); } if (ProceduralGenerationOnMesh.serializedSamplePointsByPlanet.ContainsKey ("IcePlanet")) { Debug.Log (System.Environment.StackTrace); ProceduralGenerationOnMesh.serializedSamplePointsByPlanet ["IcePlanet"] = iceInfo; } else { ProceduralGenerationOnMesh.serializedSamplePointsByPlanet.Add ("IcePlanet", iceInfo); } int multi = 1; for(int i = 0; i < TimesBeaten; i++) { multi = multi * 2; } ScoreManager.Instance.SetMultiplier (multi); loadFinished = true; }
public void Load() { //ScoreManager.Instance.score = Score; //ScoreManager.Instance.SetMultiplier(Multiplier); SaveSystem.Instance.TimesBeaten = TimesBeaten; Player.Instance.transform.position = PlayerPosition; Player.Instance.transform.rotation = PlayerRotation; Player.Instance.GetComponent <InterplanetaryObject> ().NearestPlanet = InterplanetaryObject.GetNearestPlanet(PlayerPosition); PickupCache.Instance.LaserBeam.GetComponent <Weapon> ().ammo = BeamAmmo; PickupCache.Instance.Mine.GetComponent <Weapon> ().ammo = MineAmmo; PickupCache.Instance.Rocket.GetComponent <Weapon> ().ammo = RocketAmmo; if (TankBossDead) { Destroy(BossManager.Instance.Planet1Tank); } if (ScorpionDead) { Destroy(BossManager.Instance.Scorpion); } if (MineLayerDead) { Destroy(BossManager.Instance.MineLayer); } if (GoliathDead) { Destroy(BossManager.Instance.Goliath); } ProceduralGenerationOnMesh.serializedInformation desertInfo = new ProceduralGenerationOnMesh.serializedInformation(); desertInfo.samplePointKeys = desertSamplePointChunks; desertInfo.samplePointLocations = desertSamplePointLocations; desertInfo.samplePointObjects = desertSamplePointObjectNames; desertInfo.triangleIndexes = desertTriangleIndexes; desertInfo.samplePointSizes = desertSamplePointSizes; ProceduralGenerationOnMesh.serializedInformation iceInfo = new ProceduralGenerationOnMesh.serializedInformation(); iceInfo.samplePointKeys = iceSamplePointChunks; iceInfo.samplePointLocations = iceSamplePointLocations; iceInfo.samplePointObjects = iceSamplePointObjectNames; iceInfo.triangleIndexes = iceTriangleIndexes; iceInfo.samplePointSizes = iceSamplePointSizes; if (ProceduralGenerationOnMesh.serializedSamplePointsByPlanet.ContainsKey("DesertPlanet")) { ProceduralGenerationOnMesh.serializedSamplePointsByPlanet ["DesertPlanet"] = desertInfo; } else { ProceduralGenerationOnMesh.serializedSamplePointsByPlanet.Add("DesertPlanet", desertInfo); } if (ProceduralGenerationOnMesh.serializedSamplePointsByPlanet.ContainsKey("IcePlanet")) { Debug.Log(System.Environment.StackTrace); ProceduralGenerationOnMesh.serializedSamplePointsByPlanet ["IcePlanet"] = iceInfo; } else { ProceduralGenerationOnMesh.serializedSamplePointsByPlanet.Add("IcePlanet", iceInfo); } int multi = 1; for (int i = 0; i < TimesBeaten; i++) { multi = multi * 2; } ScoreManager.Instance.SetMultiplier(multi); loadFinished = true; }