Пример #1
0
    void OnCollisionEnter(Collision col)
    {
        if (col.contacts[0].thisCollider == JumpDetectCollider)
        {
            HitSource.Play();
            Debug.Log("Detect! " + Time.realtimeSinceStartup);
            _jumped        = false;
            _lastHitHeight = col.collider.transform.position.y;

            if (col.collider.gameObject == LevelGenerator.FinalPlatform)
            {
                LevelGenerator.GenerateMore();
            }
        }
    }