武器轮盘添加空格丢弃武器功能
This commit is contained in:
parent
1724a683f0
commit
b619aee85e
|
@ -33,7 +33,7 @@ grow_horizontal = 2
|
|||
grow_vertical = 2
|
||||
color = Color(0, 0, 0, 0.588235)
|
||||
|
||||
[node name="Control" type="Control" parent="."]
|
||||
[node name="Root" type="Control" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
|
@ -47,21 +47,21 @@ offset_bottom = -19.0
|
|||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="RouletteBg" type="Sprite2D" parent="Control"]
|
||||
[node name="RouletteBg" type="Sprite2D" parent="Root"]
|
||||
scale = Vector2(4, 4)
|
||||
texture = ExtResource("2_k6gjh")
|
||||
|
||||
[node name="WeaponSlotNode" type="Node2D" parent="Control/RouletteBg"]
|
||||
[node name="WeaponSlotNode" type="Node2D" parent="Root/RouletteBg"]
|
||||
script = ExtResource("3_8v011")
|
||||
|
||||
[node name="SlotUi" type="Control" parent="Control/RouletteBg/WeaponSlotNode"]
|
||||
[node name="SlotUi" type="Control" parent="Root/RouletteBg/WeaponSlotNode"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
offset_left = 65.25
|
||||
offset_right = 66.25
|
||||
offset_bottom = 1.0
|
||||
|
||||
[node name="WeaponUi" type="Control" parent="Control/RouletteBg/WeaponSlotNode/SlotUi"]
|
||||
[node name="WeaponUi" type="Control" parent="Root/RouletteBg/WeaponSlotNode/SlotUi"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
|
@ -75,10 +75,10 @@ offset_bottom = 0.5
|
|||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="WeaponIcon" type="Sprite2D" parent="Control/RouletteBg/WeaponSlotNode/SlotUi/WeaponUi"]
|
||||
[node name="WeaponIcon" type="Sprite2D" parent="Root/RouletteBg/WeaponSlotNode/SlotUi/WeaponUi"]
|
||||
material = SubResource("ShaderMaterial_i1wmw")
|
||||
|
||||
[node name="AmmoLabel" type="Label" parent="Control/RouletteBg/WeaponSlotNode/SlotUi/WeaponUi"]
|
||||
[node name="AmmoLabel" type="Label" parent="Root/RouletteBg/WeaponSlotNode/SlotUi/WeaponUi"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
|
@ -96,18 +96,18 @@ text = "0/0"
|
|||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="LockSprite" type="Sprite2D" parent="Control/RouletteBg/WeaponSlotNode/SlotUi"]
|
||||
[node name="LockSprite" type="Sprite2D" parent="Root/RouletteBg/WeaponSlotNode/SlotUi"]
|
||||
scale = Vector2(0.25, 0.25)
|
||||
texture = ExtResource("6_7mog3")
|
||||
|
||||
[node name="SlotAreaNode" type="Area2D" parent="Control/RouletteBg/WeaponSlotNode"]
|
||||
[node name="SlotAreaNode" type="Area2D" parent="Root/RouletteBg/WeaponSlotNode"]
|
||||
collision_layer = 0
|
||||
collision_mask = 8192
|
||||
monitorable = false
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Control/RouletteBg/WeaponSlotNode/SlotAreaNode"]
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Root/RouletteBg/WeaponSlotNode/SlotAreaNode"]
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="Control"]
|
||||
[node name="UpBar" type="ColorRect" parent="Root"]
|
||||
layout_mode = 0
|
||||
offset_left = -383.0
|
||||
offset_top = -480.0
|
||||
|
@ -115,7 +115,7 @@ offset_right = 385.0
|
|||
offset_bottom = -424.0
|
||||
color = Color(0.184314, 0.184314, 0.184314, 0.784314)
|
||||
|
||||
[node name="Label" type="Label" parent="Control/ColorRect"]
|
||||
[node name="Label" type="Label" parent="Root/UpBar"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 4
|
||||
anchor_top = 0.5
|
||||
|
@ -127,7 +127,7 @@ offset_bottom = 20.0
|
|||
grow_vertical = 2
|
||||
text = "按Q上一页"
|
||||
|
||||
[node name="Label2" type="Label" parent="Control/ColorRect"]
|
||||
[node name="Label2" type="Label" parent="Root/UpBar"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 6
|
||||
anchor_left = 1.0
|
||||
|
@ -142,7 +142,7 @@ grow_horizontal = 0
|
|||
grow_vertical = 2
|
||||
text = "按E下一页"
|
||||
|
||||
[node name="PageLabel" type="Label" parent="Control/ColorRect"]
|
||||
[node name="PageLabel" type="Label" parent="Root/UpBar"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
|
@ -157,6 +157,29 @@ grow_horizontal = 2
|
|||
grow_vertical = 2
|
||||
text = "1/1"
|
||||
|
||||
[node name="DownBar" type="ColorRect" parent="Root"]
|
||||
layout_mode = 0
|
||||
offset_left = -96.0
|
||||
offset_top = 435.0
|
||||
offset_right = 100.0
|
||||
offset_bottom = 491.0
|
||||
color = Color(0.184314, 0.184314, 0.184314, 0.784314)
|
||||
|
||||
[node name="Label" type="Label" parent="Root/DownBar"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -84.0
|
||||
offset_top = -20.0
|
||||
offset_right = 84.0
|
||||
offset_bottom = 20.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
text = "按空格丢弃"
|
||||
|
||||
[node name="MouseArea" type="Area2D" parent="."]
|
||||
collision_layer = 8192
|
||||
collision_mask = 0
|
||||
|
|
|
@ -88,7 +88,7 @@ layer_0/tile_data = PackedInt32Array(917505, 1, 0, 983041, 1, 0, 1048577, 1, 0,
|
|||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="BirthMark" type="Marker2D" parent="." index="3"]
|
||||
position = Vector2(536, 310)
|
||||
position = Vector2(533, 223)
|
||||
|
||||
[node name="DungeonEntrance" type="Area2D" parent="." index="4"]
|
||||
z_index = 15
|
||||
|
@ -395,6 +395,24 @@ script = ExtResource("5_lowqi")
|
|||
Id = "item_0026"
|
||||
DefaultLayer = 1
|
||||
|
||||
[node name="Weapon0002" type="Node2D" parent="ItemRoot" index="34"]
|
||||
position = Vector2(436, 242)
|
||||
script = ExtResource("5_lowqi")
|
||||
Id = "weapon0002"
|
||||
DefaultLayer = 1
|
||||
|
||||
[node name="Weapon0003" type="Node2D" parent="ItemRoot" index="35"]
|
||||
position = Vector2(489, 255)
|
||||
script = ExtResource("5_lowqi")
|
||||
Id = "weapon0003"
|
||||
DefaultLayer = 1
|
||||
|
||||
[node name="Weapon0004" type="Node2D" parent="ItemRoot" index="36"]
|
||||
position = Vector2(543, 261)
|
||||
script = ExtResource("5_lowqi")
|
||||
Id = "weapon0004"
|
||||
DefaultLayer = 1
|
||||
|
||||
[node name="Node2D" type="Node2D" parent="." index="6"]
|
||||
position = Vector2(881, 446)
|
||||
|
||||
|
|
|
@ -19,17 +19,17 @@ public abstract partial class WeaponRoulette : UiBase
|
|||
private Bg _L_Bg;
|
||||
|
||||
/// <summary>
|
||||
/// 使用 Instance 属性获取当前节点实例对象, 节点类型: <see cref="Godot.Control"/>, 节点路径: WeaponRoulette.Control
|
||||
/// 使用 Instance 属性获取当前节点实例对象, 节点类型: <see cref="Godot.Control"/>, 节点路径: WeaponRoulette.Root
|
||||
/// </summary>
|
||||
public Control L_Control
|
||||
public Root L_Root
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_L_Control == null) _L_Control = new Control((WeaponRoulettePanel)this, GetNode<Godot.Control>("Control"));
|
||||
return _L_Control;
|
||||
if (_L_Root == null) _L_Root = new Root((WeaponRoulettePanel)this, GetNode<Godot.Control>("Root"));
|
||||
return _L_Root;
|
||||
}
|
||||
}
|
||||
private Control _L_Control;
|
||||
private Root _L_Root;
|
||||
|
||||
/// <summary>
|
||||
/// 使用 Instance 属性获取当前节点实例对象, 节点类型: <see cref="Godot.Area2D"/>, 节点路径: WeaponRoulette.MouseArea
|
||||
|
@ -51,7 +51,6 @@ public abstract partial class WeaponRoulette : UiBase
|
|||
|
||||
public sealed override void OnInitNestedUi()
|
||||
{
|
||||
_ = L_Control.L_RouletteBg.L_WeaponSlotNode;
|
||||
|
||||
}
|
||||
|
||||
|
@ -65,7 +64,7 @@ public abstract partial class WeaponRoulette : UiBase
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 类型: <see cref="Godot.Sprite2D"/>, 路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode.SlotUi.WeaponUi.WeaponIcon
|
||||
/// 类型: <see cref="Godot.Sprite2D"/>, 路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode.SlotUi.WeaponUi.WeaponIcon
|
||||
/// </summary>
|
||||
public class WeaponIcon : UiNode<WeaponRoulettePanel, Godot.Sprite2D, WeaponIcon>
|
||||
{
|
||||
|
@ -74,7 +73,7 @@ public abstract partial class WeaponRoulette : UiBase
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 类型: <see cref="Godot.Label"/>, 路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode.SlotUi.WeaponUi.AmmoLabel
|
||||
/// 类型: <see cref="Godot.Label"/>, 路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode.SlotUi.WeaponUi.AmmoLabel
|
||||
/// </summary>
|
||||
public class AmmoLabel : UiNode<WeaponRoulettePanel, Godot.Label, AmmoLabel>
|
||||
{
|
||||
|
@ -83,12 +82,12 @@ public abstract partial class WeaponRoulette : UiBase
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 类型: <see cref="Godot.Control"/>, 路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode.SlotUi.WeaponUi
|
||||
/// 类型: <see cref="Godot.Control"/>, 路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode.SlotUi.WeaponUi
|
||||
/// </summary>
|
||||
public class WeaponUi : UiNode<WeaponRoulettePanel, Godot.Control, WeaponUi>
|
||||
{
|
||||
/// <summary>
|
||||
/// 使用 Instance 属性获取当前节点实例对象, 节点类型: <see cref="Godot.Sprite2D"/>, 节点路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode.SlotUi.WeaponIcon
|
||||
/// 使用 Instance 属性获取当前节点实例对象, 节点类型: <see cref="Godot.Sprite2D"/>, 节点路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode.SlotUi.WeaponIcon
|
||||
/// </summary>
|
||||
public WeaponIcon L_WeaponIcon
|
||||
{
|
||||
|
@ -101,7 +100,7 @@ public abstract partial class WeaponRoulette : UiBase
|
|||
private WeaponIcon _L_WeaponIcon;
|
||||
|
||||
/// <summary>
|
||||
/// 使用 Instance 属性获取当前节点实例对象, 节点类型: <see cref="Godot.Label"/>, 节点路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode.SlotUi.AmmoLabel
|
||||
/// 使用 Instance 属性获取当前节点实例对象, 节点类型: <see cref="Godot.Label"/>, 节点路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode.SlotUi.AmmoLabel
|
||||
/// </summary>
|
||||
public AmmoLabel L_AmmoLabel
|
||||
{
|
||||
|
@ -118,7 +117,7 @@ public abstract partial class WeaponRoulette : UiBase
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 类型: <see cref="Godot.Sprite2D"/>, 路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode.SlotUi.LockSprite
|
||||
/// 类型: <see cref="Godot.Sprite2D"/>, 路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode.SlotUi.LockSprite
|
||||
/// </summary>
|
||||
public class LockSprite : UiNode<WeaponRoulettePanel, Godot.Sprite2D, LockSprite>
|
||||
{
|
||||
|
@ -127,12 +126,12 @@ public abstract partial class WeaponRoulette : UiBase
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 类型: <see cref="Godot.Control"/>, 路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode.SlotUi
|
||||
/// 类型: <see cref="Godot.Control"/>, 路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode.SlotUi
|
||||
/// </summary>
|
||||
public class SlotUi : UiNode<WeaponRoulettePanel, Godot.Control, SlotUi>
|
||||
{
|
||||
/// <summary>
|
||||
/// 使用 Instance 属性获取当前节点实例对象, 节点类型: <see cref="Godot.Control"/>, 节点路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode.WeaponUi
|
||||
/// 使用 Instance 属性获取当前节点实例对象, 节点类型: <see cref="Godot.Control"/>, 节点路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode.WeaponUi
|
||||
/// </summary>
|
||||
public WeaponUi L_WeaponUi
|
||||
{
|
||||
|
@ -145,7 +144,7 @@ public abstract partial class WeaponRoulette : UiBase
|
|||
private WeaponUi _L_WeaponUi;
|
||||
|
||||
/// <summary>
|
||||
/// 使用 Instance 属性获取当前节点实例对象, 节点类型: <see cref="Godot.Sprite2D"/>, 节点路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode.LockSprite
|
||||
/// 使用 Instance 属性获取当前节点实例对象, 节点类型: <see cref="Godot.Sprite2D"/>, 节点路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode.LockSprite
|
||||
/// </summary>
|
||||
public LockSprite L_LockSprite
|
||||
{
|
||||
|
@ -162,7 +161,7 @@ public abstract partial class WeaponRoulette : UiBase
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 类型: <see cref="Godot.CollisionPolygon2D"/>, 路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode.SlotAreaNode.CollisionPolygon2D
|
||||
/// 类型: <see cref="Godot.CollisionPolygon2D"/>, 路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode.SlotAreaNode.CollisionPolygon2D
|
||||
/// </summary>
|
||||
public class CollisionPolygon2D : UiNode<WeaponRoulettePanel, Godot.CollisionPolygon2D, CollisionPolygon2D>
|
||||
{
|
||||
|
@ -171,12 +170,12 @@ public abstract partial class WeaponRoulette : UiBase
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 类型: <see cref="Godot.Area2D"/>, 路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode.SlotAreaNode
|
||||
/// 类型: <see cref="Godot.Area2D"/>, 路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode.SlotAreaNode
|
||||
/// </summary>
|
||||
public class SlotAreaNode : UiNode<WeaponRoulettePanel, Godot.Area2D, SlotAreaNode>
|
||||
{
|
||||
/// <summary>
|
||||
/// 使用 Instance 属性获取当前节点实例对象, 节点类型: <see cref="Godot.CollisionPolygon2D"/>, 节点路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode.CollisionPolygon2D
|
||||
/// 使用 Instance 属性获取当前节点实例对象, 节点类型: <see cref="Godot.CollisionPolygon2D"/>, 节点路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode.CollisionPolygon2D
|
||||
/// </summary>
|
||||
public CollisionPolygon2D L_CollisionPolygon2D
|
||||
{
|
||||
|
@ -193,12 +192,12 @@ public abstract partial class WeaponRoulette : UiBase
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 类型: <see cref="UI.WeaponRoulette.WeaponSlot"/>, 路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode
|
||||
/// 类型: <see cref="UI.WeaponRoulette.WeaponSlot"/>, 路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode
|
||||
/// </summary>
|
||||
public class WeaponSlotNode : UiNode<WeaponRoulettePanel, UI.WeaponRoulette.WeaponSlot, WeaponSlotNode>
|
||||
{
|
||||
/// <summary>
|
||||
/// 使用 Instance 属性获取当前节点实例对象, 节点类型: <see cref="Godot.Control"/>, 节点路径: WeaponRoulette.Control.RouletteBg.SlotUi
|
||||
/// 使用 Instance 属性获取当前节点实例对象, 节点类型: <see cref="Godot.Control"/>, 节点路径: WeaponRoulette.Root.RouletteBg.SlotUi
|
||||
/// </summary>
|
||||
public SlotUi L_SlotUi
|
||||
{
|
||||
|
@ -211,7 +210,7 @@ public abstract partial class WeaponRoulette : UiBase
|
|||
private SlotUi _L_SlotUi;
|
||||
|
||||
/// <summary>
|
||||
/// 使用 Instance 属性获取当前节点实例对象, 节点类型: <see cref="Godot.Area2D"/>, 节点路径: WeaponRoulette.Control.RouletteBg.SlotAreaNode
|
||||
/// 使用 Instance 属性获取当前节点实例对象, 节点类型: <see cref="Godot.Area2D"/>, 节点路径: WeaponRoulette.Root.RouletteBg.SlotAreaNode
|
||||
/// </summary>
|
||||
public SlotAreaNode L_SlotAreaNode
|
||||
{
|
||||
|
@ -228,12 +227,12 @@ public abstract partial class WeaponRoulette : UiBase
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 类型: <see cref="Godot.Sprite2D"/>, 路径: WeaponRoulette.Control.RouletteBg
|
||||
/// 类型: <see cref="Godot.Sprite2D"/>, 路径: WeaponRoulette.Root.RouletteBg
|
||||
/// </summary>
|
||||
public class RouletteBg : UiNode<WeaponRoulettePanel, Godot.Sprite2D, RouletteBg>
|
||||
{
|
||||
/// <summary>
|
||||
/// 使用 Instance 属性获取当前节点实例对象, 节点类型: <see cref="UI.WeaponRoulette.WeaponSlot"/>, 节点路径: WeaponRoulette.Control.WeaponSlotNode
|
||||
/// 使用 Instance 属性获取当前节点实例对象, 节点类型: <see cref="UI.WeaponRoulette.WeaponSlot"/>, 节点路径: WeaponRoulette.Root.WeaponSlotNode
|
||||
/// </summary>
|
||||
public WeaponSlotNode L_WeaponSlotNode
|
||||
{
|
||||
|
@ -250,7 +249,7 @@ public abstract partial class WeaponRoulette : UiBase
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 类型: <see cref="Godot.Label"/>, 路径: WeaponRoulette.Control.ColorRect.Label
|
||||
/// 类型: <see cref="Godot.Label"/>, 路径: WeaponRoulette.Root.UpBar.Label
|
||||
/// </summary>
|
||||
public class Label : UiNode<WeaponRoulettePanel, Godot.Label, Label>
|
||||
{
|
||||
|
@ -259,7 +258,7 @@ public abstract partial class WeaponRoulette : UiBase
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 类型: <see cref="Godot.Label"/>, 路径: WeaponRoulette.Control.ColorRect.Label2
|
||||
/// 类型: <see cref="Godot.Label"/>, 路径: WeaponRoulette.Root.UpBar.Label2
|
||||
/// </summary>
|
||||
public class Label2 : UiNode<WeaponRoulettePanel, Godot.Label, Label2>
|
||||
{
|
||||
|
@ -268,7 +267,7 @@ public abstract partial class WeaponRoulette : UiBase
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 类型: <see cref="Godot.Label"/>, 路径: WeaponRoulette.Control.ColorRect.PageLabel
|
||||
/// 类型: <see cref="Godot.Label"/>, 路径: WeaponRoulette.Root.UpBar.PageLabel
|
||||
/// </summary>
|
||||
public class PageLabel : UiNode<WeaponRoulettePanel, Godot.Label, PageLabel>
|
||||
{
|
||||
|
@ -277,12 +276,12 @@ public abstract partial class WeaponRoulette : UiBase
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 类型: <see cref="Godot.ColorRect"/>, 路径: WeaponRoulette.Control.ColorRect
|
||||
/// 类型: <see cref="Godot.ColorRect"/>, 路径: WeaponRoulette.Root.UpBar
|
||||
/// </summary>
|
||||
public class ColorRect : UiNode<WeaponRoulettePanel, Godot.ColorRect, ColorRect>
|
||||
public class UpBar : UiNode<WeaponRoulettePanel, Godot.ColorRect, UpBar>
|
||||
{
|
||||
/// <summary>
|
||||
/// 使用 Instance 属性获取当前节点实例对象, 节点类型: <see cref="Godot.Label"/>, 节点路径: WeaponRoulette.Control.Label
|
||||
/// 使用 Instance 属性获取当前节点实例对象, 节点类型: <see cref="Godot.Label"/>, 节点路径: WeaponRoulette.Root.Label
|
||||
/// </summary>
|
||||
public Label L_Label
|
||||
{
|
||||
|
@ -295,7 +294,7 @@ public abstract partial class WeaponRoulette : UiBase
|
|||
private Label _L_Label;
|
||||
|
||||
/// <summary>
|
||||
/// 使用 Instance 属性获取当前节点实例对象, 节点类型: <see cref="Godot.Label"/>, 节点路径: WeaponRoulette.Control.Label2
|
||||
/// 使用 Instance 属性获取当前节点实例对象, 节点类型: <see cref="Godot.Label"/>, 节点路径: WeaponRoulette.Root.Label2
|
||||
/// </summary>
|
||||
public Label2 L_Label2
|
||||
{
|
||||
|
@ -308,7 +307,7 @@ public abstract partial class WeaponRoulette : UiBase
|
|||
private Label2 _L_Label2;
|
||||
|
||||
/// <summary>
|
||||
/// 使用 Instance 属性获取当前节点实例对象, 节点类型: <see cref="Godot.Label"/>, 节点路径: WeaponRoulette.Control.PageLabel
|
||||
/// 使用 Instance 属性获取当前节点实例对象, 节点类型: <see cref="Godot.Label"/>, 节点路径: WeaponRoulette.Root.PageLabel
|
||||
/// </summary>
|
||||
public PageLabel L_PageLabel
|
||||
{
|
||||
|
@ -320,14 +319,45 @@ public abstract partial class WeaponRoulette : UiBase
|
|||
}
|
||||
private PageLabel _L_PageLabel;
|
||||
|
||||
public ColorRect(WeaponRoulettePanel uiPanel, Godot.ColorRect node) : base(uiPanel, node) { }
|
||||
public override ColorRect Clone() => new (UiPanel, (Godot.ColorRect)Instance.Duplicate());
|
||||
public UpBar(WeaponRoulettePanel uiPanel, Godot.ColorRect node) : base(uiPanel, node) { }
|
||||
public override UpBar Clone() => new (UiPanel, (Godot.ColorRect)Instance.Duplicate());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 类型: <see cref="Godot.Control"/>, 路径: WeaponRoulette.Control
|
||||
/// 类型: <see cref="Godot.Label"/>, 路径: WeaponRoulette.Root.DownBar.Label
|
||||
/// </summary>
|
||||
public class Control : UiNode<WeaponRoulettePanel, Godot.Control, Control>
|
||||
public class Label_1 : UiNode<WeaponRoulettePanel, Godot.Label, Label_1>
|
||||
{
|
||||
public Label_1(WeaponRoulettePanel uiPanel, Godot.Label node) : base(uiPanel, node) { }
|
||||
public override Label_1 Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 类型: <see cref="Godot.ColorRect"/>, 路径: WeaponRoulette.Root.DownBar
|
||||
/// </summary>
|
||||
public class DownBar : UiNode<WeaponRoulettePanel, Godot.ColorRect, DownBar>
|
||||
{
|
||||
/// <summary>
|
||||
/// 使用 Instance 属性获取当前节点实例对象, 节点类型: <see cref="Godot.Label"/>, 节点路径: WeaponRoulette.Root.Label
|
||||
/// </summary>
|
||||
public Label_1 L_Label
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_L_Label == null) _L_Label = new Label_1(UiPanel, Instance.GetNode<Godot.Label>("Label"));
|
||||
return _L_Label;
|
||||
}
|
||||
}
|
||||
private Label_1 _L_Label;
|
||||
|
||||
public DownBar(WeaponRoulettePanel uiPanel, Godot.ColorRect node) : base(uiPanel, node) { }
|
||||
public override DownBar Clone() => new (UiPanel, (Godot.ColorRect)Instance.Duplicate());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 类型: <see cref="Godot.Control"/>, 路径: WeaponRoulette.Root
|
||||
/// </summary>
|
||||
public class Root : UiNode<WeaponRoulettePanel, Godot.Control, Root>
|
||||
{
|
||||
/// <summary>
|
||||
/// 使用 Instance 属性获取当前节点实例对象, 节点类型: <see cref="Godot.Sprite2D"/>, 节点路径: WeaponRoulette.RouletteBg
|
||||
|
@ -343,20 +373,33 @@ public abstract partial class WeaponRoulette : UiBase
|
|||
private RouletteBg _L_RouletteBg;
|
||||
|
||||
/// <summary>
|
||||
/// 使用 Instance 属性获取当前节点实例对象, 节点类型: <see cref="Godot.ColorRect"/>, 节点路径: WeaponRoulette.ColorRect
|
||||
/// 使用 Instance 属性获取当前节点实例对象, 节点类型: <see cref="Godot.ColorRect"/>, 节点路径: WeaponRoulette.UpBar
|
||||
/// </summary>
|
||||
public ColorRect L_ColorRect
|
||||
public UpBar L_UpBar
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_L_ColorRect == null) _L_ColorRect = new ColorRect(UiPanel, Instance.GetNode<Godot.ColorRect>("ColorRect"));
|
||||
return _L_ColorRect;
|
||||
if (_L_UpBar == null) _L_UpBar = new UpBar(UiPanel, Instance.GetNode<Godot.ColorRect>("UpBar"));
|
||||
return _L_UpBar;
|
||||
}
|
||||
}
|
||||
private ColorRect _L_ColorRect;
|
||||
private UpBar _L_UpBar;
|
||||
|
||||
public Control(WeaponRoulettePanel uiPanel, Godot.Control node) : base(uiPanel, node) { }
|
||||
public override Control Clone() => new (UiPanel, (Godot.Control)Instance.Duplicate());
|
||||
/// <summary>
|
||||
/// 使用 Instance 属性获取当前节点实例对象, 节点类型: <see cref="Godot.ColorRect"/>, 节点路径: WeaponRoulette.DownBar
|
||||
/// </summary>
|
||||
public DownBar L_DownBar
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_L_DownBar == null) _L_DownBar = new DownBar(UiPanel, Instance.GetNode<Godot.ColorRect>("DownBar"));
|
||||
return _L_DownBar;
|
||||
}
|
||||
}
|
||||
private DownBar _L_DownBar;
|
||||
|
||||
public Root(WeaponRoulettePanel uiPanel, Godot.Control node) : base(uiPanel, node) { }
|
||||
public override Root Clone() => new (UiPanel, (Godot.Control)Instance.Duplicate());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -397,74 +440,74 @@ public abstract partial class WeaponRoulette : UiBase
|
|||
public Bg S_Bg => L_Bg;
|
||||
|
||||
/// <summary>
|
||||
/// 场景中唯一名称的节点, 节点类型: <see cref="Godot.Sprite2D"/>, 节点路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode.SlotUi.WeaponUi.WeaponIcon
|
||||
/// 场景中唯一名称的节点, 节点类型: <see cref="Godot.Sprite2D"/>, 节点路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode.SlotUi.WeaponUi.WeaponIcon
|
||||
/// </summary>
|
||||
public WeaponIcon S_WeaponIcon => L_Control.L_RouletteBg.L_WeaponSlotNode.L_SlotUi.L_WeaponUi.L_WeaponIcon;
|
||||
public WeaponIcon S_WeaponIcon => L_Root.L_RouletteBg.L_WeaponSlotNode.L_SlotUi.L_WeaponUi.L_WeaponIcon;
|
||||
|
||||
/// <summary>
|
||||
/// 场景中唯一名称的节点, 节点类型: <see cref="Godot.Label"/>, 节点路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode.SlotUi.WeaponUi.AmmoLabel
|
||||
/// 场景中唯一名称的节点, 节点类型: <see cref="Godot.Label"/>, 节点路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode.SlotUi.WeaponUi.AmmoLabel
|
||||
/// </summary>
|
||||
public AmmoLabel S_AmmoLabel => L_Control.L_RouletteBg.L_WeaponSlotNode.L_SlotUi.L_WeaponUi.L_AmmoLabel;
|
||||
public AmmoLabel S_AmmoLabel => L_Root.L_RouletteBg.L_WeaponSlotNode.L_SlotUi.L_WeaponUi.L_AmmoLabel;
|
||||
|
||||
/// <summary>
|
||||
/// 场景中唯一名称的节点, 节点类型: <see cref="Godot.Control"/>, 节点路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode.SlotUi.WeaponUi
|
||||
/// 场景中唯一名称的节点, 节点类型: <see cref="Godot.Control"/>, 节点路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode.SlotUi.WeaponUi
|
||||
/// </summary>
|
||||
public WeaponUi S_WeaponUi => L_Control.L_RouletteBg.L_WeaponSlotNode.L_SlotUi.L_WeaponUi;
|
||||
public WeaponUi S_WeaponUi => L_Root.L_RouletteBg.L_WeaponSlotNode.L_SlotUi.L_WeaponUi;
|
||||
|
||||
/// <summary>
|
||||
/// 场景中唯一名称的节点, 节点类型: <see cref="Godot.Sprite2D"/>, 节点路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode.SlotUi.LockSprite
|
||||
/// 场景中唯一名称的节点, 节点类型: <see cref="Godot.Sprite2D"/>, 节点路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode.SlotUi.LockSprite
|
||||
/// </summary>
|
||||
public LockSprite S_LockSprite => L_Control.L_RouletteBg.L_WeaponSlotNode.L_SlotUi.L_LockSprite;
|
||||
public LockSprite S_LockSprite => L_Root.L_RouletteBg.L_WeaponSlotNode.L_SlotUi.L_LockSprite;
|
||||
|
||||
/// <summary>
|
||||
/// 场景中唯一名称的节点, 节点类型: <see cref="Godot.Control"/>, 节点路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode.SlotUi
|
||||
/// 场景中唯一名称的节点, 节点类型: <see cref="Godot.Control"/>, 节点路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode.SlotUi
|
||||
/// </summary>
|
||||
public SlotUi S_SlotUi => L_Control.L_RouletteBg.L_WeaponSlotNode.L_SlotUi;
|
||||
public SlotUi S_SlotUi => L_Root.L_RouletteBg.L_WeaponSlotNode.L_SlotUi;
|
||||
|
||||
/// <summary>
|
||||
/// 场景中唯一名称的节点, 节点类型: <see cref="Godot.CollisionPolygon2D"/>, 节点路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode.SlotAreaNode.CollisionPolygon2D
|
||||
/// 场景中唯一名称的节点, 节点类型: <see cref="Godot.CollisionPolygon2D"/>, 节点路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode.SlotAreaNode.CollisionPolygon2D
|
||||
/// </summary>
|
||||
public CollisionPolygon2D S_CollisionPolygon2D => L_Control.L_RouletteBg.L_WeaponSlotNode.L_SlotAreaNode.L_CollisionPolygon2D;
|
||||
public CollisionPolygon2D S_CollisionPolygon2D => L_Root.L_RouletteBg.L_WeaponSlotNode.L_SlotAreaNode.L_CollisionPolygon2D;
|
||||
|
||||
/// <summary>
|
||||
/// 场景中唯一名称的节点, 节点类型: <see cref="Godot.Area2D"/>, 节点路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode.SlotAreaNode
|
||||
/// 场景中唯一名称的节点, 节点类型: <see cref="Godot.Area2D"/>, 节点路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode.SlotAreaNode
|
||||
/// </summary>
|
||||
public SlotAreaNode S_SlotAreaNode => L_Control.L_RouletteBg.L_WeaponSlotNode.L_SlotAreaNode;
|
||||
public SlotAreaNode S_SlotAreaNode => L_Root.L_RouletteBg.L_WeaponSlotNode.L_SlotAreaNode;
|
||||
|
||||
/// <summary>
|
||||
/// 场景中唯一名称的节点, 节点类型: <see cref="UI.WeaponRoulette.WeaponSlot"/>, 节点路径: WeaponRoulette.Control.RouletteBg.WeaponSlotNode
|
||||
/// 场景中唯一名称的节点, 节点类型: <see cref="UI.WeaponRoulette.WeaponSlot"/>, 节点路径: WeaponRoulette.Root.RouletteBg.WeaponSlotNode
|
||||
/// </summary>
|
||||
public WeaponSlotNode S_WeaponSlotNode => L_Control.L_RouletteBg.L_WeaponSlotNode;
|
||||
public WeaponSlotNode S_WeaponSlotNode => L_Root.L_RouletteBg.L_WeaponSlotNode;
|
||||
|
||||
/// <summary>
|
||||
/// 场景中唯一名称的节点, 节点类型: <see cref="Godot.Sprite2D"/>, 节点路径: WeaponRoulette.Control.RouletteBg
|
||||
/// 场景中唯一名称的节点, 节点类型: <see cref="Godot.Sprite2D"/>, 节点路径: WeaponRoulette.Root.RouletteBg
|
||||
/// </summary>
|
||||
public RouletteBg S_RouletteBg => L_Control.L_RouletteBg;
|
||||
public RouletteBg S_RouletteBg => L_Root.L_RouletteBg;
|
||||
|
||||
/// <summary>
|
||||
/// 场景中唯一名称的节点, 节点类型: <see cref="Godot.Label"/>, 节点路径: WeaponRoulette.Control.ColorRect.Label
|
||||
/// 场景中唯一名称的节点, 节点类型: <see cref="Godot.Label"/>, 节点路径: WeaponRoulette.Root.UpBar.Label2
|
||||
/// </summary>
|
||||
public Label S_Label => L_Control.L_ColorRect.L_Label;
|
||||
public Label2 S_Label2 => L_Root.L_UpBar.L_Label2;
|
||||
|
||||
/// <summary>
|
||||
/// 场景中唯一名称的节点, 节点类型: <see cref="Godot.Label"/>, 节点路径: WeaponRoulette.Control.ColorRect.Label2
|
||||
/// 场景中唯一名称的节点, 节点类型: <see cref="Godot.Label"/>, 节点路径: WeaponRoulette.Root.UpBar.PageLabel
|
||||
/// </summary>
|
||||
public Label2 S_Label2 => L_Control.L_ColorRect.L_Label2;
|
||||
public PageLabel S_PageLabel => L_Root.L_UpBar.L_PageLabel;
|
||||
|
||||
/// <summary>
|
||||
/// 场景中唯一名称的节点, 节点类型: <see cref="Godot.Label"/>, 节点路径: WeaponRoulette.Control.ColorRect.PageLabel
|
||||
/// 场景中唯一名称的节点, 节点类型: <see cref="Godot.ColorRect"/>, 节点路径: WeaponRoulette.Root.UpBar
|
||||
/// </summary>
|
||||
public PageLabel S_PageLabel => L_Control.L_ColorRect.L_PageLabel;
|
||||
public UpBar S_UpBar => L_Root.L_UpBar;
|
||||
|
||||
/// <summary>
|
||||
/// 场景中唯一名称的节点, 节点类型: <see cref="Godot.ColorRect"/>, 节点路径: WeaponRoulette.Control.ColorRect
|
||||
/// 场景中唯一名称的节点, 节点类型: <see cref="Godot.ColorRect"/>, 节点路径: WeaponRoulette.Root.DownBar
|
||||
/// </summary>
|
||||
public ColorRect S_ColorRect => L_Control.L_ColorRect;
|
||||
public DownBar S_DownBar => L_Root.L_DownBar;
|
||||
|
||||
/// <summary>
|
||||
/// 场景中唯一名称的节点, 节点类型: <see cref="Godot.Control"/>, 节点路径: WeaponRoulette.Control
|
||||
/// 场景中唯一名称的节点, 节点类型: <see cref="Godot.Control"/>, 节点路径: WeaponRoulette.Root
|
||||
/// </summary>
|
||||
public Control S_Control => L_Control;
|
||||
public Root S_Root => L_Root;
|
||||
|
||||
/// <summary>
|
||||
/// 场景中唯一名称的节点, 节点类型: <see cref="Godot.CollisionShape2D"/>, 节点路径: WeaponRoulette.MouseArea.CollisionShape2D
|
||||
|
|
|
@ -31,7 +31,7 @@ public partial class WeaponRoulettePanel : WeaponRoulette
|
|||
|
||||
public override void OnCreateUi()
|
||||
{
|
||||
L_Control.Instance.Visible = false;
|
||||
S_Root.Instance.Visible = false;
|
||||
S_Bg.Instance.Visible = false;
|
||||
|
||||
//创建武器插槽
|
||||
|
@ -84,31 +84,46 @@ public partial class WeaponRoulettePanel : WeaponRoulette
|
|||
{
|
||||
S_MouseArea.Instance.GlobalPosition = GetGlobalMousePosition();
|
||||
|
||||
if (_maxPageIndex > 0)
|
||||
//扔掉武器
|
||||
if (ActiveWeapon != null && InputManager.MeleeAttack)
|
||||
{
|
||||
if (InputManager.ExchangeWeapon) //上一页
|
||||
ActiveWeapon.Master.ThrowWeapon(ActiveWeapon.PackageIndex);
|
||||
ActiveWeapon = null;
|
||||
RefreshWeapon();
|
||||
}
|
||||
else
|
||||
{
|
||||
//上一页/下一页
|
||||
if (_maxPageIndex > 0)
|
||||
{
|
||||
_pageIndex--;
|
||||
if (_pageIndex < 0)
|
||||
if (InputManager.ExchangeWeapon) //上一页
|
||||
{
|
||||
_pageIndex = _maxPageIndex;
|
||||
}
|
||||
_pageIndex--;
|
||||
if (_pageIndex < 0)
|
||||
{
|
||||
_pageIndex = _maxPageIndex;
|
||||
}
|
||||
|
||||
RefreshPageLabel();
|
||||
RefreshWeapon();
|
||||
}
|
||||
else if (InputManager.Interactive) //下一页
|
||||
{
|
||||
_pageIndex++;
|
||||
if (_pageIndex > _maxPageIndex)
|
||||
RefreshPageLabel();
|
||||
RefreshWeapon();
|
||||
}
|
||||
else if (InputManager.Interactive) //下一页
|
||||
{
|
||||
_pageIndex = 0;
|
||||
}
|
||||
_pageIndex++;
|
||||
if (_pageIndex > _maxPageIndex)
|
||||
{
|
||||
_pageIndex = 0;
|
||||
}
|
||||
|
||||
RefreshPageLabel();
|
||||
RefreshWeapon();
|
||||
RefreshPageLabel();
|
||||
RefreshWeapon();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//扔掉武器提示
|
||||
S_DownBar.Instance.Visible = ActiveWeapon != null;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -123,7 +138,7 @@ public partial class WeaponRoulettePanel : WeaponRoulette
|
|||
_pressRouletteFlag = true;
|
||||
_isMagnifyRoulette = true;
|
||||
|
||||
L_Control.Instance.Visible = true;
|
||||
S_Root.Instance.Visible = true;
|
||||
S_Bg.Instance.Visible = true;
|
||||
SetEnableSectorCollision(true);
|
||||
RefreshSlotPage();
|
||||
|
@ -134,7 +149,7 @@ public partial class WeaponRoulettePanel : WeaponRoulette
|
|||
//关闭轮盘
|
||||
private void ShrinkRoulette()
|
||||
{
|
||||
L_Control.Instance.Visible = false;
|
||||
S_Root.Instance.Visible = false;
|
||||
S_Bg.Instance.Visible = false;
|
||||
|
||||
_isMagnifyRoulette = false;
|
||||
|
@ -185,7 +200,7 @@ public partial class WeaponRoulettePanel : WeaponRoulette
|
|||
}
|
||||
}
|
||||
_maxPageIndex = Mathf.CeilToInt((lastIndex + 1f) / SlotCount) - 1;
|
||||
S_ColorRect.Instance.Visible = _maxPageIndex > 0;
|
||||
S_UpBar.Instance.Visible = _maxPageIndex > 0;
|
||||
|
||||
if (_pageIndex > _maxPageIndex)
|
||||
{
|
||||
|
|
|
@ -37,6 +37,11 @@ public partial class WeaponSlot : Node2D, IUiNodeScript
|
|||
|
||||
private void OnAreaExited(Area2D other)
|
||||
{
|
||||
if (_node.UiPanel.ActiveWeapon == _weapon)
|
||||
{
|
||||
_node.UiPanel.ActiveWeapon = null;
|
||||
}
|
||||
|
||||
_node.Instance.Scale = Vector2.One;
|
||||
_node.L_SlotUi.L_WeaponUi.L_WeaponIcon.Instance.Material.SetShaderMaterialParameter(ShaderParamNames.OutlineColor, Colors.Black);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user