LevelEnd.cs 449 B

1234567891011121314151617
  1. using UnityEngine;
  2. using System.Collections;
  3. /// <summary>
  4. /// This component is responsible for displaying a level end scenery which comes in on screen gradually.
  5. /// The gameObject is instantiated by the <code>Level</code> component at the appropriate time.
  6. /// It destroys itself when disabled, i.e. game over
  7. /// </summary>
  8. public class LevelEnd : MonoBehaviour
  9. {
  10. public float xOffset = 1600;
  11. void OnDisable()
  12. {
  13. Destroy(gameObject);
  14. }
  15. }