Plugin MQTT i test sceny testowej

This commit is contained in:
Angelones12
2026-04-15 23:52:08 +02:00
parent 33dd6ccffb
commit 6863bba9ac
96 changed files with 64267 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
using UnityEngine;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Utilities;
public class GameManager : MonoBehaviour
{
[Header("UI do ukrycia")]
public GameObject startCanvas;
[Header("Komponenty gracza")]
public PlayerMove movementScript;
public MouseLook lookScript;
// public MqttCollector mqttScript; // Odkomentujesz to póŸniej
private bool hasStarted = false;
void Start()
{
// Blokada na starcie
if (movementScript != null) movementScript.enabled = false;
if (lookScript != null) lookScript.canLook = false;
Cursor.lockState = CursorLockMode.None;
Cursor.visible = true;
// Czekamy na dowolny klawisz
InputSystem.onAnyButtonPress.CallOnce(ctrl => Begin());
}
void Begin()
{
if (hasStarted) return;
hasStarted = true;
if (startCanvas != null) startCanvas.SetActive(false);
if (movementScript != null) movementScript.enabled = true;
if (lookScript != null) lookScript.EnableLooking();
// if (mqttScript != null) mqttScript.BeginSession();
Debug.Log("Gra wystartowa³a!");
}
}