public void Dublicate() { ball originalBall = this; ball newBall = Instantiate(originalBall); newBall.speed = speed; newBall.startBall(); if (isMagnetActive) { newBall.ActiveMagnet(); } }
// Start is called before the first frame update void ApplyEffect() { ball balls = FindObjectOfType <ball>(); balls.ActiveMagnet(); }