Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
L
ldefense
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages
Packages
Container Registry
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Gavin An
ldefense
Commits
facbd426
Commit
facbd426
authored
Jun 23, 2026
by
Gavin An
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
좀비 몬스터 추가
parent
63afeb5e
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
867 additions
and
8 deletions
+867
-8
assets/models/monsters/zombie/zombie.fbx
assets/models/monsters/zombie/zombie.fbx
+0
-0
assets/models/monsters/zombie/zombie.fbx.import
assets/models/monsters/zombie/zombie.fbx.import
+44
-0
assets/models/monsters/zombie/zombie_0.png
assets/models/monsters/zombie/zombie_0.png
+0
-0
assets/models/monsters/zombie/zombie_0.png.import
assets/models/monsters/zombie/zombie_0.png.import
+44
-0
assets/models/monsters/zombie/zombie_animations.tres
assets/models/monsters/zombie/zombie_animations.tres
+724
-0
src/entities/monsters/base_monster.gd
src/entities/monsters/base_monster.gd
+22
-5
src/entities/monsters/zombie/zombie.tscn
src/entities/monsters/zombie/zombie.tscn
+10
-0
src/entities/monsters/zombie/zombie_unit.tscn
src/entities/monsters/zombie/zombie_unit.tscn
+20
-0
src/ui/hud.gd
src/ui/hud.gd
+3
-3
No files found.
assets/models/monsters/zombie/zombie.fbx
0 → 100644
View file @
facbd426
File added
assets/models/monsters/zombie/zombie.fbx.import
0 → 100644
View file @
facbd426
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://ccymf4oxw0n0o"
path="res://.godot/imported/zombie.fbx-68cefc3925265829f5d1e7f43c8476e1.scn"
[deps]
source_file="res://assets/models/monsters/zombie/zombie.fbx"
dest_files=["res://.godot/imported/zombie.fbx-68cefc3925265829f5d1e7f43c8476e1.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/root_script=null
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
nodes/use_name_suffixes=true
nodes/use_node_type_suffixes=true
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=true
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
materials/extract=0
materials/extract_format=0
materials/extract_path=""
_subresources={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
fbx/naming_version=2
assets/models/monsters/zombie/zombie_0.png
0 → 100644
View file @
facbd426
4.88 MB
assets/models/monsters/zombie/zombie_0.png.import
0 → 100644
View file @
facbd426
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://7l3pkmvxl4q8"
path.s3tc="res://.godot/imported/zombie_0.png-210634246bdb671c90ddb6d54fb7ca41.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
generator_parameters={
"md5": "46eea9448c6458bd031f97a2517cbac0"
}
[deps]
source_file="res://assets/models/monsters/zombie/zombie_0.png"
dest_files=["res://.godot/imported/zombie_0.png-210634246bdb671c90ddb6d54fb7ca41.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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=0
assets/models/monsters/zombie/zombie_animations.tres
0 → 100644
View file @
facbd426
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/entities/monsters/base_monster.gd
View file @
facbd426
...
@@ -22,7 +22,7 @@ func _ready() -> void:
...
@@ -22,7 +22,7 @@ func _ready() -> void:
loop
=
true
loop
=
true
# 자식 노드 중 3D 모델(noble_man 등) 노드 자동 탐색 및 초기화 (base_unit.gd 매커니즘 준수)
# 자식 노드 중 3D 모델(noble_man 등) 노드 자동 탐색 및 초기화 (base_unit.gd 매커니즘 준수)
var
model_names
:
Array
[
String
]
=
[
"noble_man"
]
var
model_names
:
Array
[
String
]
=
[
"noble_man"
,
"zombie"
]
var
detected_model_node
:
Node3D
=
null
var
detected_model_node
:
Node3D
=
null
var
detected_model_name
:
String
=
""
var
detected_model_name
:
String
=
""
...
@@ -36,14 +36,16 @@ func _ready() -> void:
...
@@ -36,14 +36,16 @@ func _ready() -> void:
if
detected_model_node
:
if
detected_model_node
:
_model_instance
=
detected_model_node
_model_instance
=
detected_model_node
#
GridMap 타일 높이(Y=0.21)에 맞춰 모델 및 충돌 판정 영역 오프셋 보정
#
GridMap 타일 높이(Y=0.21)에 맞춰 모델 및 충돌 판정 영역 오프셋 보정
_model_instance
.
position
.
y
=
0.21
#_model_instance.position.y = 0
var
monster_area
=
get_node_or_null
(
"MonsterArea"
)
var
monster_area
=
get_node_or_null
(
"MonsterArea"
)
if
monster_area
and
monster_area
is
Node3D
:
#
if monster_area and monster_area is Node3D:
monster_area
.
position
.
y
=
0.71
#
monster_area.position.y = 0.71
if
detected_model_name
==
"noble_man"
:
if
detected_model_name
==
"noble_man"
:
_apply_noble_man_skin
(
_model_instance
)
_apply_noble_man_skin
(
_model_instance
)
elif
detected_model_name
==
"zombie"
:
_apply_zombie_skin
(
_model_instance
)
_model_anim_player
=
_find_animation_player
(
_model_instance
)
_model_anim_player
=
_find_animation_player
(
_model_instance
)
if
_model_anim_player
:
if
_model_anim_player
:
...
@@ -82,6 +84,21 @@ func _apply_noble_man_skin(node: Node) -> void:
...
@@ -82,6 +84,21 @@ func _apply_noble_man_skin(node: Node) -> void:
for
child
:
Node
in
node
.
get_children
():
for
child
:
Node
in
node
.
get_children
():
_apply_noble_man_skin
(
child
)
_apply_noble_man_skin
(
child
)
## 몬스터 자식 메쉬에 zombie_0.png 텍스처를 입히는 재귀 함수
func
_apply_zombie_skin
(
node
:
Node
)
->
void
:
if
node
is
MeshInstance3D
:
var
mesh_inst
:
MeshInstance3D
=
node
as
MeshInstance3D
var
texture_path
:
String
=
"res://assets/models/monsters/zombie/zombie_0.png"
if
ResourceLoader
.
exists
(
texture_path
):
var
texture
:
Texture2D
=
load
(
texture_path
)
as
Texture2D
if
texture
:
var
mat
:
StandardMaterial3D
=
StandardMaterial3D
.
new
()
mat
.
albedo_texture
=
texture
mat
.
roughness
=
0.5
mesh_inst
.
material_override
=
mat
for
child
:
Node
in
node
.
get_children
():
_apply_zombie_skin
(
child
)
func
_physics_process
(
delta
:
float
)
->
void
:
func
_physics_process
(
delta
:
float
)
->
void
:
if
GameManager
.
is_game_over
or
is_dead
:
if
GameManager
.
is_game_over
or
is_dead
:
...
...
src/entities/monsters/zombie/zombie.tscn
0 → 100644
View file @
facbd426
[gd_scene format=3]
[ext_resource type="PackedScene" path="res://assets/models/monsters/zombie/zombie.fbx" id="1_fbx"]
[ext_resource type="AnimationLibrary" path="res://assets/models/monsters/zombie/zombie_animations.tres" id="2_anims"]
[node name="zombie" instance=ExtResource("1_fbx")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 0, 0, 0)
[node name="AnimationPlayer" parent="." index="1"]
libraries/ = ExtResource("2_anims")
src/entities/monsters/zombie/zombie_unit.tscn
0 → 100644
View file @
facbd426
[gd_scene format=3 uid="uid://dfsvswt2g4422"]
[ext_resource type="Script" uid="uid://bj0j32wc3fvkg" path="res://src/entities/monsters/base_monster.gd" id="1_base_monster"]
[ext_resource type="PackedScene" path="res://src/entities/monsters/zombie/zombie.tscn" id="2_zombie"]
[sub_resource type="SphereShape3D" id="SphereShape3D_collision"]
radius = 0.6
[node name="ZombieMonster" type="PathFollow3D" unique_id=2142757208]
script = ExtResource("1_base_monster")
[node name="zombie" parent="." unique_id=1315610678 instance=ExtResource("2_zombie")]
[node name="MonsterArea" type="Area3D" parent="." unique_id=1682849627]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
[node name="CollisionShape3D" type="CollisionShape3D" parent="MonsterArea" unique_id=964107164]
shape = SubResource("SphereShape3D_collision")
[editable path="zombie"]
src/ui/hud.gd
View file @
facbd426
...
@@ -115,7 +115,7 @@ func _on_spawn_pressed() -> void:
...
@@ -115,7 +115,7 @@ func _on_spawn_pressed() -> void:
# 맵 중앙 스폰 존(0, 0) 기준 분산 스폰 좌표 지정
# 맵 중앙 스폰 존(0, 0) 기준 분산 스폰 좌표 지정
var
spawn_offset
:
Vector3
=
Vector3
(
var
spawn_offset
:
Vector3
=
Vector3
(
randf_range
(
-
2.0
,
2.0
),
randf_range
(
-
2.0
,
2.0
),
2.5
,
1
,
randf_range
(
-
2.0
,
2.0
)
randf_range
(
-
2.0
,
2.0
)
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment