Skip to content

Commit 06026fd

Browse files
committed
Replace enemy with Storyvore
For this one I couldn't use the sprite sheets from Threadbare directly, because I had to remove the shadow under the feet. And so we only have one colour. That's OK, we only had one colour before, too. To preserve the ability to use the old enemy, duplicate the scene, adjust the sprite in the duplicate, and change the main scene to use the duplicate. The same script can be used by both scenes. This also allows adjusting the position of the AnimatedSprite2D down a few pixels to make the feet line up better with the ground.
1 parent 57bbf6c commit 06026fd

File tree

4 files changed

+133
-1
lines changed

4 files changed

+133
-1
lines changed

assets/storyvore_move_green.png

8.23 KB
Loading
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="CompressedTexture2D"
5+
uid="uid://dye0f3r8n3yci"
6+
path="res://.godot/imported/storyvore_move_green.png-090b586b2f81ee444141d8112cfd4a11.ctex"
7+
metadata={
8+
"vram_texture": false
9+
}
10+
11+
[deps]
12+
13+
source_file="res://assets/storyvore_move_green.png"
14+
dest_files=["res://.godot/imported/storyvore_move_green.png-090b586b2f81ee444141d8112cfd4a11.ctex"]
15+
16+
[params]
17+
18+
compress/mode=0
19+
compress/high_quality=false
20+
compress/lossy_quality=0.7
21+
compress/hdr_compression=1
22+
compress/normal_map=0
23+
compress/channel_pack=0
24+
mipmaps/generate=false
25+
mipmaps/limit=-1
26+
roughness/mode=0
27+
roughness/src_normal=""
28+
process/fix_alpha_border=true
29+
process/premult_alpha=false
30+
process/normal_map_invert_y=false
31+
process/hdr_as_srgb=false
32+
process/hdr_clamp_exposure=false
33+
process/size_limit=0
34+
detect_3d/compress_to=1
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
[gd_scene load_steps=12 format=3 uid="uid://dbaal2g7b8ub0"]
2+
3+
[ext_resource type="Script" uid="uid://d003tgo4vrak8" path="res://components/enemy/enemy.gd" id="1_6mw0c"]
4+
[ext_resource type="Texture2D" uid="uid://dye0f3r8n3yci" path="res://assets/storyvore_move_green.png" id="2_riih7"]
5+
6+
[sub_resource type="AtlasTexture" id="AtlasTexture_mdji8"]
7+
atlas = ExtResource("2_riih7")
8+
region = Rect2(0, 0, 128, 128)
9+
10+
[sub_resource type="AtlasTexture" id="AtlasTexture_xlq87"]
11+
atlas = ExtResource("2_riih7")
12+
region = Rect2(128, 0, 128, 128)
13+
14+
[sub_resource type="AtlasTexture" id="AtlasTexture_5eic1"]
15+
atlas = ExtResource("2_riih7")
16+
region = Rect2(256, 0, 128, 128)
17+
18+
[sub_resource type="AtlasTexture" id="AtlasTexture_43fgs"]
19+
atlas = ExtResource("2_riih7")
20+
region = Rect2(384, 0, 128, 128)
21+
22+
[sub_resource type="AtlasTexture" id="AtlasTexture_k83e4"]
23+
atlas = ExtResource("2_riih7")
24+
region = Rect2(512, 0, 128, 128)
25+
26+
[sub_resource type="AtlasTexture" id="AtlasTexture_3igal"]
27+
atlas = ExtResource("2_riih7")
28+
region = Rect2(640, 0, 128, 128)
29+
30+
[sub_resource type="SpriteFrames" id="SpriteFrames_xxtfg"]
31+
animations = [{
32+
"frames": [{
33+
"duration": 1.0,
34+
"texture": SubResource("AtlasTexture_mdji8")
35+
}, {
36+
"duration": 1.0,
37+
"texture": SubResource("AtlasTexture_xlq87")
38+
}, {
39+
"duration": 1.0,
40+
"texture": SubResource("AtlasTexture_5eic1")
41+
}, {
42+
"duration": 1.0,
43+
"texture": SubResource("AtlasTexture_43fgs")
44+
}, {
45+
"duration": 1.0,
46+
"texture": SubResource("AtlasTexture_k83e4")
47+
}, {
48+
"duration": 1.0,
49+
"texture": SubResource("AtlasTexture_3igal")
50+
}],
51+
"loop": true,
52+
"name": &"walk",
53+
"speed": 10.0
54+
}]
55+
56+
[sub_resource type="RectangleShape2D" id="RectangleShape2D_kii40"]
57+
size = Vector2(48, 78)
58+
59+
[sub_resource type="RectangleShape2D" id="RectangleShape2D_cepcq"]
60+
size = Vector2(82, 83)
61+
62+
[node name="StoryvoreEnemy" type="CharacterBody2D"]
63+
collision_layer = 8
64+
collision_mask = 4
65+
floor_constant_speed = true
66+
floor_snap_length = 32.0
67+
script = ExtResource("1_6mw0c")
68+
69+
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
70+
unique_name_in_owner = true
71+
position = Vector2(0, -59)
72+
sprite_frames = SubResource("SpriteFrames_xxtfg")
73+
animation = &"walk"
74+
autoplay = "walk"
75+
frame_progress = 0.106469
76+
77+
[node name="LeftRay" type="RayCast2D" parent="."]
78+
unique_name_in_owner = true
79+
position = Vector2(-37, -3)
80+
collision_mask = 5
81+
82+
[node name="RightRay" type="RayCast2D" parent="."]
83+
unique_name_in_owner = true
84+
position = Vector2(37, -3)
85+
collision_mask = 5
86+
87+
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
88+
position = Vector2(0, -39)
89+
shape = SubResource("RectangleShape2D_kii40")
90+
91+
[node name="Hitbox" type="Area2D" parent="."]
92+
position = Vector2(0, -106)
93+
94+
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
95+
position = Vector2(0, 58.5)
96+
shape = SubResource("RectangleShape2D_cepcq")
97+
98+
[connection signal="body_entered" from="Hitbox" to="." method="_on_hitbox_body_entered"]

main.tscn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
[ext_resource type="PackedScene" uid="uid://daf24t18h3n5e" path="res://components/coin/coin.tscn" id="5_u7hr5"]
1010
[ext_resource type="Texture2D" uid="uid://84t7yee808cn" path="res://assets/items/button.png" id="6_kpi5m"]
1111
[ext_resource type="PackedScene" uid="uid://jt80gv02u4f2" path="res://hud.tscn" id="6_mp7wy"]
12-
[ext_resource type="PackedScene" uid="uid://dk0xon0k7ga23" path="res://components/enemy/enemy.tscn" id="9_l6smt"]
12+
[ext_resource type="PackedScene" uid="uid://dbaal2g7b8ub0" path="res://components/enemy/storyvore_enemy.tscn" id="9_l6smt"]
1313
[ext_resource type="SpriteFrames" uid="uid://c2wpvtw1stuyq" path="res://components/player/spriteframes-inkdrinker-red.tres" id="9_qmofe"]
1414
[ext_resource type="PackedScene" uid="uid://beuisy5yrw0bq" path="res://components/flag/flag.tscn" id="12_dkbog"]
1515
[ext_resource type="Script" uid="uid://boqbxvbja884q" path="res://scripts/multiplayer_camera.gd" id="13_0d2mj"]

0 commit comments

Comments
 (0)