game over
This commit is contained in:
parent
176634ab28
commit
9ceb77e2f9
11 changed files with 388 additions and 23 deletions
19
backgounds/gameover.gd
Normal file
19
backgounds/gameover.gd
Normal file
|
@ -0,0 +1,19 @@
|
|||
extends Node2D
|
||||
var sfx1 := AudioStreamPlayer.new()
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
add_child(sfx1)
|
||||
sfx1.mix_target = 1
|
||||
sfx1.bus = &"SFX1"
|
||||
sfx1.stream = load(Global.sfxtracks[0])
|
||||
sfx1.play(0)
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
pass
|
||||
|
||||
func _input(event):
|
||||
if Input.is_action_just_pressed("ui_accept"):
|
||||
get_tree().change_scene_to_file("res://title.tscn")
|
14
backgounds/gameover.tscn
Normal file
14
backgounds/gameover.tscn
Normal file
|
@ -0,0 +1,14 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://i46ouafr1o3t"]
|
||||
|
||||
[ext_resource type="Script" path="res://backgounds/gameover.gd" id="1_5r0kb"]
|
||||
|
||||
[node name="Gameover" type="Node2D"]
|
||||
script = ExtResource("1_5r0kb")
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
offset_left = 178.0
|
||||
offset_top = 214.0
|
||||
offset_right = 1046.0
|
||||
offset_bottom = 433.0
|
||||
theme_override_font_sizes/font_size = 160
|
||||
text = "Game Over"
|
12
backgounds/warp.gd
Normal file
12
backgounds/warp.gd
Normal file
|
@ -0,0 +1,12 @@
|
|||
extends Node2D
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
pass
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
Global.live = 1
|
||||
get_tree().change_scene_to_file("res://levels/ui/gameplay.tscn")
|
6
backgounds/warp.tscn
Normal file
6
backgounds/warp.tscn
Normal file
|
@ -0,0 +1,6 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://kuybckcxwmre"]
|
||||
|
||||
[ext_resource type="Script" path="res://backgounds/warp.gd" id="1_3ss1u"]
|
||||
|
||||
[node name="Warp" type="Node2D"]
|
||||
script = ExtResource("1_3ss1u")
|
|
@ -1,8 +1,13 @@
|
|||
extends Node2D
|
||||
var hkr
|
||||
var troublemaker
|
||||
var travel = null
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
hkr = $Railwaygirl
|
||||
troublemaker = $Pamela
|
||||
if !Global.debug:
|
||||
_statrebase()
|
||||
Global.live = 1
|
||||
|
@ -13,8 +18,32 @@ func _ready():
|
|||
func _process(delta):
|
||||
pass
|
||||
|
||||
func _input(event):
|
||||
if Input.is_action_just_pressed("ui_accept") && travel != null:
|
||||
if Global.debug:
|
||||
Global.dplace = travel
|
||||
else:
|
||||
Global.cplace = travel
|
||||
Global.live = 5
|
||||
|
||||
func _statrebase():
|
||||
for i in 4:
|
||||
if Global.party[i][0] != null:
|
||||
for j in 7:
|
||||
Global.cstats[Global.party[i][0]][j] = Global.basestats[Global.party[i][0]][j] * Global.level[Global.dparty[i][0]]
|
||||
|
||||
|
||||
func _on_railwaygirl_body_entered(body: Node2D) -> void:
|
||||
travel = [1, 8, 11]
|
||||
|
||||
|
||||
func _on_railwaygirl_body_exited(body: Node2D) -> void:
|
||||
travel = null
|
||||
|
||||
|
||||
func _on_pamela_body_entered(body: Node2D) -> void:
|
||||
travel = [1, 1, 17]
|
||||
|
||||
|
||||
func _on_pamela_body_exited(body: Node2D) -> void:
|
||||
travel = null
|
||||
|
|
|
@ -1,46 +1,245 @@
|
|||
[gd_scene load_steps=6 format=3 uid="uid://bomoy5hvs8ldt"]
|
||||
[gd_scene load_steps=18 format=3 uid="uid://bomoy5hvs8ldt"]
|
||||
|
||||
[ext_resource type="Script" path="res://levels/Ceres/map.gd" id="1_fb2vd"]
|
||||
[ext_resource type="Texture2D" uid="uid://kxvipok4tnuw" path="res://backgounds/wip.jpg" id="2_jxya4"]
|
||||
[ext_resource type="Texture2D" uid="uid://c1jjhut8fuf1w" path="res://sprites/ceres/railway/sprite.png" id="3_cek1k"]
|
||||
[ext_resource type="PackedScene" uid="uid://cehe6sm8ly06u" path="res://sprites/common/player/player.tscn" id="3_q2e1y"]
|
||||
[ext_resource type="Texture2D" uid="uid://dt8ufdvgghipy" path="res://sprites/ceres/pamela/sprite.png" id="4_1nkxu"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_nytv7"]
|
||||
size = Vector2(20, 761)
|
||||
size = Vector2(20, 1385.25)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_wkumn"]
|
||||
size = Vector2(1283, 20)
|
||||
size = Vector2(2248, 20)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_tmcf2"]
|
||||
size = Vector2(86, 256)
|
||||
|
||||
[sub_resource type="Animation" id="Animation_i5rhc"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite2D:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [0]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_8my4d"]
|
||||
resource_name = "eidle"
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite2D:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [6]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_op07l"]
|
||||
resource_name = "ewalk"
|
||||
length = 0.3
|
||||
loop_mode = 1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite2D:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1, 0.2),
|
||||
"transitions": PackedFloat32Array(1, 1, 1),
|
||||
"update": 1,
|
||||
"values": [7, 6, 8]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_cajcr"]
|
||||
resource_name = "nidle"
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite2D:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0.2),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [3]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_7lhgw"]
|
||||
resource_name = "nwalk"
|
||||
length = 0.3
|
||||
loop_mode = 1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite2D:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1, 0.2),
|
||||
"transitions": PackedFloat32Array(1, 1, 1),
|
||||
"update": 1,
|
||||
"values": [4, 3, 5]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_w3ius"]
|
||||
resource_name = "sidle"
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite2D:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [0]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_u56r5"]
|
||||
resource_name = "swalk"
|
||||
length = 0.3
|
||||
loop_mode = 1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite2D:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1, 0.2),
|
||||
"transitions": PackedFloat32Array(1, 1, 1),
|
||||
"update": 1,
|
||||
"values": [1, 0, 2]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_isodq"]
|
||||
resource_name = "widle"
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite2D:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0.2),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [9]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_letwb"]
|
||||
resource_name = "wwalk"
|
||||
length = 0.3
|
||||
loop_mode = 1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite2D:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1, 0.2),
|
||||
"transitions": PackedFloat32Array(1, 1, 1),
|
||||
"update": 1,
|
||||
"values": [10, 9, 11]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_mh65y"]
|
||||
_data = {
|
||||
"RESET": SubResource("Animation_i5rhc"),
|
||||
"eidle": SubResource("Animation_8my4d"),
|
||||
"ewalk": SubResource("Animation_op07l"),
|
||||
"nidle": SubResource("Animation_cajcr"),
|
||||
"nwalk": SubResource("Animation_7lhgw"),
|
||||
"sidle": SubResource("Animation_w3ius"),
|
||||
"swalk": SubResource("Animation_u56r5"),
|
||||
"widle": SubResource("Animation_isodq"),
|
||||
"wwalk": SubResource("Animation_letwb")
|
||||
}
|
||||
|
||||
[node name="Map" type="Node2D"]
|
||||
script = ExtResource("1_fb2vd")
|
||||
|
||||
[node name="WIP" type="TextureRect" parent="."]
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
texture = ExtResource("2_jxya4")
|
||||
[node name="ColorRect" type="ColorRect" parent="."]
|
||||
offset_left = -939.0
|
||||
offset_top = -613.0
|
||||
offset_right = 1282.0
|
||||
offset_bottom = 715.0
|
||||
color = Color(0.209938, 0.552296, 0.377152, 1)
|
||||
|
||||
[node name="StaticBody2D" type="StaticBody2D" parent="."]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
|
||||
position = Vector2(-11, 361.5)
|
||||
position = Vector2(-958, 54.625)
|
||||
shape = SubResource("RectangleShape2D_nytv7")
|
||||
|
||||
[node name="StaticBody2D2" type="StaticBody2D" parent="."]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D2"]
|
||||
position = Vector2(1293, 358)
|
||||
position = Vector2(1293, 49.25)
|
||||
shape = SubResource("RectangleShape2D_nytv7")
|
||||
|
||||
[node name="StaticBody2D3" type="StaticBody2D" parent="."]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D3"]
|
||||
position = Vector2(641.5, -9)
|
||||
position = Vector2(176, -629)
|
||||
shape = SubResource("RectangleShape2D_wkumn")
|
||||
|
||||
[node name="StaticBody2D4" type="StaticBody2D" parent="."]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D4"]
|
||||
position = Vector2(644, 731)
|
||||
position = Vector2(189.125, 731)
|
||||
shape = SubResource("RectangleShape2D_wkumn")
|
||||
|
||||
[node name="Railwaygirl" type="Area2D" parent="."]
|
||||
position = Vector2(615, -444)
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="Railwaygirl"]
|
||||
texture = ExtResource("3_cek1k")
|
||||
hframes = 3
|
||||
vframes = 4
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Railwaygirl"]
|
||||
shape = SubResource("RectangleShape2D_tmcf2")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="Railwaygirl"]
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_mh65y")
|
||||
}
|
||||
|
||||
[node name="Pamela" type="Area2D" parent="."]
|
||||
position = Vector2(-651, 133)
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="Pamela"]
|
||||
texture = ExtResource("4_1nkxu")
|
||||
hframes = 3
|
||||
vframes = 4
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Pamela"]
|
||||
shape = SubResource("RectangleShape2D_tmcf2")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="Pamela"]
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_mh65y")
|
||||
}
|
||||
|
||||
[node name="Player" parent="." instance=ExtResource("3_q2e1y")]
|
||||
position = Vector2(633, 590)
|
||||
|
||||
[connection signal="body_entered" from="Railwaygirl" to="." method="_on_railwaygirl_body_entered"]
|
||||
[connection signal="body_exited" from="Railwaygirl" to="." method="_on_railwaygirl_body_exited"]
|
||||
[connection signal="body_entered" from="Pamela" to="." method="_on_pamela_body_entered"]
|
||||
[connection signal="body_exited" from="Pamela" to="." method="_on_pamela_body_exited"]
|
||||
|
|
|
@ -54,7 +54,7 @@ func _ready():
|
|||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
var velocity = Vector2.ZERO
|
||||
if Global.live > 4 && Global.live < 9:
|
||||
if (Global.live > 4 && Global.live < 9) || Global.live == 2:
|
||||
_exit()
|
||||
#velocity = (Vector2.RIGHT.rotated(rotation) * -100 * Global.xm * delta)-Vector2.UP.rotated(rotation) * -100 * Global.ym * delta
|
||||
|
||||
|
@ -65,31 +65,31 @@ func _input(event):
|
|||
#Global.exitgame = true
|
||||
if Global.live == 1 && Input.is_action_pressed("schar") && Input.is_action_just_pressed("ui_up"):
|
||||
if Global.debug:
|
||||
if Global.dparty[0][0] != null:
|
||||
if Global.dparty[0][0] != null && Global.dstats[Global.dparty[0][0]][0] > 0:
|
||||
Global.dcpchar = 0
|
||||
else:
|
||||
if Global.party[0][0] != null:
|
||||
if Global.party[0][0] != null && Global.cstats[Global.party[0][0]][0] > 0:
|
||||
Global.cpchar = 0
|
||||
elif Global.live == 1 && Input.is_action_pressed("schar") && Input.is_action_just_pressed("ui_right"):
|
||||
if Global.debug:
|
||||
if Global.dparty[1][0] != null:
|
||||
if Global.dparty[1][0] != null && Global.dstats[Global.dparty[1][0]][0] > 0:
|
||||
Global.dcpchar = 1
|
||||
else:
|
||||
if Global.party[1][0] != null:
|
||||
if Global.party[1][0] != null && Global.cstats[Global.party[1][0]][0] > 0:
|
||||
Global.cpchar = 1
|
||||
elif Global.live == 1 && Input.is_action_pressed("schar") && Input.is_action_just_pressed("ui_down"):
|
||||
if Global.debug:
|
||||
if Global.dparty[2][0] != null:
|
||||
if Global.dparty[2][0] != null && Global.dstats[Global.dparty[2][0]][0] > 0:
|
||||
Global.dcpchar = 2
|
||||
else:
|
||||
if Global.party[2][0] != null:
|
||||
if Global.party[2][0] != null && Global.cstats[Global.party[2][0]][0] > 0:
|
||||
Global.cpchar = 2
|
||||
elif Global.live == 1 && Input.is_action_pressed("schar") && Input.is_action_just_pressed("ui_left"):
|
||||
if Global.debug:
|
||||
if Global.dparty[3][0] != null:
|
||||
if Global.dparty[3][0] != null && Global.dstats[Global.dparty[3][0]][0] > 0:
|
||||
Global.dcpchar = 3
|
||||
else:
|
||||
if Global.party[3][0] != null:
|
||||
if Global.party[3][0] != null && Global.cstats[Global.party[3][0]][0] > 0:
|
||||
Global.cpchar = 3
|
||||
if Global.bossready:
|
||||
Global.bossready = false
|
||||
|
@ -108,11 +108,13 @@ func _statrebase():
|
|||
if Global.dparty[i][0] != null:
|
||||
for j in 7:
|
||||
Global.mstats[Global.dparty[i][0]][j] = Global.basestats[Global.dparty[i][0]][j] * Global.dlevel[Global.dparty[i][0]]
|
||||
Global.cstats[Global.dparty[i][0]][j] = Global.basestats[Global.dparty[i][0]][j] * Global.dlevel[Global.dparty[i][0]]
|
||||
else:
|
||||
for i in 4:
|
||||
if Global.party[i][0] != null:
|
||||
for j in 7:
|
||||
Global.mstats[Global.party[i][0]][j] = Global.basestats[Global.party[i][0]][j] * Global.level[Global.dparty[i][0]]
|
||||
Global.mstats[Global.party[i][0]][j] = Global.basestats[Global.party[i][0]][j] * Global.level[Global.party[i][0]]
|
||||
Global.cstats[Global.party[i][0]][j] = Global.basestats[Global.party[i][0]][j] * Global.level[Global.party[i][0]]
|
||||
func _pausemenu():
|
||||
if Global.live == 1 && !ispaused:
|
||||
get_tree().root.remove_child(bhud)
|
||||
|
@ -139,9 +141,18 @@ func _exit():
|
|||
#get_tree().root.remove_child(player)
|
||||
get_tree().root.remove_child(level)
|
||||
if Global.live == 7:
|
||||
if !Global.debug:
|
||||
Global.cplace = [0, 0, 0]
|
||||
get_tree().change_scene_to_file("res://backgounds/result.tscn")
|
||||
elif Global.live == 8:
|
||||
get_tree().change_scene_to_file("res://levels/ui/Cutscenes.tscn")
|
||||
elif Global.live == 5:
|
||||
_statrebase()
|
||||
get_tree().change_scene_to_file("res://backgounds/warp.tscn")
|
||||
elif Global.live == 2:
|
||||
_statrebase()
|
||||
get_tree().root.remove_child(thud)
|
||||
get_tree().change_scene_to_file("res://backgounds/gameover.tscn")
|
||||
elif Global.live == 6:
|
||||
if Global.debug:
|
||||
Global.live = 0
|
||||
|
|
|
@ -3,9 +3,11 @@ var cff
|
|||
var cnf
|
||||
var chealthf
|
||||
var clevel
|
||||
var warpmenu
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
warpmenu = $CanvasLayer/HBoxContainer2/VBoxContainer/Warp
|
||||
cff = $CanvasLayer/HBoxContainer/TextureRect
|
||||
cnf = $CanvasLayer/HBoxContainer/VBoxContainer/Cname
|
||||
chealthf = $CanvasLayer/HBoxContainer/VBoxContainer/HBoxContainer/Label2
|
||||
|
@ -23,6 +25,16 @@ func _input(event):
|
|||
_fetchdata()
|
||||
|
||||
func _fetchdata():
|
||||
if Global.debug:
|
||||
if Global.dplace != [1, 11, 19] && (Global.dplace[0] == 1 || Global.dplace[0] == 2):
|
||||
warpmenu.visible = true
|
||||
else:
|
||||
warpmenu.visible = false
|
||||
else:
|
||||
if Global.cplace != [1, 11, 19] && (Global.cplace[0] == 1 || Global.dplace[0] == 2):
|
||||
warpmenu.visible = true
|
||||
else:
|
||||
warpmenu.visible = false
|
||||
if Global.debug:
|
||||
cnf.set_text(Global.pcnames[Global.dparty[Global.dcpchar][0]])
|
||||
cff.texture = load(Global.hudfaces[Global.dparty[Global.dcpchar][0]][Global.dparty[Global.dcpchar][1]])
|
||||
|
@ -38,3 +50,11 @@ func _fetchdata():
|
|||
func _on_exit_pressed():
|
||||
Global.live = 6
|
||||
#pass # Replace with function body.
|
||||
|
||||
|
||||
func _on_warp_pressed() -> void:
|
||||
if Global.debug:
|
||||
Global.dplace = [0, 0, 0]
|
||||
else:
|
||||
Global.cplace = [0, 0, 0]
|
||||
Global.live = 5
|
||||
|
|
|
@ -141,4 +141,5 @@ theme_override_font_sizes/font_size = 32
|
|||
theme_override_styles/focus = SubResource("StyleBoxFlat_yb7nc")
|
||||
text = "MENU_EXIT"
|
||||
|
||||
[connection signal="pressed" from="CanvasLayer/HBoxContainer2/VBoxContainer/Warp" to="." method="_on_warp_pressed"]
|
||||
[connection signal="pressed" from="CanvasLayer/HBoxContainer2/VBoxContainer2/Exit" to="." method="_on_exit_pressed"]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://coaup7cuj7qev"]
|
||||
[gd_scene load_steps=12 format=3 uid="uid://coaup7cuj7qev"]
|
||||
|
||||
[ext_resource type="Script" path="res://levels/ui/tophud.gd" id="1_pntuv"]
|
||||
|
||||
|
@ -14,6 +14,21 @@ bg_color = Color(1, 0.498039, 0, 1)
|
|||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ftyws"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_pwjrs"]
|
||||
bg_color = Color(0, 0, 1, 1)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_124wc"]
|
||||
bg_color = Color(0, 0, 1, 1)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_o8qre"]
|
||||
bg_color = Color(0, 0, 1, 1)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_2pkui"]
|
||||
bg_color = Color(0, 0, 1, 1)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ig4lq"]
|
||||
bg_color = Color(0, 0, 1, 1)
|
||||
|
||||
[node name="Tophud" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
|
@ -147,6 +162,7 @@ text = "OC Skill"
|
|||
custom_minimum_size = Vector2(100, 0)
|
||||
layout_mode = 2
|
||||
theme_override_styles/background = SubResource("StyleBoxFlat_ftyws")
|
||||
theme_override_styles/fill = SubResource("StyleBoxFlat_pwjrs")
|
||||
|
||||
[node name="Label2" type="Label" parent="CanvasLayer/Topmini/VBoxContainer/HBoxContainer4"]
|
||||
custom_minimum_size = Vector2(123, 0)
|
||||
|
@ -247,6 +263,7 @@ text = "OC Skill"
|
|||
custom_minimum_size = Vector2(100, 0)
|
||||
layout_mode = 2
|
||||
theme_override_styles/background = SubResource("StyleBoxFlat_ftyws")
|
||||
theme_override_styles/fill = SubResource("StyleBoxFlat_124wc")
|
||||
|
||||
[node name="Label2" type="Label" parent="CanvasLayer/Topleft/Character1/VBoxContainer/HBoxContainer4"]
|
||||
custom_minimum_size = Vector2(123, 0)
|
||||
|
@ -333,6 +350,7 @@ text = "OC Skill"
|
|||
custom_minimum_size = Vector2(100, 0)
|
||||
layout_mode = 2
|
||||
theme_override_styles/background = SubResource("StyleBoxFlat_ftyws")
|
||||
theme_override_styles/fill = SubResource("StyleBoxFlat_o8qre")
|
||||
|
||||
[node name="Label2" type="Label" parent="CanvasLayer/Topleft/Character2/VBoxContainer/HBoxContainer4"]
|
||||
custom_minimum_size = Vector2(123, 0)
|
||||
|
@ -419,6 +437,7 @@ text = "OC Skill"
|
|||
custom_minimum_size = Vector2(100, 0)
|
||||
layout_mode = 2
|
||||
theme_override_styles/background = SubResource("StyleBoxFlat_ftyws")
|
||||
theme_override_styles/fill = SubResource("StyleBoxFlat_2pkui")
|
||||
|
||||
[node name="Label2" type="Label" parent="CanvasLayer/Topleft/Character3/VBoxContainer/HBoxContainer4"]
|
||||
custom_minimum_size = Vector2(123, 0)
|
||||
|
@ -505,6 +524,7 @@ text = "OC Skill"
|
|||
custom_minimum_size = Vector2(100, 0)
|
||||
layout_mode = 2
|
||||
theme_override_styles/background = SubResource("StyleBoxFlat_ftyws")
|
||||
theme_override_styles/fill = SubResource("StyleBoxFlat_ig4lq")
|
||||
|
||||
[node name="Label2" type="Label" parent="CanvasLayer/Topleft/Character4/VBoxContainer/HBoxContainer4"]
|
||||
custom_minimum_size = Vector2(123, 0)
|
||||
|
|
|
@ -26,6 +26,40 @@ func _ready():
|
|||
_charinit()
|
||||
|
||||
func _physics_process(delta):
|
||||
if Global.debug:
|
||||
if Global.dplace != [1, 11, 19]:
|
||||
if Global.dstats[Global.dparty[Global.dcpchar][0]][0] <= 0 && Global.live == 1:
|
||||
if Global.dparty[0][0] != null && Global.dstats[Global.dparty[0][0]][0] > 0:
|
||||
Global.dcpchar = 0
|
||||
_charswitch()
|
||||
elif Global.dparty[1][0] != null && Global.dstats[Global.dparty[1][0]][0] > 0:
|
||||
Global.dcpchar = 1
|
||||
_charswitch()
|
||||
elif Global.dparty[2][0] != null && Global.dstats[Global.dparty[2][0]][0] > 0:
|
||||
Global.dcpchar = 2
|
||||
_charswitch()
|
||||
elif Global.dparty[3][0] != null && Global.dstats[Global.dparty[3][0]][0] > 0:
|
||||
Global.dcpchar = 3
|
||||
_charswitch()
|
||||
else:
|
||||
Global.live = 2
|
||||
else:
|
||||
if Global.cplace != [1, 11, 19]:
|
||||
if Global.cstats[Global.party[Global.cpchar][0]][0] <= 0 && Global.live == 1:
|
||||
if Global.party[0][0] != null && Global.cstats[Global.party[0][0]][0] > 0:
|
||||
Global.cpchar = 0
|
||||
_charswitch()
|
||||
elif Global.party[1][0] != null && Global.cstats[Global.party[1][0]][0] > 0:
|
||||
Global.cpchar = 1
|
||||
_charswitch()
|
||||
elif Global.party[2][0] != null && Global.cstats[Global.party[2][0]][0] > 0:
|
||||
Global.cpchar = 2
|
||||
_charswitch()
|
||||
elif Global.party[3][0] != null && Global.cstats[Global.party[3][0]][0] > 0:
|
||||
Global.cpchar = 3
|
||||
_charswitch()
|
||||
else:
|
||||
Global.live = 2
|
||||
# Add the gravity.
|
||||
#var velocity = Vector2.ZERO
|
||||
#if Global.live == 1 || (xm == 0 && ym == 0):
|
||||
|
|
Loading…
Reference in a new issue