예제 #1
0
    void OnEnterDeathZone()
    {
        deathZoneSource.Play();

        levelGenerator.Player.transform.position = levelGenerator.PlayerStartPosition;
        levelGenerator.Player.GetComponent<Rigidbody2D>().angularVelocity = 0.0f;
        levelGenerator.Player.GetComponent<Rigidbody2D>().velocity = Vector2.zero;


        // Sigh, i really should move to an event system to prevent all this spaghetti
        if (DestroyTracksOnDeath)
        {
            swipeController.DecayAll();
        }

        coinScore = 1;
    }