Made a "damage indicator" shader; started working on having it toggle
when hit by enemy bullet.
This commit is contained in:
parent
7ea6f72e72
commit
0791653610
4 changed files with 32 additions and 2 deletions
11
player.tscn
11
player.tscn
|
|
@ -1,12 +1,17 @@
|
|||
[gd_scene load_steps=15 format=3 uid="uid://pyuorpwb7lpe"]
|
||||
[gd_scene load_steps=17 format=3 uid="uid://pyuorpwb7lpe"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dcrnf4r6c5qaw" path="res://player.gd" id="1_sweqy"]
|
||||
[ext_resource type="PackedScene" uid="uid://bwxxdrdvo3le0" path="res://bullet.tscn" id="2_1jxqw"]
|
||||
[ext_resource type="Texture2D" uid="uid://di2xhcwcdbhxg" path="res://Mini Pixel Pack 3/Player ship/Player_ship (16 x 16).png" id="2_2hs0m"]
|
||||
[ext_resource type="Texture2D" uid="uid://ces8fm7lxh574" path="res://Mini Pixel Pack 3/Player ship/Boosters (16 x 16).png" id="3_1jxqw"]
|
||||
[ext_resource type="Shader" uid="uid://dfywtah53il1m" path="res://player_hit.gdshader" id="3_dw050"]
|
||||
[ext_resource type="Texture2D" uid="uid://bjdhq42ummgky" path="res://Mini Pixel Pack 3/Player ship/Boosters_left (16 x 16).png" id="4_dw050"]
|
||||
[ext_resource type="Texture2D" uid="uid://cjv3xbuj65pav" path="res://Mini Pixel Pack 3/Player ship/Boosters_right (16 x 16).png" id="5_b26j0"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_b26j0"]
|
||||
shader = ExtResource("3_dw050")
|
||||
shader_parameter/toggle = 0.0
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_n7ghd"]
|
||||
atlas = ExtResource("3_1jxqw")
|
||||
region = Rect2(0, 0, 16, 16)
|
||||
|
|
@ -74,7 +79,9 @@ size = Vector2(14, 14)
|
|||
script = ExtResource("1_sweqy")
|
||||
bullet_scene = ExtResource("2_1jxqw")
|
||||
|
||||
[node name="Ship" type="Sprite2D" parent="."]
|
||||
[node name="Ship" type="Sprite2D" parent="." groups=["ship"]]
|
||||
unique_name_in_owner = true
|
||||
material = SubResource("ShaderMaterial_b26j0")
|
||||
texture = ExtResource("2_2hs0m")
|
||||
hframes = 3
|
||||
frame = 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue