Threepeater done
This commit is contained in:
parent
c15a08b5a1
commit
40cbe49741
10 changed files with 138 additions and 27 deletions
BIN
assets/sprites/atlases/plants/cumbucer.png
Normal file
BIN
assets/sprites/atlases/plants/cumbucer.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.2 KiB |
34
assets/sprites/atlases/plants/cumbucer.png.import
Normal file
34
assets/sprites/atlases/plants/cumbucer.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bt76iudw2qgnv"
|
||||
path="res://.godot/imported/cumbucer.png-1a6d916c5ccfc340ef886d81a8be070c.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/atlases/plants/cumbucer.png"
|
||||
dest_files=["res://.godot/imported/cumbucer.png-1a6d916c5ccfc340ef886d81a8be070c.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
assets/sprites/atlases/plants/threepeater.png
Normal file
BIN
assets/sprites/atlases/plants/threepeater.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
34
assets/sprites/atlases/plants/threepeater.png.import
Normal file
34
assets/sprites/atlases/plants/threepeater.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dyfa4462hu3w1"
|
||||
path="res://.godot/imported/threepeater.png-50948012376f5154c435c851ed1452dd.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/atlases/plants/threepeater.png"
|
||||
dest_files=["res://.godot/imported/threepeater.png-50948012376f5154c435c851ed1452dd.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
7
assets/sprites/plants/threepeater.tres
Normal file
7
assets/sprites/plants/threepeater.tres
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://8se1nscal0em"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://dyfa4462hu3w1" path="res://assets/sprites/atlases/plants/threepeater.png" id="1_j5tei"]
|
||||
|
||||
[resource]
|
||||
atlas = ExtResource("1_j5tei")
|
||||
region = Rect2(3, 4, 70, 73)
|
||||
|
|
@ -62,7 +62,7 @@ theme/custom_font="res://assets/fonts/pico12.ttf"
|
|||
|
||||
cheat_add_sun={
|
||||
"deadzone": 0.5,
|
||||
"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":83,"key_label":0,"unicode":115,"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={
|
||||
|
|
|
|||
|
|
@ -1,21 +1,20 @@
|
|||
[gd_resource type="Resource" script_class="PlantResource" load_steps=4 format=3 uid="uid://bnhwg57euiyf5"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://ot1n4nval86w" path="res://assets/sprites/plants/peashooter.tres" id="1_78bhe"]
|
||||
[ext_resource type="Texture2D" uid="uid://8se1nscal0em" path="res://assets/sprites/plants/threepeater.tres" id="1_hinp6"]
|
||||
[ext_resource type="PackedScene" uid="uid://eegv1qihfv2q" path="res://scenes/entities/plants/threepeater.tscn" id="2_uqpu0"]
|
||||
[ext_resource type="Script" uid="uid://cyenlko1knygw" path="res://scripts/resources/PlantResource.cs" id="3_3lugi"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("3_3lugi")
|
||||
display_name = "Threepeater"
|
||||
display_description = "[p][center][color=GOLD][font_size=32]Work in progress[/font_size][/color][/center][/p]
|
||||
[p]Shoots peas at zombies in three lanes.[/p]
|
||||
display_description = "[p]Shoots peas at zombies in three lanes.[/p]
|
||||
[p]Health points: [color=DARK_RED]3 bites[/color].[/p]
|
||||
[p]Reload time: [color=DARK_RED]5 seconds[/color].[/p]
|
||||
[p]Pea damage: [color=DARK_RED]1 pea[/color] ([color=DARK_RED]3 pea[/color] when in close quarters).[/p]
|
||||
[p]Firerate: [color=DARK_RED]1.5 seconds[/color].[/p]"
|
||||
[p]Firerate: [color=DARK_RED]1.6 seconds[/color].[/p]"
|
||||
Cost = 300
|
||||
Scene = ExtResource("2_uqpu0")
|
||||
ReloadTime = 5.0
|
||||
ReloadProgress = 0.0
|
||||
Preview = ExtResource("1_78bhe")
|
||||
Preview = ExtResource("1_hinp6")
|
||||
Layer = 1
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
[gd_scene load_steps=11 format=3 uid="uid://eegv1qihfv2q"]
|
||||
[gd_scene load_steps=18 format=3 uid="uid://eegv1qihfv2q"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://dy41q1kxray5t" path="res://scenes/entities/plants/peashooter.tscn" id="1_muntu"]
|
||||
[ext_resource type="Script" uid="uid://djpc0kvagpadv" path="res://scripts/components/plants/ThreepeaterShooter.cs" id="2_ieami"]
|
||||
[ext_resource type="Texture2D" uid="uid://dyfa4462hu3w1" path="res://assets/sprites/atlases/plants/threepeater.png" id="2_j7h7q"]
|
||||
[ext_resource type="Script" uid="uid://hccb0aee0x0o" path="res://scripts/components/plants/PlantEyesightLimiter.cs" id="3_dqn6w"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_a2y0j"]
|
||||
|
|
@ -24,10 +25,10 @@ _data = {
|
|||
&"RESET": SubResource("Animation_a2y0j")
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_oxaxi"]
|
||||
[sub_resource type="Animation" id="Animation_pqbws"]
|
||||
resource_name = "idle"
|
||||
length = 0.833342
|
||||
loop_mode = 1
|
||||
length = 0.500008
|
||||
loop_mode = 2
|
||||
step = 0.0833333
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
|
|
@ -36,15 +37,15 @@ tracks/0/path = NodePath("Sprite2D:frame")
|
|||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.0833333, 0.166667, 0.25, 0.333333, 0.416667, 0.5, 0.583333, 0.666667, 0.75),
|
||||
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
|
||||
"times": PackedFloat32Array(0, 0.0833333, 0.166667, 0.25, 0.333333, 0.416667),
|
||||
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1),
|
||||
"update": 1,
|
||||
"values": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||
"values": [13, 14, 15, 16, 17, 18]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_7sohe"]
|
||||
[sub_resource type="Animation" id="Animation_7kfrv"]
|
||||
resource_name = "shoot"
|
||||
length = 0.666675
|
||||
length = 1.58334
|
||||
step = 0.0833333
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
|
|
@ -53,10 +54,10 @@ tracks/0/path = NodePath("Sprite2D:frame")
|
|||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.0833333, 0.166667, 0.25, 0.333333, 0.416667, 0.5, 0.583333),
|
||||
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1),
|
||||
"times": PackedFloat32Array(0, 0.0833333, 0.166667, 0.25, 0.333333, 0.416667, 0.5, 0.583333, 0.666667, 0.75, 0.833333, 0.916667, 1, 1.08333, 1.16667, 1.25, 1.33333, 1.41667, 1.5),
|
||||
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
|
||||
"update": 1,
|
||||
"values": [10, 11, 12, 13, 14, 15, 16, 17]
|
||||
"values": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18]
|
||||
}
|
||||
tracks/1/type = "method"
|
||||
tracks/1/imported = false
|
||||
|
|
@ -65,7 +66,7 @@ tracks/1/path = NodePath("Shooter")
|
|||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0.25),
|
||||
"times": PackedFloat32Array(0.75),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"values": [{
|
||||
"args": [],
|
||||
|
|
@ -79,7 +80,7 @@ tracks/2/path = NodePath("ChannelPlayer")
|
|||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0.25),
|
||||
"times": PackedFloat32Array(0.75),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"values": [{
|
||||
"args": [],
|
||||
|
|
@ -87,13 +88,36 @@ tracks/2/keys = {
|
|||
}]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_pqbws"]
|
||||
resource_local_to_scene = true
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_o2obw"]
|
||||
_data = {
|
||||
&"idle": SubResource("Animation_oxaxi"),
|
||||
&"shoot": SubResource("Animation_7sohe")
|
||||
&"idle": SubResource("Animation_pqbws"),
|
||||
&"shoot": SubResource("Animation_7kfrv")
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_j7h7q"]
|
||||
animation = &"threepeater/idle"
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_pqbws"]
|
||||
animation = &"threepeater/shoot"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_7kfrv"]
|
||||
advance_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_o2obw"]
|
||||
advance_mode = 2
|
||||
advance_condition = &"ready"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_wiys2"]
|
||||
switch_mode = 2
|
||||
advance_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_wiys2"]
|
||||
states/threepeater_idle/node = SubResource("AnimationNodeAnimation_j7h7q")
|
||||
states/threepeater_idle/position = Vector2(404, 100)
|
||||
states/threepeater_shoot/node = SubResource("AnimationNodeAnimation_pqbws")
|
||||
states/threepeater_shoot/position = Vector2(633, 91)
|
||||
transitions = ["Start", "threepeater_idle", SubResource("AnimationNodeStateMachineTransition_7kfrv"), "threepeater_idle", "threepeater_shoot", SubResource("AnimationNodeStateMachineTransition_o2obw"), "threepeater_shoot", "threepeater_idle", SubResource("AnimationNodeStateMachineTransition_wiys2")]
|
||||
|
||||
[sub_resource type="SegmentShape2D" id="SegmentShape2D_j7h7q"]
|
||||
resource_local_to_scene = true
|
||||
|
||||
|
|
@ -102,15 +126,27 @@ resource_local_to_scene = true
|
|||
|
||||
[node name="Threepeater" instance=ExtResource("1_muntu")]
|
||||
|
||||
[node name="Sprite2D" parent="." index="0"]
|
||||
position = Vector2(6, -13)
|
||||
texture = ExtResource("2_j7h7q")
|
||||
hframes = 13
|
||||
|
||||
[node name="AnimationPlayer" parent="." index="1"]
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_ipp6b"),
|
||||
&"peashooter": SubResource("AnimationLibrary_pqbws")
|
||||
&"threepeater": SubResource("AnimationLibrary_o2obw")
|
||||
}
|
||||
|
||||
[node name="AnimationTree" parent="." index="2"]
|
||||
tree_root = SubResource("AnimationNodeStateMachine_wiys2")
|
||||
|
||||
[node name="Shooter" parent="." index="3"]
|
||||
position = Vector2(20, -9)
|
||||
script = ExtResource("2_ieami")
|
||||
|
||||
[node name="Timer" parent="Shooter" index="0"]
|
||||
wait_time = 1.6
|
||||
|
||||
[node name="CollisionShape2D" parent="Eysight" index="0"]
|
||||
shape = SubResource("SegmentShape2D_j7h7q")
|
||||
|
||||
|
|
|
|||
|
|
@ -95,6 +95,7 @@ script = ExtResource("7_tv07f")
|
|||
_referenceTimer = NodePath("../RechargeTimer")
|
||||
|
||||
[node name="RechargeTimer" type="Timer" parent="."]
|
||||
process_mode = 1
|
||||
one_shot = true
|
||||
|
||||
[connection signal="focus_exited" from="." to="." method="OnUnfocused"]
|
||||
|
|
|
|||
|
|
@ -134,9 +134,9 @@ metadata/_edit_lock_ = true
|
|||
|
||||
[node name="GameButtons" type="VBoxContainer" parent="Buttons"]
|
||||
layout_mode = 0
|
||||
offset_left = 501.0
|
||||
offset_left = 504.0
|
||||
offset_top = 177.0
|
||||
offset_right = 593.0
|
||||
offset_right = 596.0
|
||||
offset_bottom = 275.0
|
||||
|
||||
[node name="PlayButton" type="Button" parent="Buttons/GameButtons"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue