Reactor, and enemies attacking the tiles

This commit is contained in:
2025-08-31 14:30:18 +08:00
parent c72353716f
commit 09511b37c9
17 changed files with 517 additions and 222 deletions

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=4 format=3 uid="uid://b3ffcucytwmk"]
[gd_scene load_steps=5 format=3 uid="uid://b3ffcucytwmk"]
[ext_resource type="Texture2D" uid="uid://dlhpiyxtmp707" path="res://Scenes/Entities/Enemy.jpg" id="1_8q37v"]
[ext_resource type="Script" uid="uid://cvsmy820b8dwl" path="res://Scripts/Entities/Enemy.cs" id="1_jajit"]
@@ -6,6 +6,9 @@
[sub_resource type="RectangleShape2D" id="RectangleShape2D_jajit"]
size = Vector2(60, 74)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_wmvnc"]
size = Vector2(70, 84)
[node name="Enemy" type="CharacterBody2D"]
collision_layer = 2
collision_mask = 3
@@ -17,3 +20,8 @@ shape = SubResource("RectangleShape2D_jajit")
[node name="Sprite2D" type="Sprite2D" parent="."]
scale = Vector2(0.1, 0.1)
texture = ExtResource("1_8q37v")
[node name="AttackArea" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="AttackArea"]
shape = SubResource("RectangleShape2D_wmvnc")

View File

@@ -14,9 +14,8 @@ script = ExtResource("2_oss8w")
[node name="PlacementSystem" type="Node2D" parent="."]
script = ExtResource("2_sxhdm")
[node name="Player" parent="." node_paths=PackedStringArray("Inventory") instance=ExtResource("3_oss8w")]
[node name="Player" parent="." instance=ExtResource("3_oss8w")]
scale = Vector2(0.35, 0.35)
Inventory = NodePath("")
[node name="HUD" parent="." instance=ExtResource("8_hud_scene")]

Binary file not shown.

After

Width:  |  Height:  |  Size: 544 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://fg03qxqphp7n"
path="res://.godot/imported/ReactorTile.png-f6f5bfaa813b044011d6b0a5736b9bc6.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Scenes/Tiles/ReactorTile.png"
dest_files=["res://.godot/imported/ReactorTile.png-f6f5bfaa813b044011d6b0a5736b9bc6.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

View File

@@ -0,0 +1,26 @@
[gd_scene load_steps=4 format=3 uid="uid://w6ni678js7cu"]
[ext_resource type="Script" uid="uid://c4k3ottt7j3b1" path="res://Scripts/Tiles/ReactorTile.cs" id="1_yldg2"]
[ext_resource type="Texture2D" uid="uid://fg03qxqphp7n" path="res://Scenes/Tiles/ReactorTile.png" id="3_fk1vt"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_8o613"]
size = Vector2(54, 54)
[node name="ReactorTile" type="StaticBody2D"]
script = ExtResource("1_yldg2")
TileId = "reactor"
[node name="Sprite2D" type="Sprite2D" parent="."]
scale = Vector2(0.3, 0.3)
texture = ExtResource("3_fk1vt")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
scale = Vector2(3, 3)
shape = SubResource("RectangleShape2D_8o613")
[node name="ProgressOverlay" type="ColorRect" parent="."]
offset_left = -81.0
offset_top = -81.0
offset_right = -27.0
offset_bottom = -27.0
scale = Vector2(3, 3)