Ejemplo n.º 1
0
	// Use this for initialization
	void Start () {
        if (Instance == null)
            Instance = this;
        else
            Destroy(gameObject);

	    for (int i = 0; i < MAX_BULLETS; i++)
	    {
            ShmupBullet b = ((GameObject)Instantiate(BulletPrefab)).GetComponent<ShmupBullet>();
	        b.transform.parent = transform;
            b.gameObject.SetActive(false);
	        Bullets.Add(b);
	    }
	}
Ejemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        if (Instance == null)
        {
            Instance = this;
        }
        else
        {
            Destroy(gameObject);
        }

        for (int i = 0; i < MAX_BULLETS; i++)
        {
            ShmupBullet b = ((GameObject)Instantiate(BulletPrefab)).GetComponent <ShmupBullet>();
            b.transform.parent = transform;
            b.gameObject.SetActive(false);
            Bullets.Add(b);
        }
    }