마우스 클릭 이벤트 살리기
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using XRLib;
|
||||
@@ -103,55 +104,63 @@ namespace XED.Manage
|
||||
}
|
||||
updateLoop += handler.updateLoop;
|
||||
}
|
||||
void Update()
|
||||
IEnumerator UpdateCoroutine()
|
||||
{
|
||||
|
||||
foreach (var key in downKeyActionTable.Keys)
|
||||
while (true)
|
||||
{
|
||||
if (Input.GetKeyDown(key))
|
||||
foreach (var key in downKeyActionTable.Keys)
|
||||
{
|
||||
downKeyActionTable[key]?.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var key in getKeyActionTable.Keys)
|
||||
{
|
||||
if (Input.GetKey(key))
|
||||
{
|
||||
getKeyActionTable[key]?.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var key in upKeyActionTable.Keys)
|
||||
{
|
||||
if (Input.GetKeyUp(key))
|
||||
{
|
||||
upKeyActionTable[key]?.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var key in shortCutActionTable.Keys)
|
||||
{
|
||||
if (Input.GetKey(key))
|
||||
{
|
||||
if (shortCutActionTable.TryGetValue(key, out var kk))
|
||||
if (Input.GetKeyDown(key))
|
||||
{
|
||||
foreach (var k in kk)
|
||||
Debug.Log("1");
|
||||
downKeyActionTable[key]?.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var key in getKeyActionTable.Keys)
|
||||
{
|
||||
if (Input.GetKey(key))
|
||||
{
|
||||
Debug.Log("2");
|
||||
getKeyActionTable[key]?.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var key in upKeyActionTable.Keys)
|
||||
{
|
||||
if (Input.GetKeyUp(key))
|
||||
{
|
||||
Debug.Log("3");
|
||||
upKeyActionTable[key]?.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var key in shortCutActionTable.Keys)
|
||||
{
|
||||
if (Input.GetKey(key))
|
||||
{
|
||||
Debug.Log("4");
|
||||
if (shortCutActionTable.TryGetValue(key, out var kk))
|
||||
{
|
||||
if (Input.GetKeyDown(k.Key))
|
||||
foreach (var k in kk)
|
||||
{
|
||||
k.Value?.Invoke();
|
||||
if (Input.GetKeyDown(k.Key))
|
||||
{
|
||||
k.Value?.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
updateLoop?.Invoke();
|
||||
updateLoop?.Invoke();
|
||||
yield return null;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Init()
|
||||
{
|
||||
CoroutineRunner.instance.StartCoroutine(UpdateCoroutine());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user