Aqua state
This commit is contained in:
parent
8708540770
commit
31ba172123
6 changed files with 48 additions and 36 deletions
|
|
@ -126,7 +126,7 @@ cheat_add_sun={
|
||||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194333,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194333,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
cancel_plant={
|
cancel_action={
|
||||||
"deadzone": 0.5,
|
"deadzone": 0.5,
|
||||||
"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":2,"position":Vector2(82, 2),"global_position":Vector2(91, 41),"factor":1.0,"button_index":2,"canceled":false,"pressed":true,"double_click":false,"script":null)
|
"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":2,"position":Vector2(82, 2),"global_position":Vector2(91, 41),"factor":1.0,"button_index":2,"canceled":false,"pressed":true,"double_click":false,"script":null)
|
||||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null)
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null)
|
||||||
|
|
|
||||||
|
|
@ -14,14 +14,6 @@
|
||||||
[ext_resource type="AudioStream" uid="uid://w0qfwds4o3ti" path="res://assets/audio/sfx/hit_generic.tres" id="7_67t4t"]
|
[ext_resource type="AudioStream" uid="uid://w0qfwds4o3ti" path="res://assets/audio/sfx/hit_generic.tres" id="7_67t4t"]
|
||||||
[ext_resource type="Script" uid="uid://30pbgasu64aw" path="res://scripts/entities/FlashShaderController.cs" id="13_7fceb"]
|
[ext_resource type="Script" uid="uid://30pbgasu64aw" path="res://scripts/entities/FlashShaderController.cs" id="13_7fceb"]
|
||||||
|
|
||||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_b8kja"]
|
|
||||||
resource_local_to_scene = true
|
|
||||||
shader = ExtResource("2_s2p07")
|
|
||||||
shader_parameter/FLASH_COLOR = Color(1, 0.709804, 0.439216, 0.5)
|
|
||||||
shader_parameter/HIGHLIGHT_COLOR = Color(1, 0.709804, 0.439216, 0.5)
|
|
||||||
shader_parameter/blend = 0.0
|
|
||||||
shader_parameter/selected = false
|
|
||||||
|
|
||||||
[sub_resource type="CircleShape2D" id="CircleShape2D_67t4t"]
|
[sub_resource type="CircleShape2D" id="CircleShape2D_67t4t"]
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_011r0"]
|
[sub_resource type="Resource" id="Resource_011r0"]
|
||||||
|
|
@ -38,12 +30,17 @@ flat_value = 0.2
|
||||||
percentage_value = 0.0
|
percentage_value = 0.0
|
||||||
mult_value = 1.0
|
mult_value = 1.0
|
||||||
|
|
||||||
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_b8kja"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
shader = ExtResource("2_s2p07")
|
||||||
|
shader_parameter/FLASH_COLOR = Color(1, 0.709804, 0.439216, 0.5)
|
||||||
|
shader_parameter/HIGHLIGHT_COLOR = Color(1, 0.709804, 0.439216, 0.5)
|
||||||
|
shader_parameter/blend = 0.0
|
||||||
|
shader_parameter/selected = false
|
||||||
|
|
||||||
[node name="ConeZombie" node_paths=PackedStringArray("_armor") instance=ExtResource("1_3dq4c")]
|
[node name="ConeZombie" node_paths=PackedStringArray("_armor") instance=ExtResource("1_3dq4c")]
|
||||||
_armor = NodePath("Armor")
|
_armor = NodePath("Armor")
|
||||||
|
|
||||||
[node name="CanvasGroup" parent="." index="0"]
|
|
||||||
material = SubResource("ShaderMaterial_b8kja")
|
|
||||||
|
|
||||||
[node name="RightUpperLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="1"]
|
[node name="RightUpperLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="1"]
|
||||||
scale = Vector2(0.999835, 0.999835)
|
scale = Vector2(0.999835, 0.999835)
|
||||||
|
|
||||||
|
|
@ -63,33 +60,33 @@ scale = Vector2(0.999833, 0.999833)
|
||||||
scale = Vector2(0.999829, 0.999829)
|
scale = Vector2(0.999829, 0.999829)
|
||||||
|
|
||||||
[node name="Body" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="3"]
|
[node name="Body" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="3"]
|
||||||
scale = Vector2(0.999829, 0.999829)
|
scale = Vector2(0.99983, 0.99983)
|
||||||
|
|
||||||
[node name="RightUpperArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="0"]
|
[node name="RightUpperArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="0"]
|
||||||
scale = Vector2(0.999827, 0.999827)
|
scale = Vector2(0.999829, 0.999829)
|
||||||
|
|
||||||
[node name="RightLowerArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm" index="1"]
|
[node name="RightLowerArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm" index="1"]
|
||||||
scale = Vector2(0.999828, 0.999828)
|
scale = Vector2(0.999826, 0.999826)
|
||||||
|
|
||||||
[node name="RightHand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm/RightLowerArm" index="0"]
|
[node name="RightHand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm/RightLowerArm" index="0"]
|
||||||
scale = Vector2(0.999827, 0.999827)
|
|
||||||
|
|
||||||
[node name="Tie" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="2"]
|
|
||||||
rotation = -0.043512
|
|
||||||
skew = -0.000153303
|
|
||||||
|
|
||||||
[node name="Head" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="3"]
|
|
||||||
scale = Vector2(0.999828, 0.999828)
|
scale = Vector2(0.999828, 0.999828)
|
||||||
|
|
||||||
|
[node name="Tie" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="2"]
|
||||||
|
rotation = 0.0945796
|
||||||
|
skew = -0.000153542
|
||||||
|
|
||||||
|
[node name="Head" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="3"]
|
||||||
|
scale = Vector2(0.999829, 0.999829)
|
||||||
|
|
||||||
[node name="Right_Eye" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="0"]
|
[node name="Right_Eye" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="0"]
|
||||||
position = Vector2(-16, -8.00001)
|
position = Vector2(-16, -8)
|
||||||
|
|
||||||
[node name="Left_Eye" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="1"]
|
[node name="Left_Eye" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="1"]
|
||||||
position = Vector2(-4, -9)
|
position = Vector2(-4, -9)
|
||||||
|
|
||||||
[node name="Jaw" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="2"]
|
[node name="Jaw" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="2"]
|
||||||
position = Vector2(-2.94596, 2.86958)
|
position = Vector2(-3.00116, 2.99804)
|
||||||
rotation = -0.0303934
|
rotation = 0.00917867
|
||||||
scale = Vector2(0.999829, 0.999829)
|
scale = Vector2(0.999829, 0.999829)
|
||||||
|
|
||||||
[node name="Jaw" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" index="1"]
|
[node name="Jaw" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" index="1"]
|
||||||
|
|
@ -123,19 +120,19 @@ position = Vector2(1, -6)
|
||||||
shape = SubResource("CircleShape2D_67t4t")
|
shape = SubResource("CircleShape2D_67t4t")
|
||||||
|
|
||||||
[node name="LeftUpperArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="4"]
|
[node name="LeftUpperArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="4"]
|
||||||
scale = Vector2(0.999832, 0.999832)
|
scale = Vector2(0.999833, 0.999833)
|
||||||
|
|
||||||
[node name="Left_Lower_Arm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile" index="0"]
|
[node name="Left_Lower_Arm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile" index="0"]
|
||||||
rotation = -0.0461189
|
rotation = 0.0889256
|
||||||
scale = Vector2(1, 1)
|
scale = Vector2(0.999999, 0.999999)
|
||||||
|
|
||||||
[node name="Left_Hand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile/Left_Lower_Arm" index="0"]
|
[node name="Left_Hand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile/Left_Lower_Arm" index="0"]
|
||||||
position = Vector2(-0.99983, 12.9978)
|
position = Vector2(-0.99983, 12.9978)
|
||||||
rotation = -0.0380157
|
rotation = -0.0392463
|
||||||
scale = Vector2(0.999658, 0.999658)
|
scale = Vector2(0.999658, 0.999658)
|
||||||
|
|
||||||
[node name="LeftLowerArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm" index="2"]
|
[node name="LeftLowerArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm" index="2"]
|
||||||
scale = Vector2(0.999832, 0.999832)
|
scale = Vector2(0.999829, 0.999829)
|
||||||
|
|
||||||
[node name="LeftHand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm" index="0"]
|
[node name="LeftHand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm" index="0"]
|
||||||
scale = Vector2(0.999828, 0.999828)
|
scale = Vector2(0.999828, 0.999828)
|
||||||
|
|
@ -145,6 +142,7 @@ _damage = SubResource("Resource_011r0")
|
||||||
|
|
||||||
[node name="Mover" parent="." index="4"]
|
[node name="Mover" parent="." index="4"]
|
||||||
_speed = SubResource("Resource_b6mal")
|
_speed = SubResource("Resource_b6mal")
|
||||||
|
_speedControlMult = 0.371759
|
||||||
|
|
||||||
[node name="HitPlayer" parent="." index="5"]
|
[node name="HitPlayer" parent="." index="5"]
|
||||||
playlist = Array[AudioStream]([ExtResource("7_0amn8"), ExtResource("7_67t4t")])
|
playlist = Array[AudioStream]([ExtResource("7_0amn8"), ExtResource("7_67t4t")])
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ namespace Newlon.Components.Plants;
|
||||||
public partial class DragAction : Node
|
public partial class DragAction : Node
|
||||||
{
|
{
|
||||||
[Signal] public delegate void DragBeginEventHandler();
|
[Signal] public delegate void DragBeginEventHandler();
|
||||||
[Signal] public delegate void DragEndEventHandler();
|
[Signal] public delegate void DragEndEventHandler(bool aborted);
|
||||||
private bool dragging = false;
|
private bool dragging = false;
|
||||||
private bool toggle = false;
|
private bool toggle = false;
|
||||||
private bool can_end = false;
|
private bool can_end = false;
|
||||||
|
|
@ -38,9 +38,14 @@ public partial class DragAction : Node
|
||||||
if (dragging && can_end && (toggle == false && @event.IsActionReleased("primary_action") || (toggle == true && @event.IsActionPressed("primary_action"))))
|
if (dragging && can_end && (toggle == false && @event.IsActionReleased("primary_action") || (toggle == true && @event.IsActionPressed("primary_action"))))
|
||||||
{
|
{
|
||||||
dragging = false;
|
dragging = false;
|
||||||
EmitSignal(SignalName.DragEnd);
|
EmitSignal(SignalName.DragEnd,false);
|
||||||
GetViewport().SetInputAsHandled();
|
GetViewport().SetInputAsHandled();
|
||||||
}
|
}
|
||||||
|
if (dragging && @event.IsActionPressed("cancel_action"))
|
||||||
|
{
|
||||||
|
dragging = false;
|
||||||
|
EmitSignal(SignalName.DragEnd,true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public void OnToggleTimeout()
|
public void OnToggleTimeout()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -16,12 +16,13 @@ public partial class SnipachBehaviour : BaseBehaviour
|
||||||
attackBox.Visible = dragging;
|
attackBox.Visible = dragging;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnDragEnd()
|
public void OnDragEnd(bool aborted)
|
||||||
{
|
{
|
||||||
if (dragging == false) return;
|
if (dragging == false) return;
|
||||||
attackBox.Attack();
|
|
||||||
dragging = false;
|
dragging = false;
|
||||||
attackBox.Visible = dragging;
|
attackBox.Visible = dragging;
|
||||||
|
if (aborted) return;
|
||||||
|
attackBox.Attack();
|
||||||
timer.Start();
|
timer.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -31,6 +32,14 @@ public partial class SnipachBehaviour : BaseBehaviour
|
||||||
{
|
{
|
||||||
attackBox.GlobalPosition = (Cursor.GetCursorPosition() / FieldParams.Tile).Ceil() * FieldParams.Tile - new Vector2(20, 14);
|
attackBox.GlobalPosition = (Cursor.GetCursorPosition() / FieldParams.Tile).Ceil() * FieldParams.Tile - new Vector2(20, 14);
|
||||||
}
|
}
|
||||||
|
if (timer.TimeLeft > 0)
|
||||||
|
{
|
||||||
|
GetParent<Node2D>().Modulate = Colors.DeepSkyBlue;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
GetParent<Node2D>().Modulate = Colors.White;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ public partial class ShovelButton : TextureButton
|
||||||
hoveredEntity = null;
|
hoveredEntity = null;
|
||||||
ButtonPressed = false;
|
ButtonPressed = false;
|
||||||
}
|
}
|
||||||
if (@event.IsActionPressed("cancel_plant") && ButtonPressed)
|
if (@event.IsActionPressed("cancel_action") && ButtonPressed)
|
||||||
{
|
{
|
||||||
hoveredEntity?.GetNode<FlashShaderController>("FlashController").Deselect();
|
hoveredEntity?.GetNode<FlashShaderController>("FlashController").Deselect();
|
||||||
hoveredEntity = null;
|
hoveredEntity = null;
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ public partial class PlantField : Node2D
|
||||||
|
|
||||||
public override void _UnhandledInput(InputEvent @event)
|
public override void _UnhandledInput(InputEvent @event)
|
||||||
{
|
{
|
||||||
if (@event.IsActionPressed("cancel_plant") && _slot != null)
|
if (@event.IsActionPressed("cancel_action") && _slot != null)
|
||||||
{
|
{
|
||||||
ResetPlant();
|
ResetPlant();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue