Woop
This week i have been researching 3D isometric action adventure role playing games (hack n slash). The game i spent the most time looking into is Diablo 3 in which you get a choice of ranged and melee abilities and your character is swarmed with AI mobs that have patrol routes but this type of game would be great with boids flocking added to it so that some enemies huddle together and maybe buff when within a certain distance of each other.
Now to create a game controller start by making a new game object and name it Game Controller and set it to origin position and change the tag to Game Controller and add component, new script and name it game controller, now edit the game controller script. Public class GameController : MonoBehaviour { Public GameObject hazard; Public Vector3 spawnValues; Public inthazardCount; Public float spawnWait; Public float startWait; Void start () { StartCoroutine (SpawnWaves ()); } IEnumerator SpawnWaves () { Yield return new WaitForSeconds (startWait); while (true) { For (int I = 0; i < hazardCount; i++) { Vector3 spawnPosition = new vector3 (Random.Range (-spawnValues.x, spawnValues.x), spawnValues.y, spawnValues.z); Quaternion spawnRotation = Quaternion.identity; Instantiate (hazard, spawnPosition. spawnRotation); Yield return new WaitForSeconds (spawnWait); } Yield return new WaitForSeconds (waveWait); } } } Select the Game Contr...
Comments
Post a Comment