diff --git a/res/shaders/colorize.tres b/res/shaders/colorize.tres index dcdce01..f7d36b5 100644 --- a/res/shaders/colorize.tres +++ b/res/shaders/colorize.tres @@ -15,5 +15,5 @@ void fragment(){ [resource] shader = SubResource( 3 ) -shader_param/active = true -shader_param/color = Color( 1, 1, 1, 0 ) +shader_param/active = false +shader_param/color = Color( 1, 1, 1, 1 ) diff --git a/src/models/enemies/rat/Rat.gd b/src/models/enemies/rat/Rat.gd new file mode 100644 index 0000000..cf49cba --- /dev/null +++ b/src/models/enemies/rat/Rat.gd @@ -0,0 +1,2 @@ +extends KinematicBody2D + diff --git a/src/models/enemies/rat/Rat.tscn b/src/models/enemies/rat/Rat.tscn new file mode 100644 index 0000000..a359e3b --- /dev/null +++ b/src/models/enemies/rat/Rat.tscn @@ -0,0 +1,23 @@ +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://src/models/enemies/rat/sprites/rat_spriteframes.tres" type="SpriteFrames" id=1] +[ext_resource path="res://src/models/enemies/rat/Rat.gd" type="Script" id=2] + +[sub_resource type="RectangleShape2D" id=1] +extents = Vector2( 8, 3 ) + +[node name="Rat" type="KinematicBody2D" groups=["enemy"]] +script = ExtResource( 2 ) + +[node name="Sprite" type="AnimatedSprite" parent="."] +frames = ExtResource( 1 ) +animation = "idle" +frame = 2 +playing = true +centered = false + +[node name="Area2D" type="Area2D" parent="."] + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] +position = Vector2( 12, 6 ) +shape = SubResource( 1 ) diff --git a/src/models/enemies/rat/sprites/rat.png b/src/models/enemies/rat/sprites/rat.png new file mode 100644 index 0000000..93f6ff1 Binary files /dev/null and b/src/models/enemies/rat/sprites/rat.png differ diff --git a/src/models/enemies/rat/sprites/rat.png.import b/src/models/enemies/rat/sprites/rat.png.import new file mode 100644 index 0000000..ee7c2f4 --- /dev/null +++ b/src/models/enemies/rat/sprites/rat.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/rat.png-e73e7b6a730462f71668a742e225b538.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://src/models/enemies/rat/sprites/rat.png" +dest_files=[ "res://.import/rat.png-e73e7b6a730462f71668a742e225b538.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/src/models/enemies/rat/sprites/rat_spriteframes.tres b/src/models/enemies/rat/sprites/rat_spriteframes.tres new file mode 100644 index 0000000..7fedab7 --- /dev/null +++ b/src/models/enemies/rat/sprites/rat_spriteframes.tres @@ -0,0 +1,27 @@ +[gd_resource type="SpriteFrames" load_steps=6 format=2] + +[ext_resource path="res://src/models/enemies/rat/sprites/rat.png" type="Texture" id=1] + +[sub_resource type="AtlasTexture" id=1] +atlas = ExtResource( 1 ) +region = Rect2( 0, 0, 28, 11 ) + +[sub_resource type="AtlasTexture" id=2] +atlas = ExtResource( 1 ) +region = Rect2( 28, 0, 28, 11 ) + +[sub_resource type="AtlasTexture" id=3] +atlas = ExtResource( 1 ) +region = Rect2( 56, 0, 28, 11 ) + +[sub_resource type="AtlasTexture" id=4] +atlas = ExtResource( 1 ) +region = Rect2( 84, 0, 28, 11 ) + +[resource] +animations = [ { +"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ) ], +"loop": true, +"name": "idle", +"speed": 12.0 +} ]