diff --git a/DungeonShooting_Godot/src/game/AnimatorNames.cs b/DungeonShooting_Godot/src/game/AnimatorNames.cs
deleted file mode 100644
index bf3d97d..0000000
--- a/DungeonShooting_Godot/src/game/AnimatorNames.cs
+++ /dev/null
@@ -1,93 +0,0 @@
-
-using Godot;
-
-///
-/// 预制动画名称
-///
-public static class AnimatorNames
-{
- ///
- /// 默认动画
- ///
- public static readonly StringName Default = "default";
- ///
- /// 静止不动
- ///
- public static readonly StringName Idle = "idle";
- ///
- /// 奔跑
- ///
- public static readonly StringName Run = "run";
- ///
- /// 倒退奔跑
- ///
- public static readonly StringName ReverseRun = "reverseRun";
- ///
- /// 翻滚
- ///
- public static readonly StringName Roll = "roll";
- ///
- /// 武器泛光动画
- ///
- public static readonly StringName Floodlight = "floodlight";
- ///
- /// 开门动画
- ///
- public static readonly StringName OpenDoor = "openDoor";
- ///
- /// 关门动画
- ///
- public static readonly StringName CloseDoor = "closeDoor";
- ///
- /// 开火
- ///
- public static readonly StringName Fire = "fire";
- ///
- /// 换弹
- ///
- public static readonly StringName Reloading = "reloading";
- ///
- /// 子弹上膛
- ///
- public static readonly StringName BeLoaded = "beLoaded";
- ///
- /// ui入场
- ///
- public static readonly StringName In = "in";
- ///
- /// ui出场
- ///
- public static readonly StringName Out = "out";
- ///
- /// 显示动画
- ///
- public static readonly StringName Show = "show";
- ///
- /// 播放特效
- ///
- public static readonly StringName Play = "play";
- ///
- /// 物体移动
- ///
- public static readonly StringName Move = "move";
- ///
- /// 攻击
- ///
- public static readonly StringName Attack = "attack";
- ///
- /// 惊讶动作
- ///
- public static readonly StringName Astonished = "astonished";
- ///
- /// 通知动作
- ///
- public static readonly StringName Notify = "notify";
- ///
- /// 疑惑动作
- ///
- public static readonly StringName Query = "query";
- ///
- /// 重置动画
- ///
- public static readonly StringName Reset = "RESET";
-}
\ No newline at end of file
diff --git a/DungeonShooting_Godot/src/game/GameApplication.cs b/DungeonShooting_Godot/src/game/GameApplication.cs
index 3f57200..a67cfc6 100644
--- a/DungeonShooting_Godot/src/game/GameApplication.cs
+++ b/DungeonShooting_Godot/src/game/GameApplication.cs
@@ -141,7 +141,7 @@
var newDelta = (float)delta;
InputManager.Update(newDelta);
SoundManager.Update(newDelta);
- DragUiManager.Update(newDelta);
+ UiDragManager.Update(newDelta);
//协程更新
ProxyCoroutineHandler.ProxyUpdateCoroutine(ref _coroutineList, newDelta);
diff --git a/DungeonShooting_Godot/src/game/PhysicsLayer.cs b/DungeonShooting_Godot/src/game/PhysicsLayer.cs
deleted file mode 100644
index f181de2..0000000
--- a/DungeonShooting_Godot/src/game/PhysicsLayer.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-///
-/// 物理碰撞层
-///
-public class PhysicsLayer
-{
- ///
- /// 无任何层级
- ///
- public const uint None = 0;
- ///
- /// 墙壁
- ///
- public const uint Wall = 0b1;
- ///
- /// 子弹
- ///
- public const uint Bullet = 0b10;
- ///
- /// 道具
- ///
- public const uint Prop = 0b100;
- ///
- /// 玩家
- ///
- public const uint Player = 0b1000;
- ///
- /// 敌人
- ///
- public const uint Enemy = 0b10000;
- ///
- /// 归属区域判断层级
- ///
- public const uint Affiliation = 0b100000;
- ///
- /// 在手上
- ///
- public const uint OnHand = 0b1000000;
- ///
- /// 各种碎屑,包括弹壳,敌人死亡碎片,爆炸碎片等
- ///
- public const uint Debris = 0b10000000;
- ///
- /// 投抛中
- ///
- public const uint Throwing = 0b100000000;
-}
\ No newline at end of file
diff --git a/DungeonShooting_Godot/src/game/ShaderParamNames.cs b/DungeonShooting_Godot/src/game/ShaderParamNames.cs
deleted file mode 100644
index 9c00cc1..0000000
--- a/DungeonShooting_Godot/src/game/ShaderParamNames.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-
-using Godot;
-
-///
-/// Shader 中的参数名称
-///
-public static class ShaderParamNames
-{
- ///
- /// 灰度
- ///
- public static readonly StringName Grey = "grey";
- ///
- /// 轮廓颜色
- ///
- public static readonly StringName OutlineColor = "outline_color";
- ///
- /// 是否显示轮廓
- ///
- public static readonly StringName ShowOutline = "show_outline";
- ///
- /// 纹理大小
- ///
- public static readonly StringName Size = "size";
- ///
- /// 线段宽度
- ///
- public static readonly StringName LineWidth = "line_width";
- ///
- /// 偏移
- ///
- public static readonly StringName Offset = "offset";
- ///
- /// 网格大小
- ///
- public static readonly StringName GridSize = "grid_size";
-
- ///
- /// 快速设置一个材质的 shader 材质参数
- ///
- public static void SetShaderMaterialParameter(this Material material, StringName param, Variant value)
- {
- if (material is ShaderMaterial shaderMaterial)
- {
- shaderMaterial.SetShaderParameter(param, value);
- }
- }
-}
\ No newline at end of file
diff --git a/DungeonShooting_Godot/src/game/SignNames.cs b/DungeonShooting_Godot/src/game/SignNames.cs
deleted file mode 100644
index 1e5cf00..0000000
--- a/DungeonShooting_Godot/src/game/SignNames.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-
-///
-/// 标记名称
-///
-public class SignNames
-{
- ///
- /// Ai 对武器的标记名称, 一旦有该标记, Ai AiFindAmmoState 状态下寻找可用武器将忽略该武器
- ///
- public const string AiFindWeaponSign = "AiFindWeaponSign";
-}
\ No newline at end of file
diff --git a/DungeonShooting_Godot/src/game/data/DragBinder.cs b/DungeonShooting_Godot/src/game/data/DragBinder.cs
index b816adb..effb33c 100644
--- a/DungeonShooting_Godot/src/game/data/DragBinder.cs
+++ b/DungeonShooting_Godot/src/game/data/DragBinder.cs
@@ -12,7 +12,7 @@
public bool Dragging;
public Vector2 PrevPosition;
public Action Callback;
- public StringName InputAction;
+ public StringName[] InputAction;
public void OnMouseEntered()
{
@@ -26,6 +26,6 @@
public void UnBind()
{
- DragUiManager.UnBindDrag(this);
+ UiDragManager.UnBindDrag(this);
}
}
\ No newline at end of file
diff --git a/DungeonShooting_Godot/src/game/data/property/AnimatorNames.cs b/DungeonShooting_Godot/src/game/data/property/AnimatorNames.cs
new file mode 100644
index 0000000..bf3d97d
--- /dev/null
+++ b/DungeonShooting_Godot/src/game/data/property/AnimatorNames.cs
@@ -0,0 +1,93 @@
+
+using Godot;
+
+///
+/// 预制动画名称
+///
+public static class AnimatorNames
+{
+ ///
+ /// 默认动画
+ ///
+ public static readonly StringName Default = "default";
+ ///
+ /// 静止不动
+ ///
+ public static readonly StringName Idle = "idle";
+ ///
+ /// 奔跑
+ ///
+ public static readonly StringName Run = "run";
+ ///
+ /// 倒退奔跑
+ ///
+ public static readonly StringName ReverseRun = "reverseRun";
+ ///
+ /// 翻滚
+ ///
+ public static readonly StringName Roll = "roll";
+ ///
+ /// 武器泛光动画
+ ///
+ public static readonly StringName Floodlight = "floodlight";
+ ///
+ /// 开门动画
+ ///
+ public static readonly StringName OpenDoor = "openDoor";
+ ///
+ /// 关门动画
+ ///
+ public static readonly StringName CloseDoor = "closeDoor";
+ ///
+ /// 开火
+ ///
+ public static readonly StringName Fire = "fire";
+ ///
+ /// 换弹
+ ///
+ public static readonly StringName Reloading = "reloading";
+ ///
+ /// 子弹上膛
+ ///
+ public static readonly StringName BeLoaded = "beLoaded";
+ ///
+ /// ui入场
+ ///
+ public static readonly StringName In = "in";
+ ///
+ /// ui出场
+ ///
+ public static readonly StringName Out = "out";
+ ///
+ /// 显示动画
+ ///
+ public static readonly StringName Show = "show";
+ ///
+ /// 播放特效
+ ///
+ public static readonly StringName Play = "play";
+ ///
+ /// 物体移动
+ ///
+ public static readonly StringName Move = "move";
+ ///
+ /// 攻击
+ ///
+ public static readonly StringName Attack = "attack";
+ ///
+ /// 惊讶动作
+ ///
+ public static readonly StringName Astonished = "astonished";
+ ///
+ /// 通知动作
+ ///
+ public static readonly StringName Notify = "notify";
+ ///
+ /// 疑惑动作
+ ///
+ public static readonly StringName Query = "query";
+ ///
+ /// 重置动画
+ ///
+ public static readonly StringName Reset = "RESET";
+}
\ No newline at end of file
diff --git a/DungeonShooting_Godot/src/game/data/property/InputAction.cs b/DungeonShooting_Godot/src/game/data/property/InputAction.cs
new file mode 100644
index 0000000..66ad19e
--- /dev/null
+++ b/DungeonShooting_Godot/src/game/data/property/InputAction.cs
@@ -0,0 +1,38 @@
+
+using Godot;
+
+///
+/// 输入事件名称
+///
+public static class InputAction
+{
+ ///
+ /// 鼠标左键
+ ///
+ public static readonly StringName MouseLeft = "mouse_left";
+ ///
+ /// 鼠标右键
+ ///
+ public static readonly StringName MouseRight = "mouse_right";
+ ///
+ /// 鼠标中建
+ ///
+ public static readonly StringName mouseMiddle = "mouse_middle";
+
+ public static readonly StringName MoveLeft = "move_left";
+ public static readonly StringName MoveRight = "move_right";
+ public static readonly StringName MoveUp = "move_up";
+ public static readonly StringName MoveDown = "move_down";
+ public static readonly StringName ExchangeWeapon = "exchangeWeapon";
+ public static readonly StringName ThrowWeapon = "throwWeapon";
+ public static readonly StringName Interactive = "interactive";
+ public static readonly StringName Reload = "reload";
+ public static readonly StringName Fire = "fire";
+ public static readonly StringName MeleeAttack = "meleeAttack";
+ public static readonly StringName Roll = "roll";
+ public static readonly StringName UseActiveProp = "useActiveProp";
+ public static readonly StringName ExchangeProp = "exchangeProp";
+ public static readonly StringName RemoveProp = "removeProp";
+ public static readonly StringName Map = "map";
+ public static readonly StringName Menu = "menu";
+}
\ No newline at end of file
diff --git a/DungeonShooting_Godot/src/game/data/property/PhysicsLayer.cs b/DungeonShooting_Godot/src/game/data/property/PhysicsLayer.cs
new file mode 100644
index 0000000..f181de2
--- /dev/null
+++ b/DungeonShooting_Godot/src/game/data/property/PhysicsLayer.cs
@@ -0,0 +1,46 @@
+///
+/// 物理碰撞层
+///
+public class PhysicsLayer
+{
+ ///
+ /// 无任何层级
+ ///
+ public const uint None = 0;
+ ///
+ /// 墙壁
+ ///
+ public const uint Wall = 0b1;
+ ///
+ /// 子弹
+ ///
+ public const uint Bullet = 0b10;
+ ///
+ /// 道具
+ ///
+ public const uint Prop = 0b100;
+ ///
+ /// 玩家
+ ///
+ public const uint Player = 0b1000;
+ ///
+ /// 敌人
+ ///
+ public const uint Enemy = 0b10000;
+ ///
+ /// 归属区域判断层级
+ ///
+ public const uint Affiliation = 0b100000;
+ ///
+ /// 在手上
+ ///
+ public const uint OnHand = 0b1000000;
+ ///
+ /// 各种碎屑,包括弹壳,敌人死亡碎片,爆炸碎片等
+ ///
+ public const uint Debris = 0b10000000;
+ ///
+ /// 投抛中
+ ///
+ public const uint Throwing = 0b100000000;
+}
\ No newline at end of file
diff --git a/DungeonShooting_Godot/src/game/data/property/ShaderParamNames.cs b/DungeonShooting_Godot/src/game/data/property/ShaderParamNames.cs
new file mode 100644
index 0000000..9c00cc1
--- /dev/null
+++ b/DungeonShooting_Godot/src/game/data/property/ShaderParamNames.cs
@@ -0,0 +1,48 @@
+
+using Godot;
+
+///
+/// Shader 中的参数名称
+///
+public static class ShaderParamNames
+{
+ ///
+ /// 灰度
+ ///
+ public static readonly StringName Grey = "grey";
+ ///
+ /// 轮廓颜色
+ ///
+ public static readonly StringName OutlineColor = "outline_color";
+ ///
+ /// 是否显示轮廓
+ ///
+ public static readonly StringName ShowOutline = "show_outline";
+ ///
+ /// 纹理大小
+ ///
+ public static readonly StringName Size = "size";
+ ///
+ /// 线段宽度
+ ///
+ public static readonly StringName LineWidth = "line_width";
+ ///
+ /// 偏移
+ ///
+ public static readonly StringName Offset = "offset";
+ ///
+ /// 网格大小
+ ///
+ public static readonly StringName GridSize = "grid_size";
+
+ ///
+ /// 快速设置一个材质的 shader 材质参数
+ ///
+ public static void SetShaderMaterialParameter(this Material material, StringName param, Variant value)
+ {
+ if (material is ShaderMaterial shaderMaterial)
+ {
+ shaderMaterial.SetShaderParameter(param, value);
+ }
+ }
+}
\ No newline at end of file
diff --git a/DungeonShooting_Godot/src/game/data/property/SignNames.cs b/DungeonShooting_Godot/src/game/data/property/SignNames.cs
new file mode 100644
index 0000000..1e5cf00
--- /dev/null
+++ b/DungeonShooting_Godot/src/game/data/property/SignNames.cs
@@ -0,0 +1,11 @@
+
+///
+/// 标记名称
+///
+public class SignNames
+{
+ ///
+ /// Ai 对武器的标记名称, 一旦有该标记, Ai AiFindAmmoState 状态下寻找可用武器将忽略该武器
+ ///
+ public const string AiFindWeaponSign = "AiFindWeaponSign";
+}
\ No newline at end of file
diff --git a/DungeonShooting_Godot/src/game/manager/DragUiManager.cs b/DungeonShooting_Godot/src/game/manager/DragUiManager.cs
deleted file mode 100644
index 3a35326..0000000
--- a/DungeonShooting_Godot/src/game/manager/DragUiManager.cs
+++ /dev/null
@@ -1,100 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Godot;
-
-public static class DragUiManager
-{
- private static readonly List _list = new List();
- private static readonly List _removeList = new List();
- private static readonly List _addList = new List();
-
- ///
- /// 绑定拖拽事件
- ///
- public static DragBinder BindDrag(Control control, StringName inputAction, Action callback)
- {
- var binder = new DragBinder();
- binder.Control = control;
- control.MouseEntered += binder.OnMouseEntered;
- control.MouseExited += binder.OnMouseExited;
- binder.Callback = callback;
- binder.InputAction = inputAction;
- _addList.Add(binder);
- return binder;
- }
-
- ///
- /// 绑定拖拽事件
- ///
- public static DragBinder BindDrag(Control control, Action callback)
- {
- return BindDrag(control, "mouse_left", callback);
- }
-
- ///
- /// 解绑拖拽事件
- ///
- public static void UnBindDrag(DragBinder binder)
- {
- if (!_removeList.Contains(binder))
- {
- _removeList.Add(binder);
- }
- }
-
- public static void Update(float delta)
- {
- //更新拖拽位置
- if (_list.Count > 0)
- {
- foreach (var dragBinder in _list)
- {
- if (dragBinder.Dragging && !Input.IsActionPressed(dragBinder.InputAction)) //松开鼠标, 结束拖拽
- {
- dragBinder.Dragging = false;
- dragBinder.Callback(DragState.DragEnd, Vector2.Zero);
- }
- else if (!dragBinder.Dragging) //开始拖拽
- {
- if (dragBinder.MouseEntered && Input.IsActionJustPressed(dragBinder.InputAction))
- {
- dragBinder.Dragging = true;
- dragBinder.PrevPosition = dragBinder.Control.GetGlobalMousePosition();
- dragBinder.Callback(DragState.DragStart, Vector2.Zero);
- }
- }
- else //拖拽更新
- {
- var mousePos = dragBinder.Control.GetGlobalMousePosition();
- if (mousePos != dragBinder.PrevPosition)
- {
- var deltaPosition = mousePos - dragBinder.PrevPosition;
- dragBinder.PrevPosition = mousePos;
- dragBinder.Callback(DragState.DragMove, deltaPosition);
- }
- }
- }
- }
-
- //移除绑定
- if (_removeList.Count > 0)
- {
- foreach (var binder in _removeList)
- {
- if (_list.Remove(binder) && GodotObject.IsInstanceValid(binder.Control))
- {
- binder.Control.MouseEntered -= binder.OnMouseEntered;
- binder.Control.MouseExited -= binder.OnMouseExited;
- }
- }
- _removeList.Clear();
- }
-
- //添加绑定
- if (_addList.Count > 0)
- {
- _list.AddRange(_addList);
- _addList.Clear();
- }
- }
-}
\ No newline at end of file
diff --git a/DungeonShooting_Godot/src/game/manager/InputManager.cs b/DungeonShooting_Godot/src/game/manager/InputManager.cs
index 5442ed0..0025645 100644
--- a/DungeonShooting_Godot/src/game/manager/InputManager.cs
+++ b/DungeonShooting_Godot/src/game/manager/InputManager.cs
@@ -86,24 +86,24 @@
///
public static void Update(float delta)
{
- MoveAxis = Input.GetVector("move_left", "move_right", "move_up", "move_down");
+ MoveAxis = Input.GetVector(InputAction.MoveLeft, InputAction.MoveRight, InputAction.MoveUp, InputAction.MoveDown);
var application = GameApplication.Instance;
if (application != null)
{
CursorPosition = application.GlobalToViewPosition(application.GetGlobalMousePosition());
}
- ExchangeWeapon = Input.IsActionJustPressed("exchangeWeapon");
- ThrowWeapon = Input.IsActionJustPressed("throwWeapon");
- Interactive = Input.IsActionJustPressed("interactive");
- Reload = Input.IsActionJustPressed("reload");
- Fire = Input.IsActionPressed("fire");
- MeleeAttack = Input.IsActionJustPressed("meleeAttack");
- Roll = Input.IsActionJustPressed("roll");
- UseActiveProp = Input.IsActionJustPressed("useActiveProp");
- RemoveProp = Input.IsActionJustPressed("removeProp");
- ExchangeProp = Input.IsActionJustPressed("exchangeProp");
- Map = Input.IsActionPressed("map");
- Menu = Input.IsActionJustPressed("menu");
+ ExchangeWeapon = Input.IsActionJustPressed(InputAction.ExchangeWeapon);
+ ThrowWeapon = Input.IsActionJustPressed(InputAction.ThrowWeapon);
+ Interactive = Input.IsActionJustPressed(InputAction.Interactive);
+ Reload = Input.IsActionJustPressed(InputAction.Reload);
+ Fire = Input.IsActionPressed(InputAction.Fire);
+ MeleeAttack = Input.IsActionJustPressed(InputAction.MeleeAttack);
+ Roll = Input.IsActionJustPressed(InputAction.Roll);
+ UseActiveProp = Input.IsActionJustPressed(InputAction.UseActiveProp);
+ RemoveProp = Input.IsActionJustPressed(InputAction.RemoveProp);
+ ExchangeProp = Input.IsActionJustPressed(InputAction.ExchangeProp);
+ Map = Input.IsActionPressed(InputAction.Map);
+ Menu = Input.IsActionJustPressed(InputAction.Menu);
}
}
\ No newline at end of file
diff --git a/DungeonShooting_Godot/src/game/manager/UiDragManager.cs b/DungeonShooting_Godot/src/game/manager/UiDragManager.cs
new file mode 100644
index 0000000..07348d9
--- /dev/null
+++ b/DungeonShooting_Godot/src/game/manager/UiDragManager.cs
@@ -0,0 +1,128 @@
+using System;
+using System.Collections.Generic;
+using Godot;
+
+public static class UiDragManager
+{
+
+
+ private static readonly List _list = new List();
+ private static readonly List _removeList = new List();
+ private static readonly List _addList = new List();
+
+ ///
+ /// 绑定拖拽事件
+ ///
+ public static DragBinder BindDrag(Control control, StringName[] inputAction, Action callback)
+ {
+ var binder = new DragBinder();
+ binder.Control = control;
+ control.MouseEntered += binder.OnMouseEntered;
+ control.MouseExited += binder.OnMouseExited;
+ binder.Callback = callback;
+ binder.InputAction = inputAction;
+ _addList.Add(binder);
+ return binder;
+ }
+
+ ///
+ /// 绑定拖拽事件
+ ///
+ public static DragBinder BindDrag(Control control, Action callback)
+ {
+ return BindDrag(control, new [] { InputAction.MouseLeft }, callback);
+ }
+
+ ///
+ /// 解绑拖拽事件
+ ///
+ public static void UnBindDrag(DragBinder binder)
+ {
+ if (!_removeList.Contains(binder))
+ {
+ _removeList.Add(binder);
+ }
+ }
+
+ public static void Update(float delta)
+ {
+ //更新拖拽位置
+ if (_list.Count > 0)
+ {
+ foreach (var dragBinder in _list)
+ {
+ if (dragBinder.Dragging && !CheckActionPressed(dragBinder.InputAction)) //松开鼠标, 结束拖拽
+ {
+ dragBinder.Dragging = false;
+ dragBinder.Callback(DragState.DragEnd, Vector2.Zero);
+ }
+ else if (!dragBinder.Dragging) //开始拖拽
+ {
+ if (dragBinder.MouseEntered && ActionJustPressed(dragBinder.InputAction))
+ {
+ dragBinder.Dragging = true;
+ dragBinder.PrevPosition = dragBinder.Control.GetGlobalMousePosition();
+ dragBinder.Callback(DragState.DragStart, Vector2.Zero);
+ }
+ }
+ else //拖拽更新
+ {
+ var mousePos = dragBinder.Control.GetGlobalMousePosition();
+ if (mousePos != dragBinder.PrevPosition)
+ {
+ var deltaPosition = mousePos - dragBinder.PrevPosition;
+ dragBinder.PrevPosition = mousePos;
+ dragBinder.Callback(DragState.DragMove, deltaPosition);
+ }
+ }
+ }
+ }
+
+ //移除绑定
+ if (_removeList.Count > 0)
+ {
+ foreach (var binder in _removeList)
+ {
+ if (_list.Remove(binder) && GodotObject.IsInstanceValid(binder.Control))
+ {
+ binder.Control.MouseEntered -= binder.OnMouseEntered;
+ binder.Control.MouseExited -= binder.OnMouseExited;
+ }
+ }
+ _removeList.Clear();
+ }
+
+ //添加绑定
+ if (_addList.Count > 0)
+ {
+ _list.AddRange(_addList);
+ _addList.Clear();
+ }
+ }
+
+ private static bool CheckActionPressed(StringName[] array)
+ {
+ foreach (var stringName in array)
+ {
+ if (Input.IsActionPressed(stringName))
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ private static bool ActionJustPressed(StringName[] array)
+ {
+ foreach (var stringName in array)
+ {
+ if (Input.IsActionJustPressed(stringName))
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+}
\ No newline at end of file
diff --git a/DungeonShooting_Godot/src/game/ui/editorImportCombination/EditorImportCombinationPanel.cs b/DungeonShooting_Godot/src/game/ui/editorImportCombination/EditorImportCombinationPanel.cs
index e1b5a26..cc88bed 100644
--- a/DungeonShooting_Godot/src/game/ui/editorImportCombination/EditorImportCombinationPanel.cs
+++ b/DungeonShooting_Godot/src/game/ui/editorImportCombination/EditorImportCombinationPanel.cs
@@ -7,7 +7,7 @@
private DragBinder _dragBinder;
public override void OnShowUi()
{
- _dragBinder = DragUiManager.BindDrag(S_PreviewBg.Instance, (state, delta) =>
+ _dragBinder = UiDragManager.BindDrag(S_PreviewBg.Instance, (state, delta) =>
{
if (state == DragState.DragMove)
{
diff --git a/DungeonShooting_Godot/src/game/ui/roomMap/RoomMapPanel.cs b/DungeonShooting_Godot/src/game/ui/roomMap/RoomMapPanel.cs
index 8668ab5..d8d0e5a 100644
--- a/DungeonShooting_Godot/src/game/ui/roomMap/RoomMapPanel.cs
+++ b/DungeonShooting_Godot/src/game/ui/roomMap/RoomMapPanel.cs
@@ -192,7 +192,7 @@
S_MapBar.Instance.Visible = false;
_mapOffset = Vector2.Zero;
- _dragBinder = DragUiManager.BindDrag(S_DrawContainer.Instance, (state, delta) =>
+ _dragBinder = UiDragManager.BindDrag(S_DrawContainer.Instance, (state, delta) =>
{
if (state == DragState.DragMove)
{
diff --git a/DungeonShooting_Godot/src/game/ui/tileSetEditorCombination/GridBg.cs b/DungeonShooting_Godot/src/game/ui/tileSetEditorCombination/GridBg.cs
index 702f8f5..26a4769 100644
--- a/DungeonShooting_Godot/src/game/ui/tileSetEditorCombination/GridBg.cs
+++ b/DungeonShooting_Godot/src/game/ui/tileSetEditorCombination/GridBg.cs
@@ -13,7 +13,7 @@
public virtual void SetUiNode(IUiNode uiNode)
{
UiNode = (T)uiNode;
- _dragBinder = DragUiManager.BindDrag(this, "mouse_middle", OnDrag);
+ _dragBinder = UiDragManager.BindDrag(this, new[] { InputAction.mouseMiddle }, OnDrag);
Resized += RefreshGridTrans;
}
diff --git a/DungeonShooting_Godot/src/game/ui/tileSetEditorCombination/leftBottom/TileEditArea.cs b/DungeonShooting_Godot/src/game/ui/tileSetEditorCombination/leftBottom/TileEditArea.cs
index 59b05dd..87e1507 100644
--- a/DungeonShooting_Godot/src/game/ui/tileSetEditorCombination/leftBottom/TileEditArea.cs
+++ b/DungeonShooting_Godot/src/game/ui/tileSetEditorCombination/leftBottom/TileEditArea.cs
@@ -44,7 +44,7 @@
var cellPosition = GetMouseCellPosition();
if (UiNode.UiPanel.EditorPanel.IsCellPositionInTexture(cellPosition))
{
- if (Input.IsActionJustPressed("mouse_left")) //刚按下, 清除之前的选中
+ if (Input.IsActionJustPressed(InputAction.MouseLeft)) //刚按下, 清除之前的选中
{
OnClearCell();
}
diff --git a/DungeonShooting_Godot/src/game/ui/tileSetEditorImport/TileSetEditorImportPanel.cs b/DungeonShooting_Godot/src/game/ui/tileSetEditorImport/TileSetEditorImportPanel.cs
index 5c1f29e..cba59e7 100644
--- a/DungeonShooting_Godot/src/game/ui/tileSetEditorImport/TileSetEditorImportPanel.cs
+++ b/DungeonShooting_Godot/src/game/ui/tileSetEditorImport/TileSetEditorImportPanel.cs
@@ -17,7 +17,7 @@
_tileSetEditor.SetBgColor(S_ImportPreviewBg.Instance.Color);
S_ImportPreview.Instance.Texture = _tileSetEditor.Texture;
- _dragBinder = DragUiManager.BindDrag(S_ImportPreviewBg.Instance, OnDragCallback);
+ _dragBinder = UiDragManager.BindDrag(S_ImportPreviewBg.Instance, OnDragCallback);
GetTree().Root.FilesDropped += OnFilesDropped;
S_ImportButton.Instance.Pressed += OnImportButtonClick;