Example #1
0
 void Start()
 {
     transform.localScale = new Vector3 (0,0,0);
     sRenderer = GetComponent<SpriteRenderer> ();
     tScaler = GameObject.Find ("Time Manager").GetComponent<TimeScaler> ();
     if (tScaler.GetNoiseDampening()) {
         fadeSpeed = 3.0f;
         Destroy (gameObject, 1.25f);
     }
     else {
         Destroy (gameObject, 2.5f);
     }
 }
Example #2
0
 void Start()
 {
     player = GameObject.FindWithTag ("Player");
     playerController = player.GetComponent<PlayerController>();
     guardAI = GetComponent<GuardAI> ();
     gBehaviour = GetComponent<GuardBehaviour> ();
     tScaler = GameObject.Find ("Time Manager").GetComponent<TimeScaler> ();
     if (tScaler.GetNoiseDampening ())
     {
         hearingRange = 2.5f;
     }
 }