1
0

JSCommunicator.cs 645 B

1234567891011121314151617181920212223
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using ToneTuneToolkit.Common;
  4. using UnityEngine;
  5. using System.Runtime.InteropServices;
  6. public class JSCommunicator : SingletonMaster<JSCommunicator>
  7. {
  8. [DllImport("__Internal")] public static extern void PuzzleReady();
  9. [DllImport("__Internal")] public static extern void PuzzleDebug(string value);
  10. [DllImport("__Internal")] public static extern void PuzzleFinished();
  11. public void StartGame(string message)
  12. {
  13. Debug.Log(@$"[JSC] Game type: {message}");
  14. GameManager.Instance.StartGame(message);
  15. }
  16. public void ResetGame()
  17. {
  18. GameManager.Instance.Reset();
  19. }
  20. }