private void PopBoomie() { if (gameEngine.CanSpawnBoomie() && !holdSpawn && this.GetComponent <GeneratorBehaviour>().hp > 0) { Vector3 boomiePosition = new Vector3(this.transform.position.x, 2.650939f, this.transform.position.z); GameObject newBoomie = (GameObject)Instantiate(boomie, boomiePosition, this.transform.rotation); newBoomie.GetComponent <BoomieBehaviour> ().gameEngine = gameEngine; newBoomie.GetComponent <Collider> ().enabled = false; newBoomie.GetComponent <Rigidbody> ().AddForce(30 * (popDirection.transform.position - this.transform.position)); gameEngine.AddBoomie(newBoomie); StartCoroutine(EnableColliderOnBoomieAfterTimer(1, newBoomie)); } }