마우스 클릭 이벤트 살리기

This commit is contained in:
geondo55
2025-04-08 17:34:30 +09:00
parent d5ea8b03c5
commit 57fa1f08b6
2 changed files with 47 additions and 38 deletions

View File

@@ -58,10 +58,10 @@ namespace XED.Manage
canvas_Popup.panel_objectinfo.onTransformChanged += renderObjectHandler.OnTransformChanged;
canvas_DragArea.panel_draghandler.onDragBoxSelect += customAssetConnector.assetEventHandler.OnDragBoxSelect;
//statusPanel.AddController(renderObjectHandler);
//statusPanel.AddController(wallBuilder);
//statusPanel.AddModeEnterEvent(ModePanel.ProgramMode.AGVPathDrawing, canvas_Popup.agvnodemodepopup.Open);
//statusPanel.SetMode(ModePanel.ProgramMode.ObjectLayout);
statusPanel.AddController(renderObjectHandler);
statusPanel.AddController(wallBuilder);
statusPanel.AddModeEnterEvent(ModePanel.ProgramMode.AGVPathDrawing, canvas_Popup.agvnodemodepopup.Open);
statusPanel.SetMode(ModePanel.ProgramMode.ObjectLayout);
var commandHandler = CommandInvoker.instance.GetInputHandler();
userInputManager.SetHandler(GetDefaultInputHandler());
userInputManager.SetHandler(commandHandler);

View File

@@ -1,4 +1,5 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using XRLib;
@@ -103,13 +104,15 @@ namespace XED.Manage
}
updateLoop += handler.updateLoop;
}
void Update()
IEnumerator UpdateCoroutine()
{
while (true)
{
foreach (var key in downKeyActionTable.Keys)
{
if (Input.GetKeyDown(key))
{
Debug.Log("1");
downKeyActionTable[key]?.Invoke();
}
}
@@ -118,6 +121,7 @@ namespace XED.Manage
{
if (Input.GetKey(key))
{
Debug.Log("2");
getKeyActionTable[key]?.Invoke();
}
}
@@ -126,6 +130,7 @@ namespace XED.Manage
{
if (Input.GetKeyUp(key))
{
Debug.Log("3");
upKeyActionTable[key]?.Invoke();
}
}
@@ -134,6 +139,7 @@ namespace XED.Manage
{
if (Input.GetKey(key))
{
Debug.Log("4");
if (shortCutActionTable.TryGetValue(key, out var kk))
{
foreach (var k in kk)
@@ -148,10 +154,13 @@ namespace XED.Manage
}
updateLoop?.Invoke();
yield return null;
}
}
public override void Init()
{
CoroutineRunner.instance.StartCoroutine(UpdateCoroutine());
}
}
}