marathon mode skeleton
This commit is contained in:
parent
6bd0a81f11
commit
22a53ee1a0
9 changed files with 147 additions and 13 deletions
14
menus/marathon_results.gd
Normal file
14
menus/marathon_results.gd
Normal file
|
@ -0,0 +1,14 @@
|
|||
extends Control
|
||||
|
||||
|
||||
onready var score: Label = $"%Score"
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
Fade.fade_in()
|
||||
score.text = score.text % Game.marathon_score
|
||||
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if Input.is_action_just_pressed("ui_accept"):
|
||||
Game.change_map(load("res://menus/marathon_start.tscn"))
|
52
menus/marathon_results.tscn
Normal file
52
menus/marathon_results.tscn
Normal file
|
@ -0,0 +1,52 @@
|
|||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://shaders/ska_plane.gdshader" type="Shader" id=1]
|
||||
[ext_resource path="res://ui/theme.tres" type="Theme" id=2]
|
||||
[ext_resource path="res://menus/marathon_results.gd" type="Script" id=3]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id=1]
|
||||
shader = ExtResource( 1 )
|
||||
shader_param/color_1 = Color( 1, 0.654902, 0.172549, 1 )
|
||||
shader_param/color_2 = Color( 0.309804, 0.984314, 0.937255, 1 )
|
||||
shader_param/checker_size = Vector2( 24, 24 )
|
||||
shader_param/pan_speed = Vector2( 8, 12 )
|
||||
shader_param/cycle_speed = Vector2( 4, 4 )
|
||||
shader_param/cycle_alternation = Vector2( 4, 4 )
|
||||
shader_param/uv_transform = Transform2D( 1, 0, 1, 1, 0, 0 )
|
||||
|
||||
[node name="MarathonResults" type="Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
theme = ExtResource( 2 )
|
||||
script = ExtResource( 3 )
|
||||
|
||||
[node name="Background" type="ColorRect" parent="."]
|
||||
material = SubResource( 1 )
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
|
||||
[node name="Panel" type="Panel" parent="."]
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
margin_left = -60.0
|
||||
margin_top = -30.0
|
||||
margin_right = 60.0
|
||||
margin_bottom = 30.0
|
||||
|
||||
[node name="Label" type="Label" parent="Panel"]
|
||||
anchor_right = 1.0
|
||||
margin_bottom = 22.0
|
||||
text = "Good Job!"
|
||||
align = 1
|
||||
valign = 1
|
||||
|
||||
[node name="Score" type="Label" parent="Panel"]
|
||||
unique_name_in_owner = true
|
||||
anchor_right = 1.0
|
||||
margin_top = 21.0
|
||||
margin_bottom = 43.0
|
||||
text = "Score: %05d"
|
||||
align = 1
|
||||
valign = 1
|
14
menus/marathon_start.gd
Normal file
14
menus/marathon_start.gd
Normal file
|
@ -0,0 +1,14 @@
|
|||
extends Control
|
||||
|
||||
|
||||
export var first_level: PackedScene
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
Fade.fade_in()
|
||||
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if Input.is_action_just_pressed("ui_accept"):
|
||||
Game.marathon_score = 0
|
||||
Game.change_map(first_level)
|
55
menus/marathon_start.tscn
Normal file
55
menus/marathon_start.tscn
Normal file
|
@ -0,0 +1,55 @@
|
|||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://shaders/ska_plane.gdshader" type="Shader" id=1]
|
||||
[ext_resource path="res://ui/theme.tres" type="Theme" id=2]
|
||||
[ext_resource path="res://menus/marathon_start.gd" type="Script" id=3]
|
||||
[ext_resource path="res://maps/hills_scholar.tscn" type="PackedScene" id=4]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id=1]
|
||||
shader = ExtResource( 1 )
|
||||
shader_param/color_1 = Color( 0.886275, 1, 0.498039, 1 )
|
||||
shader_param/color_2 = Color( 0.180392, 0.992157, 0.447059, 1 )
|
||||
shader_param/checker_size = Vector2( 24, 24 )
|
||||
shader_param/pan_speed = Vector2( 8, 12 )
|
||||
shader_param/cycle_speed = Vector2( 4, 4 )
|
||||
shader_param/cycle_alternation = Vector2( 4, 4 )
|
||||
shader_param/uv_transform = Transform2D( 1, 0, 1, 1, 0, 0 )
|
||||
|
||||
[node name="MarathonStart" type="Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
theme = ExtResource( 2 )
|
||||
script = ExtResource( 3 )
|
||||
first_level = ExtResource( 4 )
|
||||
|
||||
[node name="Background" type="ColorRect" parent="."]
|
||||
material = SubResource( 1 )
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
|
||||
[node name="Panel" type="Panel" parent="."]
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
margin_left = -60.0
|
||||
margin_top = -30.0
|
||||
margin_right = 60.0
|
||||
margin_bottom = 30.0
|
||||
|
||||
[node name="Label" type="Label" parent="Panel"]
|
||||
anchor_right = 1.0
|
||||
margin_bottom = 22.0
|
||||
text = "Press X to start"
|
||||
align = 1
|
||||
valign = 1
|
||||
|
||||
[node name="Label2" type="Label" parent="Panel"]
|
||||
anchor_right = 1.0
|
||||
margin_left = 1.0
|
||||
margin_top = 22.0
|
||||
margin_right = 1.0
|
||||
margin_bottom = 55.0
|
||||
text = "Todo: options"
|
||||
align = 1
|
||||
valign = 1
|
Loading…
Add table
Add a link
Reference in a new issue