Ejemplo n.º 1
0
    GameObject CreateBullet()
    {
        GameObject go = Instantiate(bulletObject);

        go.SetActive(true);
        go.transform.parent        = this.transform;
        go.transform.localPosition = Vector3.zero;
        go.transform.localScale    = Vector3.one;
        go.transform.localRotation = Quaternion.identity;

        PlayerBullet pb = go.GetComponent <PlayerBullet>();

        pb.Reset();

        go.SetActive(false);

        return(go);
    }
Ejemplo n.º 2
0
 public static void TurnOn(PlayerBullet b)
 {
     b.Reset();
     b.gameObject.SetActive(true);
 }