Пример #1
0
        public static void PlayerHasDeath(string causeOfDeath = "")
        {
            // refs
            GameObject _go       = GameObject.FindGameObjectWithTag("DeathUI");
            Animator   _anim     = _go.GetComponent <Animator>();
            Text       _causeTxt = _go.GetComponentsInChildren <Text>()[1];

            Dialogue.DialogueScript _dial = GameObject.FindObjectOfType <Dialogue.DialogueScript>();

            // stop dial
            _dial.StopDial();

            // actions
            _anim.SetTrigger("IsDead");
            _causeTxt.text = causeOfDeath;
        }
Пример #2
0
 private void Start()
 {
     dial = GameObject.FindGameObjectWithTag("Dialogue").GetComponent <DialogueScript>();
 }