Beispiel #1
0
    public void Dublicate()
    {
        ball originalBall = this;

        ball newBall = Instantiate(originalBall);

        newBall.speed = speed;
        newBall.startBall();
        if (isMagnetActive)
        {
            newBall.ActiveMagnet();
        }
    }
Beispiel #2
0
    // Start is called before the first frame update
    void ApplyEffect()
    {
        ball balls = FindObjectOfType <ball>();

        balls.ActiveMagnet();
    }