Beispiel #1
0
        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>();
        }
Beispiel #2
0
 private void OnDestroy()
 {
     current = null;
 }