/// <summary> /// Based on the round number, calculates the amount of SpawnControls that will be needed upon level start and how much to increment each. /// </summary> /// <param name="roundNumber"></param> /// <returns></returns> private LinkedList <SpawnControl> CalculateSpawnControllers(int roundNumber) { LinkedList <SpawnControl> list = new LinkedList <SpawnControl>(); int amount; int increment; if (roundNumber < addControlEvery) { amount = 1; } else { amount = (roundNumber / addControlEvery) + 1; } increment = roundNumber; //increment = roundNumber % addControlEvery==0 ? 1:roundNumber%addControlEvery; Debug.Log("Amount: " + amount + " increment: " + increment); for (int i = 0; i < amount; i++) { int init = 0; if (i > waveSpawners.Count) { init = i % maxEnemyTypes; } SpawnControl control = new SpawnControl(waveSpawners.Count, maxEnemyTypes, maxSpawnAmount, init); for (int j = 0; j < increment; j++) { control.Increment(); } list.AddLast(control); } return(list); }
void Awake() { gp = GameObject.Find("GamePlay").GetComponent <GamePlay> (); ls = GameObject.Find("LevelSounds").GetComponent <LevelSounds> (); spawnMax = GameObject.Find("SpawnMax").GetComponent <SpawnUp> (); spawnMin = GameObject.Find("SpawnMin").GetComponent <SpawnUp> (); spawnObj = GameObject.Find("SpawnControl").GetComponent <SpawnControl> (); }
// Use this for initialization void Start() { if (endlessMode == false) { trans = spawns[0].transform; } spawnControl = gameObject.GetComponent <SpawnControl> (); }
public static SpawnControl Instance() { if (_instance == null) { Debug.Log("SpawnControl: Instance is NULL. Run around in circles and panic."); _instance = new SpawnControl(); } return _instance; }
public static SpawnControl Instance() { if (_instance == null) { Debug.Log("SpawnControl: Instance is NULL. Run around in circles and panic."); _instance = new SpawnControl(); } return(_instance); }
private void Start() { adenin = GameObject.FindGameObjectWithTag("Adenin"); thymine = GameObject.FindGameObjectWithTag("thymine"); cytosine = GameObject.FindGameObjectWithTag("cytosine"); guanine = GameObject.FindGameObjectWithTag("guanine"); AreThereAnyNucleotides = FindObjectOfType <SpawnControl>().isObjectSpawned; sControl = FindObjectOfType <SpawnControl>(); }
public IPacketWithSize ReadPacket(IProtocolDataReader reader) { Flying = (Flying)reader.ReadByte(); NoClip = (NoClip)reader.ReadByte(); Speeding = (Speeding)reader.ReadByte(); SpawnControl = (SpawnControl)reader.ReadByte(); ThirdPersonView = (ThirdPersonView)reader.ReadByte(); JumpHeight = reader.ReadShort(); return(this); }
public IPacketWithSize ReadPacket(IMinecraftDataReader reader) { Flying = (Flying) reader.ReadByte(); NoClip = (NoClip) reader.ReadByte(); Speeding = (Speeding) reader.ReadByte(); SpawnControl = (SpawnControl) reader.ReadByte(); ThirdPersonView = (ThirdPersonView) reader.ReadByte(); JumpHeight = reader.ReadShort(); return this; }
// Use this for initialization protected virtual void Start() { //Load the position and map position LoadPos(); if (pathFinder == null) { pathFinder = PathFinder.Instance(); } if (spawnControl == null) { spawnControl = SpawnControl.Instance(); } facing = Direction.DONTMOVE; }
// Use this for initialization protected virtual void Start() { //Load the position and map position LoadPos(); //Set the animator animator = GetComponent <Animator> (); if (pathFinder == null) { pathFinder = PathFinder.Instance(); } if (spawnControl == null) { spawnControl = SpawnControl.Instance(); } facing = Direction.DONTMOVE; }
// Use this for initialization protected virtual void Start() { //Generate a random life span lifeSpan = Random.Range(3000, 4000); //Load the position and map position LoadPos(); if (spawnControl == null) { spawnControl = SpawnControl.Instance(); } if (pathFinder == null) { pathFinder = PathFinder.Instance(); } //set initial scale to zero Vector3 scale = new Vector3(0, 0, 1f); //transform.localScale = scale; }
// Use this for initialization void Start() { Instantiate(seaMan); Instantiate(landMan); _instance = this; }
void Start() { sc = GameObject.Find("SpawnPoints").GetComponent <SpawnControl>(); }
void Start() { agent = GetComponent <NavMeshAgent>(); player = GameObject.Find("PlayerStandin"); sc = GameObject.Find("SpawnPoints").GetComponent <SpawnControl>(); }
// Use this for initialization void Start() { gameState = "waiting"; custSpawner = GameObject.Find("Customer Spawn").GetComponent <SpawnControl>(); }
// Use this for initialization void Start() { _instance = this; }
// Use this for initialization protected virtual void Start() { //Load the position and map position LoadPos(); //Set the animator animator = GetComponent<Animator> (); if (pathFinder == null) { pathFinder = PathFinder.Instance(); } if (spawnControl == null) { spawnControl = SpawnControl.Instance(); } facing = Direction.DONTMOVE; }
// Use this for initialization protected virtual void Start() { //Generate a random life span lifeSpan = Random.Range(3000, 4000); //Load the position and map position LoadPos(); if (spawnControl == null) { spawnControl = SpawnControl.Instance(); } if (pathFinder == null) { pathFinder = PathFinder.Instance(); } //set initial scale to zero Vector3 scale = new Vector3( 0, 0, 1f ); //transform.localScale = scale; }
void Start() { spawnControl = GetComponent<SpawnControl> (); }
// Use this for initialization void Start() { spawn = FindObjectOfType <SpawnControl>(); }
void Start() { lobby = GetComponent<Lobby> (); rom = GetComponent<Rom> (); spawnControl = GetComponent<SpawnControl> (); }
void Start() { healthandscore = GameObject.Find("Gobel").GetComponent <HealthandScore>(); SoundControl = GameObject.Find("EnemyScript").GetComponent <SpawnControl>(); }