Esempio n. 1
0
 // Use this for initialization
 void Start()
 {
     pc        = FindObjectOfType <PlayerController>();
     meter     = FindObjectOfType <AlertMeter>();
     lm        = FindObjectOfType <LevelManager>();
     door_anim = GetComponentInChildren <Animator>();
     sprite    = GetComponentInChildren <SpriteRenderer>();
 }
Esempio n. 2
0
 private void Awake()
 {
     if (_instance == null)
     {
         _instance = this;
     }
     else
     {
         Destroy(gameObject);
         Debug.LogError("more than one AlertMeter detected, don't ignore this error");
     }
 }