I have a BasePickUp : MonoBehaviour, ICloneable class. Then I have subclasses such as FastBall : BasePickUp. My FastBall class looks like this:
public class FastBall : BasePickUp {
public override void ActivatePickUp ()
{
mainBall.GetComponent<Ball>().Speed = 2.0f; //increase ball speed...
StartCoroutine(timer); //...set time that power up is active
}
}
So I'm getting an error because of the StartCoroutine I guess, but I'm wondering if there is a way around this because I would really like to keep my current layout.