void Update() { Delay -= Time.deltaTime; if (Delay <= 0) { if (DialogName == "intro_akt2") { if (Globals.FladderKilled) { DialogName = "slum_fladder_död"; } else if (Globals.FladderArested) { DialogName = "slum_fladder_lever"; } else { return; //Fel håll } } Gui.StartDialog(DialogName); Delay = startDelay; enabled = false; } }
void OnTriggerStay2D(Collider2D other) { Tags t = other.GetComponent <Tags>(); if (t == null || !t.PlayerCharacter) { return; } Gui.StartDialog(DialogName); collider2D.enabled = false; enabled = false; }