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
04cccd85
Commit
04cccd85
authored
Jun 23, 2026
by
Gavin An
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
해상도 관련 조정
parent
05e0991d
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
185 additions
and
119 deletions
+185
-119
project.godot
project.godot
+7
-2
src/autoload/game_manager.gd
src/autoload/game_manager.gd
+2
-0
src/ui/hud.gd
src/ui/hud.gd
+9
-117
src/ui/summoner_selection/summoner_selection.gd
src/ui/summoner_selection/summoner_selection.gd
+54
-0
src/ui/summoner_selection/summoner_selection.gd.uid
src/ui/summoner_selection/summoner_selection.gd.uid
+1
-0
src/ui/summoner_selection/summoner_selection.tscn
src/ui/summoner_selection/summoner_selection.tscn
+112
-0
No files found.
project.godot
View file @
04cccd85
...
@@ -11,7 +11,7 @@ config_version=5
...
@@ -11,7 +11,7 @@ config_version=5
[application]
[application]
config/name="ldefense"
config/name="ldefense"
run/main_scene="
uid://bj2p5iv0c10v6
"
run/main_scene="
res://src/ui/summoner_selection/summoner_selection.tscn
"
config/features=PackedStringArray("4.6", "GL Compatibility")
config/features=PackedStringArray("4.6", "GL Compatibility")
config/icon="res://icon.svg"
config/icon="res://icon.svg"
...
@@ -22,7 +22,12 @@ DataManager="*res://src/autoload/data_manager.gd"
...
@@ -22,7 +22,12 @@ DataManager="*res://src/autoload/data_manager.gd"
[display]
[display]
window/size/mode=2
window/size/viewport_width=1280
window/size/viewport_height=720
window/size/mode=3
window/stretch/mode="canvas_items"
window/stretch/aspect="expand"
window/handheld/orientation=1
[physics]
[physics]
...
...
src/autoload/game_manager.gd
View file @
04cccd85
...
@@ -11,6 +11,8 @@ signal game_victory
...
@@ -11,6 +11,8 @@ signal game_victory
const
INIT_GOLD
:
int
=
30000
const
INIT_GOLD
:
int
=
30000
var
selected_summoner_data
:
SummonerData
=
null
# 글로벌 플레이어 상태 변수 (정적 타이핑 적용)
# 글로벌 플레이어 상태 변수 (정적 타이핑 적용)
var
player_gold
:
int
=
INIT_GOLD
:
var
player_gold
:
int
=
INIT_GOLD
:
set
(
value
):
set
(
value
):
...
...
src/ui/hud.gd
View file @
04cccd85
...
@@ -45,8 +45,14 @@ func _ready() -> void:
...
@@ -45,8 +45,14 @@ func _ready() -> void:
_summoner
.
name
=
"ActiveSummoner"
_summoner
.
name
=
"ActiveSummoner"
add_child
(
_summoner
)
add_child
(
_summoner
)
# 소환사 선택 오버레이 화면 띄우기
# 선택된 소환사 데이터가 존재하는지 검증 (디버그 모드 대안 포함)
_show_summoner_selection_screen
()
if
not
GameManager
.
selected_summoner_data
:
print
(
"HUD: No summoner selected in GameManager. Redirecting to selection screen."
)
get_tree
()
.
change_scene_to_file
(
"res://src/ui/summoner_selection/summoner_selection.tscn"
)
return
# 소환사 데이터 초기 셋업 가동
_on_summoner_selected
(
GameManager
.
selected_summoner_data
)
# 몬스터 생성 일시 정지, 게임 재시작 및 모든 유닛 삭제 버튼 런타임 생성
# 몬스터 생성 일시 정지, 게임 재시작 및 모든 유닛 삭제 버튼 런타임 생성
var
bottom_bar
:
Control
=
get_node_or_null
(
"BottomBar"
)
as
Control
var
bottom_bar
:
Control
=
get_node_or_null
(
"BottomBar"
)
as
Control
...
@@ -162,121 +168,7 @@ func _on_pause_spawning_pressed() -> void:
...
@@ -162,121 +168,7 @@ func _on_pause_spawning_pressed() -> void:
else
:
else
:
_pause_button
.
text
=
"Pause Spawning"
_pause_button
.
text
=
"Pause Spawning"
## 런타임에 소환사 선택 패널을 오버레이로 생성하여 현시
func
_show_summoner_selection_screen
()
->
void
:
var
selection_overlay
:
ColorRect
=
ColorRect
.
new
()
selection_overlay
.
name
=
"SummonerSelectionOverlay"
selection_overlay
.
color
=
Color
(
0.08
,
0.08
,
0.12
,
0.95
)
# 어두운 판타지 테마의 반투명 배경
selection_overlay
.
set_anchors_and_offsets_preset
(
Control
.
PRESET_FULL_RECT
)
add_child
(
selection_overlay
)
var
vbox
:
VBoxContainer
=
VBoxContainer
.
new
()
vbox
.
name
=
"SelectionVBox"
vbox
.
add_theme_constant_override
(
"separation"
,
30
)
vbox
.
set_anchors_and_offsets_preset
(
Control
.
PRESET_CENTER
)
vbox
.
grow_horizontal
=
Control
.
GROW_DIRECTION_BOTH
vbox
.
grow_vertical
=
Control
.
GROW_DIRECTION_BOTH
selection_overlay
.
add_child
(
vbox
)
# 타이틀 라벨
var
title_lbl
:
Label
=
Label
.
new
()
title_lbl
.
name
=
"TitleLabel"
title_lbl
.
text
=
"SELECT YOUR SUMMONER"
title_lbl
.
horizontal_alignment
=
HORIZONTAL_ALIGNMENT_CENTER
title_lbl
.
add_theme_font_size_override
(
"font_size"
,
24
)
vbox
.
add_child
(
title_lbl
)
# 소환사 카드 그룹
var
hbox
:
HBoxContainer
=
HBoxContainer
.
new
()
hbox
.
name
=
"CardsHBox"
hbox
.
add_theme_constant_override
(
"separation"
,
40
)
vbox
.
add_child
(
hbox
)
# --- 1. Archmage (대마법사) 카드 ---
var
card_arch
:
VBoxContainer
=
VBoxContainer
.
new
()
card_arch
.
name
=
"ArchmageCard"
card_arch
.
add_theme_constant_override
(
"separation"
,
10
)
hbox
.
add_child
(
card_arch
)
var
port_arch
:
TextureRect
=
TextureRect
.
new
()
port_arch
.
custom_minimum_size
=
Vector2
(
150
,
150
)
port_arch
.
expand_mode
=
TextureRect
.
EXPAND_IGNORE_SIZE
port_arch
.
stretch_mode
=
TextureRect
.
STRETCH_KEEP_ASPECT_COVERED
var
arch_path
:
String
=
"res://assets/ui/summoner/portraits/mage_summoner.png"
if
ResourceLoader
.
exists
(
arch_path
):
port_arch
.
texture
=
load
(
arch_path
)
as
Texture2D
card_arch
.
add_child
(
port_arch
)
var
name_arch
:
Label
=
Label
.
new
()
name_arch
.
text
=
"Archmage"
name_arch
.
horizontal_alignment
=
HORIZONTAL_ALIGNMENT_CENTER
name_arch
.
add_theme_font_size_override
(
"font_size"
,
16
)
card_arch
.
add_child
(
name_arch
)
var
desc_arch
:
Label
=
Label
.
new
()
desc_arch
.
text
=
"Max Mana: 100
\n
Mana Regen: 3.0 / s
\n
Spells: Haste, Smite"
desc_arch
.
horizontal_alignment
=
HORIZONTAL_ALIGNMENT_CENTER
desc_arch
.
add_theme_font_size_override
(
"font_size"
,
11
)
card_arch
.
add_child
(
desc_arch
)
var
btn_arch
:
Button
=
Button
.
new
()
btn_arch
.
name
=
"SelectArchmage"
btn_arch
.
text
=
"Select Archmage"
btn_arch
.
custom_minimum_size
=
Vector2
(
120
,
35
)
btn_arch
.
pressed
.
connect
(
func
()
->
void
:
var
data
:
SummonerData
=
SummonerData
.
new
()
data
.
summoner_name
=
"Archmage"
data
.
max_mana
=
100.0
data
.
mana_regen
=
3.0
if
ResourceLoader
.
exists
(
arch_path
):
data
.
portrait_texture
=
load
(
arch_path
)
as
Texture2D
selection_overlay
.
queue_free
()
_on_summoner_selected
(
data
)
)
card_arch
.
add_child
(
btn_arch
)
# --- 2. Warlock (흑마법사) 카드 ---
var
card_war
:
VBoxContainer
=
VBoxContainer
.
new
()
card_war
.
name
=
"WarlockCard"
card_war
.
add_theme_constant_override
(
"separation"
,
10
)
hbox
.
add_child
(
card_war
)
var
port_war
:
TextureRect
=
TextureRect
.
new
()
port_war
.
custom_minimum_size
=
Vector2
(
150
,
150
)
port_war
.
expand_mode
=
TextureRect
.
EXPAND_IGNORE_SIZE
port_war
.
stretch_mode
=
TextureRect
.
STRETCH_KEEP_ASPECT_COVERED
var
war_path
:
String
=
"res://assets/ui/summoner/portraits/warrior_summoner.png"
if
ResourceLoader
.
exists
(
war_path
):
port_war
.
texture
=
load
(
war_path
)
as
Texture2D
card_war
.
add_child
(
port_war
)
var
name_war
:
Label
=
Label
.
new
()
name_war
.
text
=
"Warlock"
name_war
.
horizontal_alignment
=
HORIZONTAL_ALIGNMENT_CENTER
name_war
.
add_theme_font_size_override
(
"font_size"
,
16
)
card_war
.
add_child
(
name_war
)
var
desc_war
:
Label
=
Label
.
new
()
desc_war
.
text
=
"Max Mana: 130
\n
Mana Regen: 1.8 / s
\n
Spells: Haste, Smite"
desc_war
.
horizontal_alignment
=
HORIZONTAL_ALIGNMENT_CENTER
desc_war
.
add_theme_font_size_override
(
"font_size"
,
11
)
card_war
.
add_child
(
desc_war
)
var
btn_war
:
Button
=
Button
.
new
()
btn_war
.
name
=
"SelectWarlock"
btn_war
.
text
=
"Select Warlock"
btn_war
.
custom_minimum_size
=
Vector2
(
120
,
35
)
btn_war
.
pressed
.
connect
(
func
()
->
void
:
var
data
:
SummonerData
=
SummonerData
.
new
()
data
.
summoner_name
=
"Warlock"
data
.
max_mana
=
130.0
data
.
mana_regen
=
1.8
if
ResourceLoader
.
exists
(
war_path
):
data
.
portrait_texture
=
load
(
war_path
)
as
Texture2D
selection_overlay
.
queue_free
()
_on_summoner_selected
(
data
)
)
card_war
.
add_child
(
btn_war
)
## 소환사 선택 완료 후 UI 구성 및 스테이지 타이머 시작
## 소환사 선택 완료 후 UI 구성 및 스테이지 타이머 시작
func
_on_summoner_selected
(
data
:
SummonerData
)
->
void
:
func
_on_summoner_selected
(
data
:
SummonerData
)
->
void
:
...
...
src/ui/summoner_selection/summoner_selection.gd
0 → 100644
View file @
04cccd85
extends
Control
## 소환사 선택 페이지 스크립트 (SummonerSelection)
## 게임 시작 시 사용자가 소환사를 선택하도록 하는 독립된 씬 페이지입니다.
@
onready
var
btn_archmage
:
Button
=
$
VBoxContainer
/
CardsHBox
/
ArchmageCard
/
SelectArchmage
@
onready
var
btn_warlock
:
Button
=
$
VBoxContainer
/
CardsHBox
/
WarlockCard
/
SelectWarlock
@
onready
var
port_archmage
:
TextureRect
=
$
VBoxContainer
/
CardsHBox
/
ArchmageCard
/
Portrait
@
onready
var
port_warlock
:
TextureRect
=
$
VBoxContainer
/
CardsHBox
/
WarlockCard
/
Portrait
func
_ready
()
->
void
:
btn_archmage
.
pressed
.
connect
(
_on_select_archmage_pressed
)
btn_warlock
.
pressed
.
connect
(
_on_select_warlock_pressed
)
# 초상화 텍스처 동적 로딩 (에셋 미비 대비)
var
arch_path
:
String
=
"res://assets/ui/summoner/portraits/mage_summoner.png"
if
ResourceLoader
.
exists
(
arch_path
)
and
port_archmage
:
port_archmage
.
texture
=
load
(
arch_path
)
as
Texture2D
var
war_path
:
String
=
"res://assets/ui/summoner/portraits/warrior_summoner.png"
if
ResourceLoader
.
exists
(
war_path
)
and
port_warlock
:
port_warlock
.
texture
=
load
(
war_path
)
as
Texture2D
func
_on_select_archmage_pressed
()
->
void
:
var
data
:
=
SummonerData
.
new
()
data
.
summoner_name
=
"Archmage"
data
.
max_mana
=
100.0
data
.
mana_regen
=
3.0
var
arch_path
:
String
=
"res://assets/ui/summoner/portraits/mage_summoner.png"
if
ResourceLoader
.
exists
(
arch_path
):
data
.
portrait_texture
=
load
(
arch_path
)
as
Texture2D
GameManager
.
selected_summoner_data
=
data
_transition_to_main_game
()
func
_on_select_warlock_pressed
()
->
void
:
var
data
:
=
SummonerData
.
new
()
data
.
summoner_name
=
"Warlock"
data
.
max_mana
=
130.0
data
.
mana_regen
=
1.8
var
war_path
:
String
=
"res://assets/ui/summoner/portraits/warrior_summoner.png"
if
ResourceLoader
.
exists
(
war_path
):
data
.
portrait_texture
=
load
(
war_path
)
as
Texture2D
GameManager
.
selected_summoner_data
=
data
_transition_to_main_game
()
func
_transition_to_main_game
()
->
void
:
print
(
"SummonerSelection: Selected summoner: "
,
GameManager
.
selected_summoner_data
.
summoner_name
)
# 페이지 이동: 메인 게임 씬으로 씬 변경
var
err
=
get_tree
()
.
change_scene_to_file
(
"res://src/core/main.tscn"
)
if
err
!=
OK
:
print
(
"SummonerSelection: Failed to transition to main.tscn: "
,
err
)
src/ui/summoner_selection/summoner_selection.gd.uid
0 → 100644
View file @
04cccd85
uid://ba46bogwflurj
src/ui/summoner_selection/summoner_selection.tscn
0 → 100644
View file @
04cccd85
[gd_scene format=3 uid="uid://cb5p5iv0c10v8"]
[ext_resource type="Script" uid="uid://ba46bogwflurj" path="res://src/ui/summoner_selection/summoner_selection.gd" id="1_script"]
[node name="SummonerSelection" type="Control" unique_id=835175429]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_script")
[node name="Background" type="ColorRect" parent="." unique_id=1977246875]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0.08, 0.08, 0.12, 0.95)
[node name="VBoxContainer" type="VBoxContainer" parent="." unique_id=895958766]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -300.0
offset_top = -250.0
offset_right = 300.0
offset_bottom = 250.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/separation = 40
alignment = 1
[node name="TitleLabel" type="Label" parent="VBoxContainer" unique_id=82659522]
layout_mode = 2
theme_override_font_sizes/font_size = 36
text = "SELECT YOUR SUMMONER"
horizontal_alignment = 1
[node name="CardsHBox" type="HBoxContainer" parent="VBoxContainer" unique_id=1695533332]
layout_mode = 2
theme_override_constants/separation = 80
alignment = 1
[node name="ArchmageCard" type="VBoxContainer" parent="VBoxContainer/CardsHBox" unique_id=838762373]
custom_minimum_size = Vector2(260, 0)
layout_mode = 2
theme_override_constants/separation = 15
alignment = 1
[node name="Portrait" type="TextureRect" parent="VBoxContainer/CardsHBox/ArchmageCard" unique_id=947627767]
custom_minimum_size = Vector2(240, 240)
layout_mode = 2
expand_mode = 1
stretch_mode = 6
[node name="Name" type="Label" parent="VBoxContainer/CardsHBox/ArchmageCard" unique_id=594177406]
layout_mode = 2
theme_override_font_sizes/font_size = 24
text = "Mage"
horizontal_alignment = 1
[node name="Description" type="Label" parent="VBoxContainer/CardsHBox/ArchmageCard" unique_id=409919037]
layout_mode = 2
theme_override_font_sizes/font_size = 14
text = "Max Mana: 100
Mana Regen: 3.0 / s
Spells: Haste, Smite"
horizontal_alignment = 1
[node name="SelectArchmage" type="Button" parent="VBoxContainer/CardsHBox/ArchmageCard" unique_id=1450594011]
custom_minimum_size = Vector2(180, 45)
layout_mode = 2
theme_override_font_sizes/font_size = 16
text = "Select Archmage"
[node name="WarlockCard" type="VBoxContainer" parent="VBoxContainer/CardsHBox" unique_id=1025813844]
custom_minimum_size = Vector2(260, 0)
layout_mode = 2
theme_override_constants/separation = 15
alignment = 1
[node name="Portrait" type="TextureRect" parent="VBoxContainer/CardsHBox/WarlockCard" unique_id=1881168350]
custom_minimum_size = Vector2(240, 240)
layout_mode = 2
expand_mode = 1
stretch_mode = 6
[node name="Name" type="Label" parent="VBoxContainer/CardsHBox/WarlockCard" unique_id=1845912094]
layout_mode = 2
theme_override_font_sizes/font_size = 24
text = "Warrior"
horizontal_alignment = 1
[node name="Description" type="Label" parent="VBoxContainer/CardsHBox/WarlockCard" unique_id=1584843641]
layout_mode = 2
theme_override_font_sizes/font_size = 14
text = "Max Mana: 130
Mana Regen: 1.8 / s
Spells: Haste, Smite"
horizontal_alignment = 1
[node name="SelectWarlock" type="Button" parent="VBoxContainer/CardsHBox/WarlockCard" unique_id=1403911531]
custom_minimum_size = Vector2(180, 45)
layout_mode = 2
theme_override_font_sizes/font_size = 16
text = "Select Warlock"
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