shovel fully done
This commit is contained in:
parent
797fbfb4fe
commit
2639322dbf
12 changed files with 107 additions and 14 deletions
|
|
@ -1,10 +1,19 @@
|
|||
[gd_scene load_steps=12 format=3 uid="uid://bq7imkpr2yqyr"]
|
||||
[gd_scene load_steps=14 format=3 uid="uid://bq7imkpr2yqyr"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_fluxn"]
|
||||
[ext_resource type="Shader" uid="uid://cgc7spjkhsx7c" path="res://assets/shaders/generic_flash.gdshader" id="2_bi7an"]
|
||||
[ext_resource type="Texture2D" uid="uid://dstqh1wc5dvmo" path="res://assets/sprites/atlases/plants/wallnut.png" id="2_o5tda"]
|
||||
[ext_resource type="AnimationLibrary" uid="uid://0bdesb8j2mbo" path="res://assets/animations/plants/wallnut.res" id="3_xl65q"]
|
||||
[ext_resource type="Script" uid="uid://btkmd86pn828y" path="res://scripts/entities/plants/behaviours/HpBasedBehaviour.cs" id="4_cjtyy"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_ladjs"]
|
||||
resource_local_to_scene = true
|
||||
shader = ExtResource("2_bi7an")
|
||||
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/selected = false
|
||||
shader_parameter/blend = 0.0
|
||||
|
||||
[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_y3tlf"]
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_ds5ry"]
|
||||
|
|
@ -42,10 +51,10 @@ internal_id = "wallnut"
|
|||
MaxHP = 600.0
|
||||
|
||||
[node name="Sprite2D" parent="." index="0"]
|
||||
material = SubResource("ShaderMaterial_ladjs")
|
||||
texture = ExtResource("2_o5tda")
|
||||
hframes = 12
|
||||
vframes = 3
|
||||
frame = 10
|
||||
|
||||
[node name="AnimationPlayer" parent="." index="1"]
|
||||
libraries = {
|
||||
|
|
@ -65,4 +74,7 @@ shape = SubResource("RectangleShape2D_khltr")
|
|||
script = ExtResource("4_cjtyy")
|
||||
parameters = Array[String](["parameters/Tree/blend_position"])
|
||||
|
||||
[node name="FlashController" parent="." index="5"]
|
||||
shaderMaterial = SubResource("ShaderMaterial_ladjs")
|
||||
|
||||
[connection signal="OnHPChanged" from="." to="Behaviour" method="OnHPChanged"]
|
||||
|
|
|
|||
|
|
@ -1,14 +1,16 @@
|
|||
[gd_scene load_steps=6 format=3 uid="uid://t0vpmycj6c8j"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://cw73vihkrfenc" path="res://assets/sprites/gui/Shovel.tres" id="1_46afk"]
|
||||
[ext_resource type="Shader" uid="uid://c5kv2gwtme1dk" path="res://assets/shaders/radial_progress.gdshader" id="1_jj4sa"]
|
||||
[ext_resource type="Texture2D" uid="uid://b0jta6xgl7mvc" path="res://assets/sprites/gui/shovel_button.png" id="2_jj4sa"]
|
||||
[ext_resource type="Texture2D" uid="uid://fd6drk2su0df" path="res://assets/sprites/gui/EmptyShovel.tres" id="2_pw2pj"]
|
||||
[ext_resource type="Script" uid="uid://d4dbg0us5ngxy" path="res://scripts/gui/ShovelButton.cs" id="3_u6gir"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_grw26"]
|
||||
shader = ExtResource("1_jj4sa")
|
||||
shader_parameter/region_rect = Vector4(46, 174, 51, 47)
|
||||
shader_parameter/progress = 1.0
|
||||
|
||||
[node name="ShovelButton" type="TextureButton" node_paths=PackedStringArray("raycast")]
|
||||
[node name="ShovelButton" type="TextureButton" node_paths=PackedStringArray("raycast", "timer")]
|
||||
material = SubResource("ShaderMaterial_grw26")
|
||||
anchors_preset = -1
|
||||
anchor_right = 0.085
|
||||
|
|
@ -19,11 +21,12 @@ size_flags_horizontal = 4
|
|||
size_flags_vertical = 0
|
||||
mouse_default_cursor_shape = 2
|
||||
toggle_mode = true
|
||||
texture_normal = ExtResource("1_46afk")
|
||||
texture_normal = ExtResource("2_jj4sa")
|
||||
texture_pressed = ExtResource("2_pw2pj")
|
||||
stretch_mode = 0
|
||||
stretch_mode = 5
|
||||
script = ExtResource("3_u6gir")
|
||||
raycast = NodePath("RayCast2D")
|
||||
timer = NodePath("Timer")
|
||||
|
||||
[node name="RayCast2D" type="RayCast2D" parent="."]
|
||||
exclude_parent = false
|
||||
|
|
@ -32,3 +35,7 @@ collision_mask = 24
|
|||
hit_from_inside = true
|
||||
collide_with_areas = true
|
||||
collide_with_bodies = false
|
||||
|
||||
[node name="Timer" type="Timer" parent="."]
|
||||
wait_time = 90.0
|
||||
one_shot = true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue