Added new win splashes
This commit is contained in:
parent
38c7724992
commit
c0d1377615
10 changed files with 206 additions and 13 deletions
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=9 format=2]
|
[gd_scene load_steps=10 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://Objects/Player-tank/player.tscn" type="PackedScene" id=1]
|
[ext_resource path="res://Objects/Player-tank/player.tscn" type="PackedScene" id=1]
|
||||||
[ext_resource path="res://Objects/Ai-tank/tank00.tscn" type="PackedScene" id=2]
|
[ext_resource path="res://Objects/Ai-tank/tank00.tscn" type="PackedScene" id=2]
|
||||||
|
@ -12,6 +12,9 @@
|
||||||
size = 60
|
size = 60
|
||||||
font_data = ExtResource( 4 )
|
font_data = ExtResource( 4 )
|
||||||
|
|
||||||
|
[sub_resource type="Environment" id=2]
|
||||||
|
ambient_light_color = Color( 1, 1, 1, 1 )
|
||||||
|
|
||||||
[node name="Spatial" type="Spatial"]
|
[node name="Spatial" type="Spatial"]
|
||||||
|
|
||||||
[node name="PlayerTank" parent="." instance=ExtResource( 1 )]
|
[node name="PlayerTank" parent="." instance=ExtResource( 1 )]
|
||||||
|
@ -69,3 +72,6 @@ text = "0"
|
||||||
stream = ExtResource( 6 )
|
stream = ExtResource( 6 )
|
||||||
autoplay = true
|
autoplay = true
|
||||||
script = ExtResource( 7 )
|
script = ExtResource( 7 )
|
||||||
|
|
||||||
|
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||||
|
environment = SubResource( 2 )
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=9 format=2]
|
[gd_scene load_steps=10 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://Objects/Player-tank/player.tscn" type="PackedScene" id=1]
|
[ext_resource path="res://Objects/Player-tank/player.tscn" type="PackedScene" id=1]
|
||||||
[ext_resource path="res://Objects/Ai-tank/tank00.tscn" type="PackedScene" id=2]
|
[ext_resource path="res://Objects/Ai-tank/tank00.tscn" type="PackedScene" id=2]
|
||||||
|
@ -12,6 +12,9 @@
|
||||||
size = 60
|
size = 60
|
||||||
font_data = ExtResource( 4 )
|
font_data = ExtResource( 4 )
|
||||||
|
|
||||||
|
[sub_resource type="Environment" id=2]
|
||||||
|
ambient_light_color = Color( 1, 1, 1, 1 )
|
||||||
|
|
||||||
[node name="Spatial" type="Spatial"]
|
[node name="Spatial" type="Spatial"]
|
||||||
|
|
||||||
[node name="PlayerTank" parent="." instance=ExtResource( 1 )]
|
[node name="PlayerTank" parent="." instance=ExtResource( 1 )]
|
||||||
|
@ -69,3 +72,6 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 195.363, 1.1, 124.16 )
|
||||||
|
|
||||||
[node name="AITank09" parent="." instance=ExtResource( 2 )]
|
[node name="AITank09" parent="." instance=ExtResource( 2 )]
|
||||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 100.246, 1.1, 128.309 )
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 100.246, 1.1, 128.309 )
|
||||||
|
|
||||||
|
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||||
|
environment = SubResource( 2 )
|
||||||
|
|
|
@ -28,6 +28,9 @@ font_data = ExtResource( 2 )
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
[node name="MenuScreen" type="Sprite" parent="."]
|
[node name="MenuScreen" type="Sprite" parent="."]
|
||||||
position = Vector2( 960, 540 )
|
position = Vector2( 960, 540 )
|
||||||
|
|
|
@ -8,7 +8,8 @@ extends Control
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready():
|
func _ready():
|
||||||
pass # Replace with function body.
|
Global.tankskilled = 0
|
||||||
|
Global.firstlevelcompleted = 0
|
||||||
|
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
|
|
11
Levels/Win-02.gd
Normal file
11
Levels/Win-02.gd
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
extends Control
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
func _on_Button_pressed():
|
||||||
|
get_tree().quit()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_ButtonMainMenu_pressed():
|
||||||
|
get_tree().change_scene("res://Levels/Main.tscn")
|
105
Levels/Win-02.tscn
Normal file
105
Levels/Win-02.tscn
Normal file
|
@ -0,0 +1,105 @@
|
||||||
|
[gd_scene load_steps=6 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://fonts/Born2bSportyV2.ttf" type="DynamicFontData" id=1]
|
||||||
|
[ext_resource path="res://Levels/Win-02.gd" type="Script" id=2]
|
||||||
|
|
||||||
|
[sub_resource type="DynamicFont" id=1]
|
||||||
|
size = 80
|
||||||
|
font_data = ExtResource( 1 )
|
||||||
|
|
||||||
|
[sub_resource type="DynamicFont" id=2]
|
||||||
|
size = 100
|
||||||
|
font_data = ExtResource( 1 )
|
||||||
|
|
||||||
|
[sub_resource type="DynamicFont" id=3]
|
||||||
|
size = 100
|
||||||
|
font_data = ExtResource( 1 )
|
||||||
|
|
||||||
|
[node name="Win-level02" type="Control"]
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
script = ExtResource( 2 )
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
margin_left = -802.5
|
||||||
|
margin_top = -166.0
|
||||||
|
margin_right = 802.5
|
||||||
|
margin_bottom = 166.0
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="VBoxContainer"]
|
||||||
|
margin_right = 1605.0
|
||||||
|
margin_bottom = 80.0
|
||||||
|
custom_fonts/font = SubResource( 1 )
|
||||||
|
text = "Attention soldier. Your journey is at an end"
|
||||||
|
align = 1
|
||||||
|
|
||||||
|
[node name="Label2" type="Label" parent="VBoxContainer"]
|
||||||
|
margin_top = 84.0
|
||||||
|
margin_right = 1605.0
|
||||||
|
margin_bottom = 164.0
|
||||||
|
custom_fonts/font = SubResource( 1 )
|
||||||
|
text = "Hope you enjoyed playing!"
|
||||||
|
align = 1
|
||||||
|
|
||||||
|
[node name="VBoxContainer2" type="VBoxContainer" parent="."]
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 1.0
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
margin_left = -170.0
|
||||||
|
margin_top = -129.0
|
||||||
|
margin_right = 170.0
|
||||||
|
margin_bottom = -49.0
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="VBoxContainer2"]
|
||||||
|
margin_right = 340.0
|
||||||
|
margin_bottom = 80.0
|
||||||
|
custom_fonts/font = SubResource( 1 )
|
||||||
|
text = "Great work"
|
||||||
|
align = 1
|
||||||
|
|
||||||
|
[node name="VBoxContainer3" type="VBoxContainer" parent="."]
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 1.0
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
margin_left = -86.0
|
||||||
|
margin_top = -353.0
|
||||||
|
margin_right = 86.0
|
||||||
|
margin_bottom = -247.0
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Button" type="Button" parent="VBoxContainer3"]
|
||||||
|
margin_right = 172.0
|
||||||
|
margin_bottom = 106.0
|
||||||
|
custom_fonts/font = SubResource( 2 )
|
||||||
|
text = "Quit"
|
||||||
|
|
||||||
|
[node name="VBoxContainer4" type="VBoxContainer" parent="."]
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
margin_left = -197.0
|
||||||
|
margin_top = 140.0
|
||||||
|
margin_right = 197.0
|
||||||
|
margin_bottom = 246.0
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="ButtonMainMenu" type="Button" parent="VBoxContainer4"]
|
||||||
|
margin_right = 394.0
|
||||||
|
margin_bottom = 106.0
|
||||||
|
custom_fonts/font = SubResource( 3 )
|
||||||
|
text = "Main Menu"
|
||||||
|
|
||||||
|
[connection signal="pressed" from="VBoxContainer3/Button" to="." method="_on_Button_pressed"]
|
||||||
|
[connection signal="pressed" from="VBoxContainer4/ButtonMainMenu" to="." method="_on_ButtonMainMenu_pressed"]
|
6
Levels/win-01.gd
Normal file
6
Levels/win-01.gd
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
extends Control
|
||||||
|
|
||||||
|
|
||||||
|
func _physics_process(delta):
|
||||||
|
if Input.is_action_pressed("ui_accept"):
|
||||||
|
get_tree().change_scene("res://Levels/Level02.tscn")
|
53
Levels/win-01.tscn
Normal file
53
Levels/win-01.tscn
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
[gd_scene load_steps=4 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://fonts/Born2bSportyV2.ttf" type="DynamicFontData" id=1]
|
||||||
|
[ext_resource path="res://Levels/win-01.gd" type="Script" id=2]
|
||||||
|
|
||||||
|
[sub_resource type="DynamicFont" id=1]
|
||||||
|
size = 80
|
||||||
|
font_data = ExtResource( 1 )
|
||||||
|
|
||||||
|
[node name="Win-level01" type="Control"]
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
script = ExtResource( 2 )
|
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
margin_left = -802.5
|
||||||
|
margin_top = -166.0
|
||||||
|
margin_right = 802.5
|
||||||
|
margin_bottom = 166.0
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="VBoxContainer"]
|
||||||
|
margin_right = 1605.0
|
||||||
|
margin_bottom = 80.0
|
||||||
|
custom_fonts/font = SubResource( 1 )
|
||||||
|
text = "You won level 1! You might think you are skillful now..."
|
||||||
|
|
||||||
|
[node name="Label2" type="Label" parent="VBoxContainer"]
|
||||||
|
margin_top = 84.0
|
||||||
|
margin_right = 1605.0
|
||||||
|
margin_bottom = 164.0
|
||||||
|
custom_fonts/font = SubResource( 1 )
|
||||||
|
text = "You still have a long road ahead."
|
||||||
|
align = 1
|
||||||
|
|
||||||
|
[node name="Label3" type="Label" parent="VBoxContainer"]
|
||||||
|
margin_top = 168.0
|
||||||
|
margin_right = 1605.0
|
||||||
|
margin_bottom = 248.0
|
||||||
|
custom_fonts/font = SubResource( 1 )
|
||||||
|
text = "Get excited for your next challenge young one."
|
||||||
|
align = 1
|
||||||
|
|
||||||
|
[node name="Label4" type="Label" parent="VBoxContainer"]
|
||||||
|
margin_top = 252.0
|
||||||
|
margin_right = 1605.0
|
||||||
|
margin_bottom = 332.0
|
||||||
|
custom_fonts/font = SubResource( 1 )
|
||||||
|
text = "Press enter to see what's in store for your future!"
|
||||||
|
align = 1
|
|
@ -7,6 +7,10 @@ export var g = Vector3.DOWN * 20
|
||||||
|
|
||||||
var velocity = Vector3.ZERO
|
var velocity = Vector3.ZERO
|
||||||
|
|
||||||
|
###### CHEATS
|
||||||
|
var godmode = 1
|
||||||
|
|
||||||
|
|
||||||
func _physics_process(delta):
|
func _physics_process(delta):
|
||||||
# velocity += g * delta # Uncomment this for bullet gravity
|
# velocity += g * delta # Uncomment this for bullet gravity
|
||||||
look_at(transform.origin + velocity.normalized(), Vector3.UP)
|
look_at(transform.origin + velocity.normalized(), Vector3.UP)
|
||||||
|
@ -16,11 +20,12 @@ func _physics_process(delta):
|
||||||
if get_overlapping_bodies().has(get_parent().get_node("PlayerTank")):
|
if get_overlapping_bodies().has(get_parent().get_node("PlayerTank")):
|
||||||
print ("Found Player Tank")
|
print ("Found Player Tank")
|
||||||
self.queue_free()
|
self.queue_free()
|
||||||
body.queue_free()
|
if (godmode == 0):
|
||||||
Global.playerdead = 1
|
body.queue_free()
|
||||||
Global.tankskilled = 0
|
Global.playerdead = 1
|
||||||
Global.beforedeathscene = get_tree().current_scene.filename
|
Global.tankskilled = 0
|
||||||
get_tree().change_scene("res://Levels/Dead.tscn")
|
Global.beforedeathscene = get_tree().current_scene.filename
|
||||||
|
get_tree().change_scene("res://Levels/Dead.tscn")
|
||||||
else:
|
else:
|
||||||
if get_overlapping_bodies():
|
if get_overlapping_bodies():
|
||||||
if body.has_node("TankAI"):
|
if body.has_node("TankAI"):
|
||||||
|
@ -29,10 +34,10 @@ func _physics_process(delta):
|
||||||
if (Global.tankskilled == 10):
|
if (Global.tankskilled == 10):
|
||||||
if (Global.firstlevelcompleted == 0):
|
if (Global.firstlevelcompleted == 0):
|
||||||
Global.firstlevelcompleted = 1
|
Global.firstlevelcompleted = 1
|
||||||
get_tree().change_scene("res://Levels/Level02.tscn")
|
get_tree().change_scene("res://Levels/win-01.tscn")
|
||||||
else:
|
else:
|
||||||
if (Global.firstlevelcompleted == 1):
|
if (Global.firstlevelcompleted == 1):
|
||||||
print ("REPLACE ME WITH WIN SCREEN!!!!!") #### REPLACE ME!!!! URGENT
|
get_tree().change_scene("res://Levels/Win-02.tscn")
|
||||||
Global.tankskilled = 0
|
Global.tankskilled = 0
|
||||||
self.queue_free()
|
self.queue_free()
|
||||||
body.queue_free()
|
body.queue_free()
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:1e3c8c6e1a3362413a4d2d807b765a6cc249b1482762d797a2c518ea844c1d38
|
|
||||||
size 135503644
|
|
Loading…
Reference in a new issue