Initial Unity project commit

This commit is contained in:
2026-07-08 19:53:15 +08:00
commit 75f254212e
15657 changed files with 11633879 additions and 0 deletions
@@ -0,0 +1,46 @@
using Interaction;
using UnityEngine;
namespace LLM.Commands
{
public class DoorCommandReceiver : LLMCommandReceiverBase
{
[SerializeField] private DoorController door;
private void Awake()
{
if (door == null)
{
door = GetComponentInParent<DoorController>();
}
}
public override bool TryExecute(LLMCommand command)
{
if (command == null) return false;
if (!string.Equals(command.type, "Door", System.StringComparison.OrdinalIgnoreCase)) return false;
if (door == null)
{
door = GetComponentInParent<DoorController>();
if (door == null) return false;
}
if (string.Equals(command.action, "Open", System.StringComparison.OrdinalIgnoreCase))
{
door.OpenDoor();
return true;
}
if (string.Equals(command.action, "Close", System.StringComparison.OrdinalIgnoreCase))
{
door.CloseDoor();
return true;
}
door.ToggleDoor();
return true;
}
}
}