diff --git a/DungeonShooting_Godot/src/game/activity/role/Player.cs b/DungeonShooting_Godot/src/game/activity/role/Player.cs
index a627439..d3ed34d 100644
--- a/DungeonShooting_Godot/src/game/activity/role/Player.cs
+++ b/DungeonShooting_Godot/src/game/activity/role/Player.cs
@@ -75,11 +75,11 @@
MountPoint.SetLookAt(mousePos);
}
- if (InputManager.Exchange) //切换武器
+ if (InputManager.ExchangeWeapon) //切换武器
{
ExchangeNext();
}
- else if (InputManager.Throw) //扔掉武器
+ else if (InputManager.ThrowWeapon) //扔掉武器
{
ThrowWeapon();
diff --git a/DungeonShooting_Godot/src/game/manager/InputManager.cs b/DungeonShooting_Godot/src/game/manager/InputManager.cs
index 4119692..e19d61c 100644
--- a/DungeonShooting_Godot/src/game/manager/InputManager.cs
+++ b/DungeonShooting_Godot/src/game/manager/InputManager.cs
@@ -7,51 +7,76 @@
public static class InputManager
{
///
- /// 移动方向
+ /// 移动方向, 键鼠: 键盘WASD
///
public static Vector2 MoveAxis { get; private set; }
///
- /// 鼠标在SubViewport节点下的坐标
+ /// 鼠标在SubViewport节点下的坐标, 键鼠: 鼠标移动
///
public static Vector2 CursorPosition { get; private set; }
///
- /// 是否按下切换武器
+ /// 是否按下打开轮盘按钮, 键鼠: 键盘Tab
///
- public static bool Exchange { get; private set; }
-
- ///
- /// 是否按钮投抛武器按钮
- ///
- public static bool Throw { get; private set; }
+ public static bool Roulette { get; set; }
///
- /// 是否按钮互动按钮
+ /// 是否按下切换上一把武器, 键鼠: 键盘Q
+ ///
+ public static bool ExchangeWeapon { get; private set; }
+
+ ///
+ /// 是否按下投抛武器按钮, 键鼠: 键盘G
+ ///
+ public static bool ThrowWeapon { get; private set; }
+
+ ///
+ /// 是否按下使用道具按钮, 键鼠: 键盘F
+ ///
+ public static bool UseProp { get; private set; }
+
+ ///
+ /// 是否按下切换道具按钮, 键鼠: 键盘Z
+ ///
+ public static bool ExchangeProp { get; private set; }
+
+ ///
+ /// 是否按下丢弃道具按钮, 键鼠: 键盘X
+ ///
+ public static bool RemoveProp { get; private set; }
+
+ ///
+ /// 是否按钮互动按钮, 键鼠: 键盘E
///
public static bool Interactive { get; private set; }
///
- /// 是否按钮换弹按钮
+ /// 是否按钮换弹按钮, 键鼠: 键盘R
///
public static bool Reload { get; private set; }
///
- /// 是否按钮开火按钮
+ /// 是否按钮开火按钮, 键鼠: 鼠标左键
///
public static bool Fire { get; private set; }
///
- /// 是否按钮近战攻击按钮 (使用远程武器发起的近战攻击)
+ /// 是否按钮近战攻击按钮 (使用远程武器发起的近战攻击), 键鼠: 鼠标右键
///
public static bool MeleeAttack { get; private set; }
///
- /// 是否按下翻滚按钮
+ /// 是否按下翻滚按钮, 键鼠: 键盘Space
///
public static bool Roll { get; private set; }
///
+ /// 是否按下打开地图按钮, 键鼠: 键盘Ctrl
+ ///
+ public static bool Map { get; private set; }
+
+ ///
/// 更新输入管理器
///
public static void Update(float delta)
@@ -59,8 +84,8 @@
var application = GameApplication.Instance;
MoveAxis = Input.GetVector("move_left", "move_right", "move_up", "move_down");
CursorPosition = application.GlobalToViewPosition(application.GetGlobalMousePosition());
- Exchange = Input.IsActionJustPressed("exchange");
- Throw = Input.IsActionJustPressed("throw");
+ ExchangeWeapon = Input.IsActionJustPressed("exchange");
+ ThrowWeapon = Input.IsActionJustPressed("throw");
Interactive = Input.IsActionJustPressed("interactive");
Reload = Input.IsActionJustPressed("reload");
Fire = Input.IsActionPressed("fire");
diff --git a/DungeonShooting_Godot/src/game/ui/roomUI/ActivePropBar.cs b/DungeonShooting_Godot/src/game/ui/roomUI/ActivePropBar.cs
index 8b12b53..d17e6b2 100644
--- a/DungeonShooting_Godot/src/game/ui/roomUI/ActivePropBar.cs
+++ b/DungeonShooting_Godot/src/game/ui/roomUI/ActivePropBar.cs
@@ -22,10 +22,24 @@
}
+ public void Process(float delta)
+ {
+ var prop = Player.Current?.PropsPack.ActiveItem;
+ if (prop != null)
+ {
+ SetActivePropTexture(prop.GetCurrentTexture());
+ }
+ else
+ {
+ SetActivePropTexture(null);
+ }
+ }
+
public void SetActivePropTexture(Texture2D texture)
{
if (texture != null)
{
+ _activePropBar.L_ActivePropPanel.L_ActivePropSprite.Instance.Texture = texture;
_activePropBar.Instance.Visible = true;
}
else
diff --git a/DungeonShooting_Godot/src/game/ui/roomUI/RoomUIPanel.cs b/DungeonShooting_Godot/src/game/ui/roomUI/RoomUIPanel.cs
index b52376c..12dbe8f 100644
--- a/DungeonShooting_Godot/src/game/ui/roomUI/RoomUIPanel.cs
+++ b/DungeonShooting_Godot/src/game/ui/roomUI/RoomUIPanel.cs
@@ -57,6 +57,7 @@
public override void Process(float delta)
{
_weaponBar.Process(delta);
+ _activePropBar.Process(delta);
_lifeBar.Process(delta);
}