Esempio n. 1
0
    // This powerup creates an ExtraSphere object next to the paddle
    public override void Activate()
    {
        base.Activate();

        GameObject sphere = (GameObject)
            GameObject.Instantiate(
                extraSpherePrefub, // Load the prefab from resources
                sphereSpawn.transform.position,
                Quaternion.identity
            );

            extraSphere = sphere.GetComponent<ExtraSphere>(); // A link to the new sphere's script is stored to keep track of its life cycle
    }
Esempio n. 2
0
    // This powerup creates an ExtraSphere object next to the paddle
    public override void Activate()
    {
        base.Activate();

        GameObject sphere = (GameObject)
                            GameObject.Instantiate(
            extraSpherePrefub,                     // Load the prefab from resources
            sphereSpawn.transform.position,
            Quaternion.identity
            );


        extraSphere = sphere.GetComponent <ExtraSphere>();                // A link to the new sphere's script is stored to keep track of its life cycle
    }