sth&文档
This commit is contained in:
@@ -36,6 +36,7 @@ namespace Ichni.Editor
|
||||
UIOperation();
|
||||
SwitchCameraOperation();
|
||||
ClickSelectElement();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +55,7 @@ namespace Ichni.Editor
|
||||
if (EditorManager.instance.cameraManager.isSceneCameraActive && !isPointerOverUI) // 场景相机的移动和旋转
|
||||
{
|
||||
float cameraMoveSpeed = EditorManager.instance.cameraManager.sceneCameraMoveSpeed * Time.deltaTime;
|
||||
|
||||
|
||||
if (Keyboard.current.wKey.isPressed)
|
||||
{
|
||||
sceneCameraTransform.position += sceneCameraTransform.forward * cameraMoveSpeed;
|
||||
@@ -121,7 +122,7 @@ namespace Ichni.Editor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void TracksOperation()
|
||||
{
|
||||
if (Keyboard.current.altKey.isPressed)
|
||||
@@ -140,7 +141,7 @@ namespace Ichni.Editor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void SaveAndExportOperation()
|
||||
{
|
||||
if (Keyboard.current.leftCtrlKey.isPressed)
|
||||
@@ -155,11 +156,17 @@ namespace Ichni.Editor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void CopyPasteDeleteOperation()
|
||||
{
|
||||
if (!RectTransformUtility.RectangleContainsScreenPoint(EditorManager.instance.uiManager.hierarchy.GetComponent<RectTransform>(), Mouse.current.position.ReadValue()))
|
||||
{
|
||||
|
||||
return;
|
||||
}
|
||||
if (Keyboard.current.leftCtrlKey.isPressed) // TODO: 后续适应多选
|
||||
{
|
||||
|
||||
if (Keyboard.current.cKey.wasPressedThisFrame) // Ctrl + C 复制
|
||||
{
|
||||
if (EditorManager.instance.operationManager.currentSelectedElements.Count != 1) // TODO: 后续适应多选
|
||||
@@ -167,7 +174,7 @@ namespace Ichni.Editor
|
||||
LogWindow.Log("Please select only one Game Element to copy.", Color.red);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
EditorManager.instance.operationManager.CopyPasteDeleteModule.CopyElement(EditorManager.instance.operationManager.currentSelectedElements[0]);
|
||||
}
|
||||
else if (Keyboard.current.vKey.wasPressedThisFrame) // Ctrl + V 粘贴
|
||||
@@ -177,7 +184,7 @@ namespace Ichni.Editor
|
||||
LogWindow.Log("Please select only one Game Element to paste.", Color.red);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
EditorManager.instance.operationManager.CopyPasteDeleteModule.PasteElement(EditorManager.instance.operationManager.currentSelectedElements[0]);
|
||||
}
|
||||
else if (Keyboard.current.dKey.wasPressedThisFrame) // Ctrl + D 删除
|
||||
@@ -187,12 +194,12 @@ namespace Ichni.Editor
|
||||
LogWindow.Log("Please select only one Game Element to copy.", Color.red);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
EditorManager.instance.operationManager.CopyPasteDeleteModule.DeleteElement(EditorManager.instance.operationManager.currentSelectedElements[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void ResolutionHintsOperation()
|
||||
{
|
||||
if (Keyboard.current.leftCtrlKey.isPressed)
|
||||
@@ -211,7 +218,7 @@ namespace Ichni.Editor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void UIOperation()
|
||||
{
|
||||
if (Keyboard.current.leftCtrlKey.isPressed)
|
||||
@@ -222,7 +229,7 @@ namespace Ichni.Editor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void SwitchCameraOperation()
|
||||
{
|
||||
if (Keyboard.current.leftCtrlKey.isPressed)
|
||||
|
||||
Reference in New Issue
Block a user