using UnityEngine; using System.Collections; /// /// This component is responsible for displaying a level end scenery which comes in on screen gradually. /// The gameObject is instantiated by the Level component at the appropriate time. /// It destroys itself when disabled, i.e. game over /// public class LevelEnd : MonoBehaviour { public float xOffset = 1600; void OnDisable() { Destroy(gameObject); } }