Newer
Older
Dreamsturbia-Project-IADE-Unity3D / Assets / Scripts / Dialog / DialogTester.cs
@Rackday Rackday on 21 Aug 660 bytes Project Added
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class DialogTester : MonoBehaviour
  5. {
  6. public DialogController controller;
  7. // Start is called before the first frame update
  8. void Start()
  9. {
  10. DialogController.dialogSkipped += DialogController_dialogSkipped;
  11. }
  12. private void DialogController_dialogSkipped(DialogueMessage text, DialogController controller)
  13. {
  14. Debug.Log(text);
  15. this.controller = controller;
  16. }
  17. // Update is called once per frame
  18. void Update()
  19. {
  20. if (Input.GetKeyDown(KeyCode.P))
  21. {
  22. controller.Talk();
  23. }
  24. }
  25. }