Inheritance: MonoBehaviour
Ejemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        StartCoroutine(GameLoop());

        aC         = FindObjectOfType <arrowControl>();
        endManager = FindObjectOfType <EndOfLevel>();
    }
Ejemplo n.º 2
0
    void Start()
    {
        // targetAngle = this.transform.rotation;

        rGM   = FindObjectOfType <GameManager>();
        eOL   = FindObjectOfType <EndOfLevel>();
        boing = GetComponent <AudioSource> ();
    }
Ejemplo n.º 3
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.CompareTag("Player"))
     {
         gameObject.SetActive(false);
         FindObjectOfType <AudioManager>().Play("PickUpEngine");
         EndOfLevel.DisplayMenu();
     }
 }
Ejemplo n.º 4
0
    private void SingletonPattern()
    {
        if (Instance == null)
        {
            Instance = this;
        }

        else if (Instance != this)
        {
            Destroy(gameObject);
        }
    }
Ejemplo n.º 5
0
 /// <summary>
 /// Virtual function for when the level is over.
 /// </summary>
 public virtual void OnEndOfLevel()
 {
     EndOfLevel?.Invoke(this, null);
 }
Ejemplo n.º 6
0
 public EndOfLevel endOfLevel; // Holds reference to EndOfLevel script
 //bool levelEnded = false;
 void Start()
 {
     // Assigns the reference to the EndOfLevel
     endOfLevel = FindObjectOfType <EndOfLevel>();
     //levelEnded = false;
 }