void InitialiseBullet() { PlasmaBall tempBullet = GameObject.Instantiate (bulletPrefab) as PlasmaBall; pool.Add (tempBullet); tempBullet.transform.SetParent (this.transform); tempBullet.gameObject.SetActive (false); }
void SetupBullet(PlasmaBall currentBullet, Vector3 position, Quaternion rotation, int materialType, Collider collidr) { currentBullet.gameObject.transform.position = position; currentBullet.gameObject.transform.rotation = rotation; currentBullet.meshRenderer.materials[0] = matArray[materialType]; currentBullet.gameObject.SetActive (true); Physics.IgnoreCollision (currentBullet.collidr, collidr); }