This commit is contained in:
MuHua-123
2025-03-07 19:20:55 +08:00
parent c8f1873939
commit 5e819d5257
98 changed files with 389 additions and 180 deletions
@@ -0,0 +1,19 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace MuHua {
/// <summary>
/// 方向
/// </summary>
public enum UIDirection {
FromLeftToRight = 0,
FromRightToLeft = 1,
FromTopToBottom = 2,
FromBottomToTop = 3,
HorizontalAndVertical = 4,
Horizontal = 5,
Vertical = 6,
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c2b0340184fec6c45815d13d6a1f7321
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,26 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
#if ENABLE_INPUT_SYSTEM && UNITY_INPUT_SYSTEM_PACKAGE
using UnityEngine.InputSystem;
#endif
namespace MuHua
{
/// <summary>
/// UI工具
/// </summary>
public static class UITool
{
/// <summary> 获取鼠标位置 </summary>
public static Vector3 GetMousePosition()
{
#if ENABLE_INPUT_SYSTEM && UNITY_INPUT_SYSTEM_PACKAGE
return Mouse.current.position.ReadValue();
#else
return Input.mousePosition;
#endif
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: ac8f1de11a0d473409df019e3d014d21
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: