void Start() { // Set current static reference current = this; // Set Timer eggTimer = new Timer(eggTimerValue); eggTimer.OnComplete += SpawnEgg; stunTimer = new Timer(1f); stunTimer.OnComplete += EndStun; // Set Score currentPickScore = maxScore; // Auto-Get from the same GameObject rb2D = GetComponent <Rigidbody2D>(); animControl = GetComponent <AnimationControl2D>(); }
private void OnDestroy() { current = null; }