Ejemplo 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
    }
Ejemplo 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
    }