Ejemplo n.º 1
0
    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());
    }
Ejemplo n.º 2
0
    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);
    }