mirror of
https://github.com/danbulant/programovani-kostky
synced 2026-06-18 22:01:19 +00:00
working menu screens
This commit is contained in:
parent
23e20c5774
commit
8174006463
17 changed files with 506 additions and 39 deletions
37
game/main.gd
37
game/main.gd
|
|
@ -7,6 +7,9 @@ extends Node3D
|
|||
@onready var camera_prethrow: Marker3D = $CameraPositionPrethrow
|
||||
@onready var camera_target: Marker3D = $CameraPositionTarget
|
||||
@onready var ui: Ui = $Ui
|
||||
@onready var gamescene_light = $GameSceneLight
|
||||
@onready var menu_scene = $MenuBg
|
||||
@onready var player_select = $PlayerSelect
|
||||
|
||||
const physics_timeout := 2.5
|
||||
|
||||
|
|
@ -17,7 +20,14 @@ enum GameState {
|
|||
THROWN
|
||||
}
|
||||
|
||||
enum MasterState {
|
||||
LOGO,
|
||||
PLAYER_SELECT,
|
||||
GAME
|
||||
}
|
||||
|
||||
var state: GameState = GameState.START
|
||||
var master_state: MasterState = MasterState.LOGO
|
||||
var camera_transition := 0.
|
||||
var camera_speed := 1.5
|
||||
var first_throw := true
|
||||
|
|
@ -27,6 +37,31 @@ func _ready() -> void:
|
|||
ui.connect("roll_pressed", throw_dice)
|
||||
add_child(physics_timer)
|
||||
physics_timer.connect("timeout", physics_timer_timeout)
|
||||
menu_scene.connect("start_game", switch_to_player_select)
|
||||
player_select.connect("start_game", switch_to_game)
|
||||
player_select.connect("back_to_menu", switch_to_menu)
|
||||
switch_to_menu()
|
||||
|
||||
func master_state_sync() -> void:
|
||||
ui.visible = MasterState.GAME == master_state
|
||||
gamescene_light.visible = MasterState.GAME == master_state
|
||||
menu_scene.visible = MasterState.LOGO == master_state
|
||||
menu_scene.ui_visible = MasterState.LOGO == master_state
|
||||
player_select.visible = MasterState.PLAYER_SELECT == master_state
|
||||
if master_state != MasterState.GAME:
|
||||
physics_timer_timeout()
|
||||
|
||||
func switch_to_player_select() -> void:
|
||||
master_state = MasterState.PLAYER_SELECT
|
||||
master_state_sync()
|
||||
|
||||
func switch_to_game() -> void:
|
||||
master_state = MasterState.GAME
|
||||
master_state_sync()
|
||||
|
||||
func switch_to_menu() -> void:
|
||||
master_state = MasterState.LOGO
|
||||
master_state_sync()
|
||||
|
||||
func physics_timer_timeout() -> void:
|
||||
dice1.sleeping = true
|
||||
|
|
@ -37,7 +72,7 @@ func _physics_process(delta: float) -> void:
|
|||
camera_transition += delta * camera_speed
|
||||
camera_transition = min(camera_transition, 1.)
|
||||
if state == GameState.THROWING_START or state == GameState.THROWING:
|
||||
camera.transform = ( camera_starting if first_throw else camera_target).transform.interpolate_with(camera_prethrow.transform, camera_transition)
|
||||
camera.transform = (camera_starting if first_throw else camera_target).transform.interpolate_with(camera_prethrow.transform, camera_transition)
|
||||
elif state == GameState.THROWN:
|
||||
camera.transform = camera_prethrow.transform.interpolate_with(camera_target.transform, camera_transition)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
[gd_scene load_steps=14 format=3 uid="uid://bxphc5t7er28i"]
|
||||
[gd_scene load_steps=16 format=3 uid="uid://bxphc5t7er28i"]
|
||||
|
||||
[ext_resource type="Script" path="res://game/main.gd" id="1_h1pkq"]
|
||||
[ext_resource type="ArrayMesh" uid="uid://6ygsl6phockr" path="res://game/dice.res" id="1_qesf4"]
|
||||
[ext_resource type="Script" path="res://game/dice.gd" id="2_jh75e"]
|
||||
[ext_resource type="PackedScene" uid="uid://c8jkqtbqtg7ub" path="res://game/ui.tscn" id="4_80via"]
|
||||
[ext_resource type="PackedScene" uid="uid://cmt0o37jd1gt6" path="res://menu/menu_bg.tscn" id="5_r5r22"]
|
||||
[ext_resource type="PackedScene" uid="uid://k2duc4ddir2m" path="res://player_select/player_select.tscn" id="6_xkr2b"]
|
||||
|
||||
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_kmncl"]
|
||||
bounce = 0.06
|
||||
|
|
@ -125,16 +127,25 @@ transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 1,
|
|||
|
||||
[node name="CameraPositionTarget" type="Marker3D" parent="."]
|
||||
|
||||
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
|
||||
[node name="DiceThrowStart" type="Marker3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.408271, 0.326392, 0)
|
||||
|
||||
[node name="GameSceneLight" type="DirectionalLight3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 0.751874, 0.659306, 0, -0.659306, 0.751874, 0, 1.52296, 0)
|
||||
visible = false
|
||||
shadow_enabled = true
|
||||
shadow_bias = 0.01
|
||||
directional_shadow_max_distance = 10.0
|
||||
|
||||
[node name="DiceThrowStart" type="Marker3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.408271, 0.326392, 0)
|
||||
|
||||
[node name="Ui" parent="." instance=ExtResource("4_80via")]
|
||||
visible = false
|
||||
|
||||
[node name="MenuBg" parent="." instance=ExtResource("5_r5r22")]
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 2.66249)
|
||||
visible = false
|
||||
|
||||
[node name="PlayerSelect" parent="." instance=ExtResource("6_xkr2b")]
|
||||
visible = false
|
||||
|
||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||
environment = SubResource("Environment_64y34")
|
||||
|
|
|
|||
BIN
icons/checkmark.png
Normal file
BIN
icons/checkmark.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
34
icons/checkmark.png.import
Normal file
34
icons/checkmark.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://d30xcuv18dp4l"
|
||||
path="res://.godot/imported/checkmark.png-5e0b02f8724a29b1673d307fc9b814c2.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://icons/checkmark.png"
|
||||
dest_files=["res://.godot/imported/checkmark.png-5e0b02f8724a29b1673d307fc9b814c2.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
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=1
|
||||
BIN
icons/exit.png
Normal file
BIN
icons/exit.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
34
icons/exit.png.import
Normal file
34
icons/exit.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dgwgb7g0gca8m"
|
||||
path="res://.godot/imported/exit.png-7270074d2b58b94c4110d834e0e34b96.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://icons/exit.png"
|
||||
dest_files=["res://.godot/imported/exit.png-7270074d2b58b94c4110d834e0e34b96.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
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=1
|
||||
BIN
icons/left.png
Normal file
BIN
icons/left.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
34
icons/left.png.import
Normal file
34
icons/left.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://i7j0hyou7dje"
|
||||
path="res://.godot/imported/left.png-e33a1f0e4c9cba723ce6343de7ff3d6f.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://icons/left.png"
|
||||
dest_files=["res://.godot/imported/left.png-e33a1f0e4c9cba723ce6343de7ff3d6f.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
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=1
|
||||
BIN
icons/singleplayer.png
Normal file
BIN
icons/singleplayer.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
34
icons/singleplayer.png.import
Normal file
34
icons/singleplayer.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c25g6oj4fnw0h"
|
||||
path="res://.godot/imported/singleplayer.png-3c245660b093bd5049e9f8c3e2039f85.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://icons/singleplayer.png"
|
||||
dest_files=["res://.godot/imported/singleplayer.png-3c245660b093bd5049e9f8c3e2039f85.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
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=1
|
||||
BIN
icons/up.png
Normal file
BIN
icons/up.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
34
icons/up.png.import
Normal file
34
icons/up.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c0yrwtgac654j"
|
||||
path="res://.godot/imported/up.png-3279e73ea2ddb08aee214bd27ed28a94.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://icons/up.png"
|
||||
dest_files=["res://.godot/imported/up.png-3279e73ea2ddb08aee214bd27ed28a94.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
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=1
|
||||
|
|
@ -1,6 +1,18 @@
|
|||
extends Node3D
|
||||
|
||||
var main_scene = preload("res://game/main.tscn")
|
||||
# var select_scene = preload("res://player_select/player_select.tscn")
|
||||
|
||||
@onready var menu_ui = $MenuUi
|
||||
|
||||
signal start_game
|
||||
@export var ui_visible := true :
|
||||
set(visible):
|
||||
ui_visible = visible
|
||||
menu_ui.visible = ui_visible
|
||||
|
||||
func _ready() -> void:
|
||||
menu_ui.visible = ui_visible
|
||||
|
||||
func _on_menu_ui_start_pressed() -> void:
|
||||
get_tree().change_scene_to_packed(main_scene)
|
||||
# get_tree().change_scene_to_packed(select_scene)
|
||||
start_game.emit()
|
||||
|
|
@ -1,29 +1,9 @@
|
|||
[gd_scene load_steps=10 format=3 uid="uid://cmt0o37jd1gt6"]
|
||||
[gd_scene load_steps=6 format=3 uid="uid://cmt0o37jd1gt6"]
|
||||
|
||||
[ext_resource type="ArrayMesh" uid="uid://6ygsl6phockr" path="res://game/dice.res" id="1_8u4bs"]
|
||||
[ext_resource type="Script" path="res://menu/menu_bg.gd" id="1_mvbgk"]
|
||||
[ext_resource type="PackedScene" uid="uid://dfarwiq8kvcxa" path="res://menu/menu_ui.tscn" id="2_5dpja"]
|
||||
|
||||
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_os646"]
|
||||
ground_bottom_color = Color(0.610915, 0.695046, 0.774521, 1)
|
||||
|
||||
[sub_resource type="Sky" id="Sky_cj84e"]
|
||||
sky_material = SubResource("ProceduralSkyMaterial_os646")
|
||||
|
||||
[sub_resource type="Environment" id="Environment_hqpr0"]
|
||||
background_mode = 2
|
||||
background_color = Color(1, 1, 1, 1)
|
||||
sky = SubResource("Sky_cj84e")
|
||||
ambient_light_source = 3
|
||||
reflected_light_source = 2
|
||||
tonemap_mode = 3
|
||||
ssao_enabled = true
|
||||
ssil_enabled = true
|
||||
sdfgi_enabled = true
|
||||
glow_enabled = true
|
||||
|
||||
[sub_resource type="CameraAttributesPractical" id="CameraAttributesPractical_cvruf"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_fnyq0"]
|
||||
resource_name = "float"
|
||||
length = 4.0
|
||||
|
|
@ -51,14 +31,8 @@ _data = {
|
|||
[node name="MenuBg" type="Node3D"]
|
||||
script = ExtResource("1_mvbgk")
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="."]
|
||||
[node name="CameraPosition" type="Marker3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.323323, 0.972071)
|
||||
current = true
|
||||
near = 0.003
|
||||
|
||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||
environment = SubResource("Environment_hqpr0")
|
||||
camera_attributes = SubResource("CameraAttributesPractical_cvruf")
|
||||
|
||||
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
|
||||
transform = Transform3D(0.902146, 0.161505, -0.400062, -0.132644, 0.986206, 0.0990162, 0.410534, -0.0362611, 0.911124, 0, 1.52296, 0)
|
||||
|
|
@ -73,12 +47,12 @@ libraries = {
|
|||
autoplay = "float"
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
||||
transform = Transform3D(-0.0374396, -0.00439883, 0.032847, -0.0194431, 0.0430478, -0.0163967, -0.0268373, -0.0250506, -0.0339444, 0.152866, 0.215249, 0.637892)
|
||||
transform = Transform3D(-0.0374396, -0.00439883, 0.032847, -0.0194431, 0.0430478, -0.0163967, -0.0268373, -0.0250506, -0.0339444, 0.152777, 0.229333, 0.63782)
|
||||
mesh = ExtResource("1_8u4bs")
|
||||
skeleton = NodePath("../..")
|
||||
|
||||
[node name="MeshInstance3D2" type="MeshInstance3D" parent="."]
|
||||
transform = Transform3D(0.0475114, -0.0035802, -0.0151608, 0.0155677, 0.0091615, 0.0466231, -0.000560477, -0.049023, 0.00982022, 0.28582, 0.375627, 0.637932)
|
||||
transform = Transform3D(0.0475114, -0.0035802, -0.0151608, 0.0155677, 0.0091615, 0.0466231, -0.000560477, -0.049023, 0.00982022, 0.28552, 0.392348, 0.63782)
|
||||
mesh = ExtResource("1_8u4bs")
|
||||
|
||||
[node name="MenuUi" parent="." instance=ExtResource("2_5dpja")]
|
||||
|
|
|
|||
59
player_select/player_select.gd
Normal file
59
player_select/player_select.gd
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
extends Control
|
||||
|
||||
@onready var selector: Control = $SelectorContainer
|
||||
@onready var p1 = $Players/Player1
|
||||
@onready var p2 = $Players/Player2
|
||||
@onready var p3 = $Players/Player3
|
||||
@onready var p4 = $Players/Player4
|
||||
@onready var p5 = $Players/Player5
|
||||
@onready var start_button: Button = $StartButton
|
||||
@onready var start_disabled_info: Label = $StartDisabledInfo
|
||||
|
||||
var players: Array[VBoxContainer]
|
||||
var player_names: Array[String] = ["", "", "", "", ""]
|
||||
var player_ready := false
|
||||
signal start_game
|
||||
signal back_to_menu
|
||||
|
||||
var tween: Tween
|
||||
func _ready() -> void:
|
||||
players = [p1, p2, p3, p4, p5]
|
||||
|
||||
get_viewport().connect("gui_focus_changed", _on_focus_changed)
|
||||
for player in players:
|
||||
var line_edit: LineEdit = player.get_node("LineEdit")
|
||||
line_edit.connect("text_changed", _on_text_changed)
|
||||
|
||||
func recheck_names() -> void:
|
||||
var non_empty_player_names = 0
|
||||
for pname in player_names:
|
||||
if pname != "":
|
||||
non_empty_player_names += 1
|
||||
player_ready = non_empty_player_names >= 2
|
||||
start_disabled_info.visible = !player_ready
|
||||
start_button.disabled = !player_ready
|
||||
|
||||
func _on_start_button_pressed() -> void:
|
||||
start_game.emit()
|
||||
|
||||
func _on_focus_changed(focus: Control) -> void:
|
||||
if focus is LineEdit:
|
||||
var parent: VBoxContainer = focus.get_parent()
|
||||
if parent is VBoxContainer:
|
||||
selector.visible = true
|
||||
if tween:
|
||||
tween.kill()
|
||||
tween = get_tree().create_tween().bind_node(self).set_trans(Tween.TRANS_ELASTIC)
|
||||
tween.tween_property(selector, "global_position:x", parent.global_position.x + parent.size.x/2 - selector.size.x/2, .6)
|
||||
return
|
||||
selector.visible = false
|
||||
|
||||
func _on_text_changed(_text: String) -> void:
|
||||
for i in players.size():
|
||||
player_names[i] = players[i].get_node("LineEdit").text
|
||||
recheck_names()
|
||||
|
||||
func _on_texture_rect_gui_input(event: InputEvent) -> void:
|
||||
if event is InputEventMouse:
|
||||
if event.is_pressed():
|
||||
back_to_menu.emit()
|
||||
206
player_select/player_select.tscn
Normal file
206
player_select/player_select.tscn
Normal file
|
|
@ -0,0 +1,206 @@
|
|||
[gd_scene load_steps=8 format=3 uid="uid://k2duc4ddir2m"]
|
||||
|
||||
[ext_resource type="Script" path="res://player_select/player_select.gd" id="1_qqyon"]
|
||||
[ext_resource type="Texture2D" uid="uid://c25g6oj4fnw0h" path="res://icons/singleplayer.png" id="1_ra1kc"]
|
||||
[ext_resource type="Texture2D" uid="uid://c0yrwtgac654j" path="res://icons/up.png" id="2_de6io"]
|
||||
[ext_resource type="Texture2D" uid="uid://dgwgb7g0gca8m" path="res://icons/exit.png" id="4_4xfaw"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_mkwqy"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("SelectorContainer/SelectorTexture:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_24wm5"]
|
||||
resource_name = "selector_float"
|
||||
loop_mode = 1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("SelectorContainer/SelectorTexture:position")
|
||||
tracks/0/interp = 2
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.5, 1),
|
||||
"transitions": PackedFloat32Array(1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0, 0), Vector2(0, -11), Vector2(0, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_gjb0h"]
|
||||
_data = {
|
||||
"RESET": SubResource("Animation_mkwqy"),
|
||||
"selector_float": SubResource("Animation_24wm5")
|
||||
}
|
||||
|
||||
[node name="Control" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_qqyon")
|
||||
|
||||
[node name="Players" type="HBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -20.0
|
||||
offset_top = -20.0
|
||||
offset_right = 20.0
|
||||
offset_bottom = 20.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_constants/separation = 30
|
||||
|
||||
[node name="Player1" type="VBoxContainer" parent="Players"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="Players/Player1"]
|
||||
modulate = Color(0.327948, 0.688773, 1, 1)
|
||||
layout_mode = 2
|
||||
texture = ExtResource("1_ra1kc")
|
||||
|
||||
[node name="LineEdit" type="LineEdit" parent="Players/Player1"]
|
||||
layout_mode = 2
|
||||
placeholder_text = "Player 1"
|
||||
|
||||
[node name="Player2" type="VBoxContainer" parent="Players"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="Players/Player2"]
|
||||
modulate = Color(0.779557, 0.531037, 0.993503, 1)
|
||||
layout_mode = 2
|
||||
texture = ExtResource("1_ra1kc")
|
||||
|
||||
[node name="LineEdit" type="LineEdit" parent="Players/Player2"]
|
||||
layout_mode = 2
|
||||
placeholder_text = "Player 2"
|
||||
|
||||
[node name="Player3" type="VBoxContainer" parent="Players"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="Players/Player3"]
|
||||
modulate = Color(1, 0.474572, 0.502802, 1)
|
||||
layout_mode = 2
|
||||
texture = ExtResource("1_ra1kc")
|
||||
|
||||
[node name="LineEdit" type="LineEdit" parent="Players/Player3"]
|
||||
layout_mode = 2
|
||||
placeholder_text = "Player 3"
|
||||
|
||||
[node name="Player4" type="VBoxContainer" parent="Players"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="Players/Player4"]
|
||||
modulate = Color(0.99713, 0.511467, 7.70092e-07, 1)
|
||||
layout_mode = 2
|
||||
texture = ExtResource("1_ra1kc")
|
||||
|
||||
[node name="LineEdit" type="LineEdit" parent="Players/Player4"]
|
||||
layout_mode = 2
|
||||
placeholder_text = "Player 4"
|
||||
|
||||
[node name="Player5" type="VBoxContainer" parent="Players"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="Players/Player5"]
|
||||
modulate = Color(1.34766e-06, 0.780483, 0.557622, 1)
|
||||
layout_mode = 2
|
||||
texture = ExtResource("1_ra1kc")
|
||||
|
||||
[node name="LineEdit" type="LineEdit" parent="Players/Player5"]
|
||||
layout_mode = 2
|
||||
placeholder_text = "Player 5"
|
||||
|
||||
[node name="StartButton" type="Button" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 7
|
||||
anchor_left = 0.5
|
||||
anchor_top = 1.0
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -47.0
|
||||
offset_top = -66.0
|
||||
offset_right = 47.0
|
||||
offset_bottom = -21.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
disabled = true
|
||||
text = "Start"
|
||||
|
||||
[node name="SelectorContainer" type="Control" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -282.0
|
||||
offset_top = 80.0
|
||||
offset_right = -242.0
|
||||
offset_bottom = 120.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="SelectorTexture" type="TextureRect" parent="SelectorContainer"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -20.0
|
||||
offset_top = -20.0
|
||||
offset_right = 20.0
|
||||
offset_bottom = 20.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = ExtResource("2_de6io")
|
||||
expand_mode = 1
|
||||
|
||||
[node name="StartDisabledInfo" type="Label" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 7
|
||||
anchor_left = 0.5
|
||||
anchor_top = 1.0
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -132.0
|
||||
offset_top = -101.0
|
||||
offset_right = 140.0
|
||||
offset_bottom = -84.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
text = "Name 2+ players to continue"
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 21.0
|
||||
offset_top = 20.0
|
||||
offset_right = 84.0
|
||||
offset_bottom = 83.0
|
||||
texture = ExtResource("4_4xfaw")
|
||||
expand_mode = 1
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_gjb0h")
|
||||
}
|
||||
autoplay = "selector_float"
|
||||
|
||||
[connection signal="pressed" from="StartButton" to="." method="_on_start_button_pressed"]
|
||||
[connection signal="gui_input" from="TextureRect" to="." method="_on_texture_rect_gui_input"]
|
||||
|
|
@ -11,7 +11,7 @@ config_version=5
|
|||
[application]
|
||||
|
||||
config/name="programovani-kostky"
|
||||
run/main_scene="res://menu/menu_bg.tscn"
|
||||
run/main_scene="res://game/main.tscn"
|
||||
config/features=PackedStringArray("4.2", "Forward Plus")
|
||||
config/icon="res://game/icon.svg"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue