void OnShoot() { RVBullet b = CreateBullet(); GameObject exploder = GameObject.Instantiate(bulletExploder.gameObject) as GameObject; exploder.transform.parent = this.bulletExploder.parent; b.Init(this.point.forward, 1f, 20f, Random.Range(8, 20), exploder, GetColor()); }
RVBullet CreateBullet() { RVBullet b = GameObject.Instantiate(bullet).GetComponent <RVBullet>(); b.transform.parent = bullet.transform.parent; b.transform.position = this.point.position; b.gameObject.SetActive(true); return(b); }