/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void Start() { //-------------- Class_AdditionalTools.RandomName(gameObject, "Forest"); StartCoroutine(Class_Forest.Generation(thisTransform, treesMaterial)); //-------------- }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void Start() { //-------------- Class_AdditionalTools.RandomName(gameObject, "Chunk Landscape"); StartCoroutine(Class_Landscape.GenChunkLandscape(transform)); //-------------- }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void Start() { //-------------- Class_AdditionalTools.RandomName(gameObject, "Asteroids Group"); StartCoroutine(Class_Asteroid.GenAsteroidsGroup(transform, asteroid, asteroidGroupRadius, asteroidSize)); //-------------- }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void Start() { //-------------- Class_AdditionalTools.RandomName(gameObject, "Tree"); StartCoroutine(Optimization()); //-------------- }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void Start() { //-------------- Class_AdditionalTools.RandomName(gameObject, "Moon"); sqrtDistanceLod = Mathf.Pow(Class_Interface.distanceLod, 2); scaleMoon = Mathf.Abs(Class_AdditionalTools.PositionSeed(thisTransform, 0.112f)); thisTransform.localScale = Vector3.one * (1 + (scaleMoon * 2)); randomRotationUp = Class_AdditionalTools.PositionSeed(thisTransform, 0.179f) * 0.03f; randomRotationLeft = Class_AdditionalTools.PositionSeed(thisTransform, 0.813f) * 0.03f; float uvOffsetX = Mathf.Abs(Class_AdditionalTools.PositionSeed(thisTransform, 0.123f)); landscape.GetComponent <Landscape>().uvOffset = new Vector2(uvOffsetX, 0.5f); //-------------- moonCube = ChunkCubesPool.GiveCube(); moonCubeTransform = moonCube.transform; moonCube.GetComponent <ChunkCube>().uvOffset = new Vector2(uvOffsetX, 0.5f); moonCubeTransform.parent = thisTransform; moonCubeTransform.localScale = Vector3.one * 10; moonCubeTransform.SetPositionAndRotation(thisTransform.position, thisTransform.rotation); moonCube.SetActive(true); //-------------- if (Mathf.Abs(Class_AdditionalTools.PositionSeed(thisTransform, 0.151f)) < 0.6f) { atmosphere.SetActive(false); } else { atmosphere.transform.localRotation = Quaternion.Euler(Mathf.Cos(uvOffsetX * 1.1f) * 16, Mathf.Cos(uvOffsetX * 2.2f) * 16, Mathf.Cos(uvOffsetX * 3.3f) * 16); } if (Mathf.Abs(Class_AdditionalTools.PositionSeed(thisTransform, 125.15f)) < 0.5f) { satellitesOrbit.SetActive(false); noSatellites = true; } else { StartCoroutine(Class_Moon.GenSatellites(thisTransform, satellitesOrbitTransform, scaleMoon, uvOffsetX)); } //-------------- StartCoroutine(Optimization()); StartCoroutine(FakeFixedUpdate()); //-------------- }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void Start() { //-------------- Class_AdditionalTools.RandomName(gameObject, "Cloud"); int amountClouds = 3 + Mathf.RoundToInt(Mathf.Abs(Class_AdditionalTools.PositionSeed(transform, 7.141f)) * 9); StartCoroutine(Class_Atmosphere.GenCloud(transform, cloud, uvOffset, amountClouds)); //-------------- }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void Start() { //-------------- Class_AdditionalTools.RandomName(gameObject, "Asteroid"); Class_AdditionalTools.RandomName(asteroidCubes, "Asteroid Cubes"); thisTransform.localRotation = Quaternion.Euler(Class_AdditionalTools.PositionSeed(thisTransform, 1.1f) * 90, Class_AdditionalTools.PositionSeed(thisTransform, 2.2f) * 90, Class_AdditionalTools.PositionSeed(thisTransform, 3.3f) * 90); int amountAsteroids = minAmountDetails + Mathf.RoundToInt(Mathf.Abs(Class_AdditionalTools.PositionSeed(transform, 8.98f)) * maxAmountDetails); StartCoroutine(Class_Asteroid.GenAsteroid(thisTransform, asteroidCubes.transform, Mathf.Pow(Class_Interface.distanceLod, 2), asteroidCubes, lod, amountAsteroids)); //-------------- }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void OnEnable() { //-------------- Class_AdditionalTools.RandomName(gameObject, "Debris"); thisRigidbody.AddExplosionForce(Random.Range(100, 210), thisTransform.position + Random.onUnitSphere, 1); brokenStage0 = false; counter0 = 0; //-------------- StartCoroutine(Optimization()); //-------------- }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void Start() { //-------------- Class_AdditionalTools.RandomName(gameObject, "Atmosphere"); uvOffset = new Vector2(Mathf.Abs(Class_AdditionalTools.PositionSeed(thisTransform, 0.141f)), 0.5f); Class_AdditionalTools.UvMesh(GetComponent <MeshFilter>().mesh, uvOffset.x, uvOffset.y); int amountClouds = 10 + Mathf.RoundToInt(Mathf.Abs(Class_AdditionalTools.PositionSeed(transform, 3.141f)) * 25); if (cloudsOn == true) { StartCoroutine(Class_Atmosphere.GenAtmosphere(thisTransform, clouds, amountClouds, uvOffset)); } //-------------- }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void Start() { //-------------- Class_AdditionalTools.RandomName(gameObject, "Planet"); sqrtDistanceLod = Mathf.Pow(Class_Interface.distanceLod, 2); Class_PlanetarySystem.listPlanets.Add(gameObject); randomRotationUp = Class_AdditionalTools.PositionSeed(thisTransform, 0.39f) * 0.025f; randomRotationLeft = Class_AdditionalTools.PositionSeed(thisTransform, 0.719f) * 0.025f; float uvOffsetX = Mathf.Abs(Class_AdditionalTools.PositionSeed(thisTransform, 0.115f)); landscape.GetComponent <Landscape>().uvOffset = new Vector2(uvOffsetX, 0.5f); //-------------- planetCube = ChunkCubesPool.GiveCube(); planetCubeTransform = planetCube.transform; planetCube.GetComponent <ChunkCube>().uvOffset = new Vector2(uvOffsetX, 0.5f); planetCubeTransform.parent = thisTransform; planetCubeTransform.localScale = Vector3.one * 10; planetCubeTransform.SetPositionAndRotation(thisTransform.position, thisTransform.rotation); planetCube.SetActive(true); //-------------- if (Mathf.Abs(Class_AdditionalTools.PositionSeed(thisTransform, 0.15f)) < 0.3f) { atmosphere.SetActive(false); forest.SetActive(false); } else { atmosphereTransform.localRotation = Quaternion.Euler(Mathf.Cos(uvOffsetX * 1.1f) * 10, Mathf.Cos(uvOffsetX * 2.2f) * 10, Mathf.Cos(uvOffsetX * 3.3f) * 10); atmosphereTransform.localScale = Vector3.one * (18 + Mathf.Abs(Class_AdditionalTools.PositionSeed(thisTransform, 9.39f) * 4)); } //-------------- StartCoroutine(Optimization()); StartCoroutine(FakeFixedUpdate()); //-------------- }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void Start() { //-------------- Class_AdditionalTools.RandomName(gameObject, "Planetary System"); sqrtDistanceLod = Mathf.Pow(Class_Interface.distanceLod, 2); randomRotationUp = Class_AdditionalTools.PositionSeed(thisTransform, 0.73f) * 0.05f; satellitesOrbit.transform.localRotation = Quaternion.Euler(Class_AdditionalTools.PositionSeed(thisTransform, 1.1f) * 15, Class_AdditionalTools.PositionSeed(thisTransform, 2.2f) * 15, Class_AdditionalTools.PositionSeed(thisTransform, 3.3f) * 15); //-------------- StartCoroutine(Class_PlanetarySystem.Generation(thisTransform, satellitesOrbit, planet, moon, asteroid, spawnAI)); StartCoroutine(Optimization()); StartCoroutine(FakeFixedUpdate()); //-------------- }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void Start() { //-------------- Class_AI.amountEnemyAIs += 1; Class_AdditionalTools.RandomName(gameObject, "Enemy AI"); distanceToPlayer = 99999; speedTaming = speedBehavior = lodSpeed = sign = variableRotation = 1; counter18 = counter21 = 20; if (seedScaleOn == true) { thisTransform.localScale = Vector3.one * (1 + (Mathf.Pow(Class_AdditionalTools.PositionSeed(thisTransform, 0.364f), 2) * sizeMultiplier)); } localScaleX = thisTransform.localScale.x; amountLife = 10 * (Mathf.Pow(localScaleX, 1.5f) * lifeMultiplier); StartCoroutine(Core()); StartCoroutine(CustomUpdate()); //-------------- }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void OnEnable() { //-------------- if (outPool == false) { outPool = true; Class_AdditionalTools.RandomName(gameObject, "Chunk Cube"); Class_AdditionalTools.UvMesh(GetComponent <MeshFilter>().mesh, uvOffset.x, uvOffset.y); amountDamage = currentDamage = 0; brokenStage0 = false; thisScaleX = thisTransform.lossyScale.x; if (thisScaleX <= 4) { gameObject.layer = 21; } else if (thisScaleX > 4 && thisScaleX <= 8) { gameObject.layer = 20; } else if (thisScaleX > 8) { gameObject.layer = 19; } faultSize = Random.Range(2.0f, 3.0f) + thisScaleX * 0.75f; faultSizeOptimize = 1; numberDebris = Random.Range(2, 5); numberCubeOutOfPool = Random.Range(2, 4); cubeOutOfPoolScale = 1.0f / numberCubeOutOfPool; thisRenderer.enabled = thisBoxCollider.enabled = true; } //-------------- }