// Use this for initialization
    void Start()
    {
        rb = GetComponent <Rigidbody> ();
        rb.freezeRotation = true;

        sd = transform.GetComponent <ShadowDetector>();
    }
Beispiel #2
0
 // Start is called before the first frame update
 void Start()
 {
     MasterController.Instance.CheckPointReached          += RecordCurrentState;
     MasterController.Instance.RevertToPreviousCheckPoint += RevertToPreviousCheckPoint;
     lm       = GetComponent <LightManager>();
     pControl = FindObjectOfType <AlexanderController>();
     pControl.PlayerIsInsideDarkness += DecreaseCourage;
     sd = FindObjectOfType <ShadowDetector>();
     courageGauge.minValue = minHealth;
     courageGauge.maxValue = maxHealth;
     //courageGauge.value = courageGauge.maxValue;
     DrawHealthBar();
     //StartCoroutine(IncreaseCourage());
 }