mirror of
https://github.com/danbulant/programovani-kostky
synced 2026-07-05 19:11:01 +00:00
fixed transitions
This commit is contained in:
parent
8ee824f591
commit
24235fb1cf
5 changed files with 88 additions and 28 deletions
|
|
@ -7,6 +7,7 @@ class_name Player
|
||||||
@onready var dice1: DiceUi = $VBoxContainer/HBoxContainer/dice1
|
@onready var dice1: DiceUi = $VBoxContainer/HBoxContainer/dice1
|
||||||
@onready var dice2: DiceUi = $VBoxContainer/HBoxContainer/dice2
|
@onready var dice2: DiceUi = $VBoxContainer/HBoxContainer/dice2
|
||||||
@onready var dice3: DiceUi = $VBoxContainer/HBoxContainer/dice3
|
@onready var dice3: DiceUi = $VBoxContainer/HBoxContainer/dice3
|
||||||
|
@onready var score_change_label: Label = $VBoxContainer/ScoreChange
|
||||||
|
|
||||||
@export var player_name: String :
|
@export var player_name: String :
|
||||||
set(value):
|
set(value):
|
||||||
|
|
@ -26,7 +27,13 @@ class_name Player
|
||||||
dice2.value = (score % 100) / 10
|
dice2.value = (score % 100) / 10
|
||||||
dice3.value = score % 10
|
dice3.value = score % 10
|
||||||
|
|
||||||
|
@export var score_change: String = "" :
|
||||||
|
set(value):
|
||||||
|
score_change = value
|
||||||
|
score_change_label.text = score_change
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
player_name = player_name
|
player_name = player_name
|
||||||
show_medal = show_medal
|
show_medal = show_medal
|
||||||
score = score
|
score = score
|
||||||
|
score_change = score_change
|
||||||
46
game/main.gd
46
game/main.gd
|
|
@ -10,6 +10,7 @@ extends Node3D
|
||||||
@onready var gamescene_light = $GameSceneLight
|
@onready var gamescene_light = $GameSceneLight
|
||||||
@onready var menu_scene = $MenuBg
|
@onready var menu_scene = $MenuBg
|
||||||
@onready var player_select = $PlayerSelect
|
@onready var player_select = $PlayerSelect
|
||||||
|
@onready var base = $CSGMesh3D
|
||||||
|
|
||||||
const physics_timeout := 2.5
|
const physics_timeout := 2.5
|
||||||
|
|
||||||
|
|
@ -29,12 +30,17 @@ enum MasterState {
|
||||||
var state: GameState = GameState.START
|
var state: GameState = GameState.START
|
||||||
var master_state: MasterState = MasterState.LOGO
|
var master_state: MasterState = MasterState.LOGO
|
||||||
var current_player = 0
|
var current_player = 0
|
||||||
var camera_transition := 0.
|
var camera_speed := 1.3
|
||||||
var camera_speed := 1.5
|
|
||||||
var first_throw := true
|
|
||||||
var physics_timer := Timer.new()
|
var physics_timer := Timer.new()
|
||||||
var target_score = 100
|
var target_score = 100
|
||||||
|
|
||||||
|
var camera_tween: Tween
|
||||||
|
|
||||||
|
func rst_camera_tween() -> Tween:
|
||||||
|
if camera_tween: camera_tween.kill()
|
||||||
|
camera_tween = create_tween()
|
||||||
|
return camera_tween
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
ui.connect("roll_pressed", throw_dice)
|
ui.connect("roll_pressed", throw_dice)
|
||||||
add_child(physics_timer)
|
add_child(physics_timer)
|
||||||
|
|
@ -44,6 +50,7 @@ func _ready() -> void:
|
||||||
player_select.connect("back_to_menu", switch_to_menu)
|
player_select.connect("back_to_menu", switch_to_menu)
|
||||||
ui.connect("back_to_menu", switch_to_menu)
|
ui.connect("back_to_menu", switch_to_menu)
|
||||||
switch_to_menu()
|
switch_to_menu()
|
||||||
|
ui.update_pointer()
|
||||||
|
|
||||||
func master_state_sync() -> void:
|
func master_state_sync() -> void:
|
||||||
ui.visible = MasterState.GAME == master_state
|
ui.visible = MasterState.GAME == master_state
|
||||||
|
|
@ -51,6 +58,7 @@ func master_state_sync() -> void:
|
||||||
menu_scene.visible = MasterState.LOGO == master_state
|
menu_scene.visible = MasterState.LOGO == master_state
|
||||||
menu_scene.ui_visible = MasterState.LOGO == master_state
|
menu_scene.ui_visible = MasterState.LOGO == master_state
|
||||||
player_select.visible = MasterState.PLAYER_SELECT == master_state
|
player_select.visible = MasterState.PLAYER_SELECT == master_state
|
||||||
|
base.visible = MasterState.GAME == master_state
|
||||||
if master_state != MasterState.GAME:
|
if master_state != MasterState.GAME:
|
||||||
physics_timer_timeout()
|
physics_timer_timeout()
|
||||||
ui.update_medal()
|
ui.update_medal()
|
||||||
|
|
@ -61,18 +69,18 @@ func switch_to_player_select() -> void:
|
||||||
|
|
||||||
func switch_to_game() -> void:
|
func switch_to_game() -> void:
|
||||||
master_state = MasterState.GAME
|
master_state = MasterState.GAME
|
||||||
# for i in ui.players.size():
|
|
||||||
# ui.players[i].player_name = ""
|
|
||||||
for i in player_select.player_names.size():
|
for i in player_select.player_names.size():
|
||||||
var player_name: String = player_select.player_names[i]
|
var player_name: String = player_select.player_names[i]
|
||||||
# if not player_name: continue
|
|
||||||
ui.players[i].player_name = player_name
|
ui.players[i].player_name = player_name
|
||||||
ui.players[i].score = 0
|
ui.players[i].score = 0
|
||||||
ui.players[i].show_medal = false
|
ui.players[i].show_medal = false
|
||||||
|
ui.players[i].score_change = ""
|
||||||
for i in player_select.player_names.size():
|
for i in player_select.player_names.size():
|
||||||
if player_select.player_names[i]:
|
if player_select.player_names[i]:
|
||||||
current_player = i
|
current_player = i
|
||||||
|
ui.current_player = i
|
||||||
break
|
break
|
||||||
|
ui.update_pointer()
|
||||||
master_state_sync()
|
master_state_sync()
|
||||||
|
|
||||||
func switch_to_menu() -> void:
|
func switch_to_menu() -> void:
|
||||||
|
|
@ -86,6 +94,7 @@ func physics_timer_timeout() -> void:
|
||||||
|
|
||||||
func next_player() -> void:
|
func next_player() -> void:
|
||||||
current_player = (current_player + 1) % ui.players.size()
|
current_player = (current_player + 1) % ui.players.size()
|
||||||
|
ui.current_player = current_player
|
||||||
if not ui.players[current_player].player_name:
|
if not ui.players[current_player].player_name:
|
||||||
var found = false
|
var found = false
|
||||||
for i in player_select.player_names:
|
for i in player_select.player_names:
|
||||||
|
|
@ -104,31 +113,27 @@ func check_score() -> void:
|
||||||
print("Player", i.player_name, "won with", i.score, "points!")
|
print("Player", i.player_name, "won with", i.score, "points!")
|
||||||
break
|
break
|
||||||
|
|
||||||
func _physics_process(delta: float) -> void:
|
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)
|
|
||||||
elif state == GameState.THROWN:
|
|
||||||
camera.transform = camera_prethrow.transform.interpolate_with(camera_target.transform, camera_transition)
|
|
||||||
|
|
||||||
if (!dice1.can_be_thrown() or !dice2.can_be_thrown()) and state == GameState.THROWING_START:
|
if (!dice1.can_be_thrown() or !dice2.can_be_thrown()) and state == GameState.THROWING_START:
|
||||||
state = GameState.THROWING
|
state = GameState.THROWING
|
||||||
if dice1.can_be_thrown() and dice2.can_be_thrown() and state == GameState.THROWING:
|
if dice1.can_be_thrown() and dice2.can_be_thrown() and state == GameState.THROWING:
|
||||||
state = GameState.THROWN
|
state = GameState.THROWN
|
||||||
var avg_position = (dice1.global_transform.origin + dice2.global_transform.origin) / 2
|
var avg_position = (dice1.global_position + dice2.global_position) / 2
|
||||||
var diff = dice1.global_position - dice2.global_position
|
var diff := dice1.global_position.distance_to(dice2.global_position)
|
||||||
camera_target.global_position = avg_position + Vector3.UP * max(diff.length(), 0.1)
|
camera_target.global_position = avg_position + Vector3.UP * max(diff, 0.1)
|
||||||
camera_target.look_at(avg_position, Vector3.FORWARD)
|
camera_target.look_at(avg_position, Vector3.FORWARD)
|
||||||
camera_transition = 0.
|
rst_camera_tween().set_trans(Tween.TRANS_SINE).tween_property(camera, "global_transform", camera_target.global_transform, camera_speed)
|
||||||
first_throw = false
|
|
||||||
physics_timer.stop()
|
physics_timer.stop()
|
||||||
var d1 = dice1.get_value()
|
var d1 = dice1.get_value()
|
||||||
var d2 = dice2.get_value()
|
var d2 = dice2.get_value()
|
||||||
if d1 != 1 and d2 != 1:
|
if d1 != 1 and d2 != 1:
|
||||||
ui.players[current_player].score += d1 + d2
|
ui.players[current_player].score += d1 + d2
|
||||||
|
ui.players[current_player].score_change = "+" + str(d1 + d2)
|
||||||
elif d1 == 1 and d2 == 1:
|
elif d1 == 1 and d2 == 1:
|
||||||
|
ui.players[current_player].score_change = "-" + str(ui.players[current_player].score) + " :("
|
||||||
ui.players[current_player].score = 0
|
ui.players[current_player].score = 0
|
||||||
|
else:
|
||||||
|
ui.players[current_player].score_change = "0 :("
|
||||||
ui.update_medal()
|
ui.update_medal()
|
||||||
check_score()
|
check_score()
|
||||||
next_player()
|
next_player()
|
||||||
|
|
@ -140,5 +145,6 @@ func throw_dice() -> void:
|
||||||
dice1.random_throw()
|
dice1.random_throw()
|
||||||
dice2.random_throw()
|
dice2.random_throw()
|
||||||
state = GameState.THROWING_START
|
state = GameState.THROWING_START
|
||||||
camera_transition = 0.
|
rst_camera_tween().set_trans(Tween.TRANS_CUBIC).tween_property(camera, "global_transform", camera_prethrow.global_transform, camera_speed)
|
||||||
physics_timer.start(physics_timeout)
|
physics_timer.start(physics_timeout)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ glow_enabled = true
|
||||||
script = ExtResource("1_h1pkq")
|
script = ExtResource("1_h1pkq")
|
||||||
|
|
||||||
[node name="dice1" type="RigidBody3D" parent="." node_paths=PackedStringArray("start_marker")]
|
[node name="dice1" type="RigidBody3D" parent="." node_paths=PackedStringArray("start_marker")]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.57225, 0.217006, 0.0105869)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.27056, 0.217006, 0.0105869)
|
||||||
mass = 0.1
|
mass = 0.1
|
||||||
physics_material_override = SubResource("PhysicsMaterial_kmncl")
|
physics_material_override = SubResource("PhysicsMaterial_kmncl")
|
||||||
continuous_cd = true
|
continuous_cd = true
|
||||||
|
|
@ -62,7 +62,7 @@ skeleton = NodePath("../..")
|
||||||
shape = SubResource("BoxShape3D_jujds")
|
shape = SubResource("BoxShape3D_jujds")
|
||||||
|
|
||||||
[node name="dice2" type="RigidBody3D" parent="." node_paths=PackedStringArray("start_marker")]
|
[node name="dice2" type="RigidBody3D" parent="." node_paths=PackedStringArray("start_marker")]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.31759, 0.217006, 0.0105869)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.0159, 0.217006, 0.0105869)
|
||||||
mass = 0.1
|
mass = 0.1
|
||||||
physics_material_override = SubResource("PhysicsMaterial_kmncl")
|
physics_material_override = SubResource("PhysicsMaterial_kmncl")
|
||||||
continuous_cd = true
|
continuous_cd = true
|
||||||
|
|
@ -128,7 +128,7 @@ 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="CameraPositionTarget" type="Marker3D" parent="."]
|
||||||
|
|
||||||
[node name="DiceThrowStart" type="Marker3D" parent="."]
|
[node name="DiceThrowStart" type="Marker3D" parent="."]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.408271, 0.326392, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.347943, 0.326392, 0)
|
||||||
|
|
||||||
[node name="GameSceneLight" type="DirectionalLight3D" parent="."]
|
[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)
|
transform = Transform3D(1, 0, 0, 0, 0.751874, 0.659306, 0, -0.659306, 0.751874, 0, 1.52296, 0)
|
||||||
|
|
@ -141,7 +141,6 @@ directional_shadow_max_distance = 10.0
|
||||||
visible = false
|
visible = false
|
||||||
|
|
||||||
[node name="MenuBg" parent="." instance=ExtResource("5_r5r22")]
|
[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
|
visible = false
|
||||||
|
|
||||||
[node name="PlayerSelect" parent="." instance=ExtResource("6_xkr2b")]
|
[node name="PlayerSelect" parent="." instance=ExtResource("6_xkr2b")]
|
||||||
|
|
|
||||||
14
game/ui.gd
14
game/ui.gd
|
|
@ -17,12 +17,26 @@ func set_current_throw_value(value: Array[int]) -> void:
|
||||||
@onready var player3 = $VBoxContainer/Player3
|
@onready var player3 = $VBoxContainer/Player3
|
||||||
@onready var player4 = $VBoxContainer/Player4
|
@onready var player4 = $VBoxContainer/Player4
|
||||||
@onready var player5 = $VBoxContainer/Player5
|
@onready var player5 = $VBoxContainer/Player5
|
||||||
|
@onready var container = $VBoxContainer
|
||||||
|
@onready var pointer = $CurrentPlayerPointer
|
||||||
|
|
||||||
var players: Array[Player] = []
|
var players: Array[Player] = []
|
||||||
|
var current_player: int = 0 :
|
||||||
|
set(value):
|
||||||
|
current_player = value
|
||||||
|
update_pointer()
|
||||||
|
|
||||||
|
var tween: Tween
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
players = [player1, player2, player3, player4, player5]
|
players = [player1, player2, player3, player4, player5]
|
||||||
|
|
||||||
|
func update_pointer() -> void:
|
||||||
|
pointer.global_position.x = container.size.x
|
||||||
|
var p = players[current_player]
|
||||||
|
if tween: tween.kill()
|
||||||
|
tween = create_tween().set_trans(Tween.TRANS_ELASTIC)
|
||||||
|
tween.tween_property(pointer, "global_position:y", p.global_position.y + p.size.y/2 - pointer.size.y/2, .6)
|
||||||
|
|
||||||
func update_medal() -> void:
|
func update_medal() -> void:
|
||||||
var max_score = 0
|
var max_score = 0
|
||||||
for player in players:
|
for player in players:
|
||||||
|
|
|
||||||
40
game/ui.tscn
40
game/ui.tscn
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=9 format=3 uid="uid://c8jkqtbqtg7ub"]
|
[gd_scene load_steps=10 format=3 uid="uid://c8jkqtbqtg7ub"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://game/ui.gd" id="1_qipxr"]
|
[ext_resource type="Script" path="res://game/ui.gd" id="1_qipxr"]
|
||||||
[ext_resource type="Script" path="res://game/dice-ui.gd" id="2_g0ok8"]
|
[ext_resource type="Script" path="res://game/dice-ui.gd" id="2_g0ok8"]
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
[ext_resource type="Texture2D" uid="uid://c25g6oj4fnw0h" path="res://icons/singleplayer.png" id="3_xwlig"]
|
[ext_resource type="Texture2D" uid="uid://c25g6oj4fnw0h" path="res://icons/singleplayer.png" id="3_xwlig"]
|
||||||
[ext_resource type="Texture2D" uid="uid://olq6rc614eq1" path="res://icons/medal2.png" id="4_gisdl"]
|
[ext_resource type="Texture2D" uid="uid://olq6rc614eq1" path="res://icons/medal2.png" id="4_gisdl"]
|
||||||
[ext_resource type="Texture2D" uid="uid://dgwgb7g0gca8m" path="res://icons/exit.png" id="6_ephx3"]
|
[ext_resource type="Texture2D" uid="uid://dgwgb7g0gca8m" path="res://icons/exit.png" id="6_ephx3"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://i7j0hyou7dje" path="res://icons/left.png" id="7_n5qk0"]
|
||||||
|
|
||||||
[sub_resource type="InputEventKey" id="InputEventKey_6n7ot"]
|
[sub_resource type="InputEventKey" id="InputEventKey_6n7ot"]
|
||||||
device = -1
|
device = -1
|
||||||
|
|
@ -113,6 +114,10 @@ script = ExtResource("2_g0ok8")
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
script = ExtResource("2_g0ok8")
|
script = ExtResource("2_g0ok8")
|
||||||
|
|
||||||
|
[node name="ScoreChange" type="Label" parent="VBoxContainer/Player/VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "+10"
|
||||||
|
|
||||||
[node name="Player2" type="HBoxContainer" parent="VBoxContainer"]
|
[node name="Player2" type="HBoxContainer" parent="VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
script = ExtResource("3_qtea6")
|
script = ExtResource("3_qtea6")
|
||||||
|
|
@ -123,6 +128,7 @@ layout_mode = 2
|
||||||
texture = ExtResource("3_xwlig")
|
texture = ExtResource("3_xwlig")
|
||||||
|
|
||||||
[node name="Medal" type="TextureRect" parent="VBoxContainer/Player2/TextureRect"]
|
[node name="Medal" type="TextureRect" parent="VBoxContainer/Player2/TextureRect"]
|
||||||
|
layout_mode = 0
|
||||||
offset_left = 36.0
|
offset_left = 36.0
|
||||||
offset_top = 41.0
|
offset_top = 41.0
|
||||||
offset_right = 101.0
|
offset_right = 101.0
|
||||||
|
|
@ -154,6 +160,10 @@ script = ExtResource("2_g0ok8")
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
script = ExtResource("2_g0ok8")
|
script = ExtResource("2_g0ok8")
|
||||||
|
|
||||||
|
[node name="ScoreChange" type="Label" parent="VBoxContainer/Player2/VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "+10"
|
||||||
|
|
||||||
[node name="Player3" type="HBoxContainer" parent="VBoxContainer"]
|
[node name="Player3" type="HBoxContainer" parent="VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
script = ExtResource("3_qtea6")
|
script = ExtResource("3_qtea6")
|
||||||
|
|
@ -164,6 +174,7 @@ layout_mode = 2
|
||||||
texture = ExtResource("3_xwlig")
|
texture = ExtResource("3_xwlig")
|
||||||
|
|
||||||
[node name="Medal" type="TextureRect" parent="VBoxContainer/Player3/TextureRect"]
|
[node name="Medal" type="TextureRect" parent="VBoxContainer/Player3/TextureRect"]
|
||||||
|
layout_mode = 0
|
||||||
offset_left = 36.0
|
offset_left = 36.0
|
||||||
offset_top = 41.0
|
offset_top = 41.0
|
||||||
offset_right = 101.0
|
offset_right = 101.0
|
||||||
|
|
@ -195,6 +206,10 @@ script = ExtResource("2_g0ok8")
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
script = ExtResource("2_g0ok8")
|
script = ExtResource("2_g0ok8")
|
||||||
|
|
||||||
|
[node name="ScoreChange" type="Label" parent="VBoxContainer/Player3/VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "+10"
|
||||||
|
|
||||||
[node name="Player4" type="HBoxContainer" parent="VBoxContainer"]
|
[node name="Player4" type="HBoxContainer" parent="VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
script = ExtResource("3_qtea6")
|
script = ExtResource("3_qtea6")
|
||||||
|
|
@ -205,6 +220,7 @@ layout_mode = 2
|
||||||
texture = ExtResource("3_xwlig")
|
texture = ExtResource("3_xwlig")
|
||||||
|
|
||||||
[node name="Medal" type="TextureRect" parent="VBoxContainer/Player4/TextureRect"]
|
[node name="Medal" type="TextureRect" parent="VBoxContainer/Player4/TextureRect"]
|
||||||
|
layout_mode = 0
|
||||||
offset_left = 36.0
|
offset_left = 36.0
|
||||||
offset_top = 41.0
|
offset_top = 41.0
|
||||||
offset_right = 101.0
|
offset_right = 101.0
|
||||||
|
|
@ -236,6 +252,10 @@ script = ExtResource("2_g0ok8")
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
script = ExtResource("2_g0ok8")
|
script = ExtResource("2_g0ok8")
|
||||||
|
|
||||||
|
[node name="ScoreChange" type="Label" parent="VBoxContainer/Player4/VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "+10"
|
||||||
|
|
||||||
[node name="Player5" type="HBoxContainer" parent="VBoxContainer"]
|
[node name="Player5" type="HBoxContainer" parent="VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
script = ExtResource("3_qtea6")
|
script = ExtResource("3_qtea6")
|
||||||
|
|
@ -246,6 +266,7 @@ layout_mode = 2
|
||||||
texture = ExtResource("3_xwlig")
|
texture = ExtResource("3_xwlig")
|
||||||
|
|
||||||
[node name="Medal" type="TextureRect" parent="VBoxContainer/Player5/TextureRect"]
|
[node name="Medal" type="TextureRect" parent="VBoxContainer/Player5/TextureRect"]
|
||||||
|
layout_mode = 0
|
||||||
offset_left = 36.0
|
offset_left = 36.0
|
||||||
offset_top = 41.0
|
offset_top = 41.0
|
||||||
offset_right = 101.0
|
offset_right = 101.0
|
||||||
|
|
@ -277,7 +298,11 @@ script = ExtResource("2_g0ok8")
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
script = ExtResource("2_g0ok8")
|
script = ExtResource("2_g0ok8")
|
||||||
|
|
||||||
[node name="TextureRect" type="TextureRect" parent="."]
|
[node name="ScoreChange" type="Label" parent="VBoxContainer/Player5/VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "+10"
|
||||||
|
|
||||||
|
[node name="ExitButton" type="TextureRect" parent="."]
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
anchors_preset = 1
|
anchors_preset = 1
|
||||||
anchor_left = 1.0
|
anchor_left = 1.0
|
||||||
|
|
@ -290,5 +315,14 @@ grow_horizontal = 0
|
||||||
texture = ExtResource("6_ephx3")
|
texture = ExtResource("6_ephx3")
|
||||||
expand_mode = 1
|
expand_mode = 1
|
||||||
|
|
||||||
|
[node name="CurrentPlayerPointer" type="TextureRect" parent="."]
|
||||||
|
layout_mode = 0
|
||||||
|
offset_left = 187.0
|
||||||
|
offset_top = 15.0
|
||||||
|
offset_right = 246.0
|
||||||
|
offset_bottom = 74.0
|
||||||
|
texture = ExtResource("7_n5qk0")
|
||||||
|
expand_mode = 1
|
||||||
|
|
||||||
[connection signal="pressed" from="roll button" to="." method="_on_roll_button_pressed"]
|
[connection signal="pressed" from="roll button" to="." method="_on_roll_button_pressed"]
|
||||||
[connection signal="gui_input" from="TextureRect" to="." method="_on_texture_rect_gui_input"]
|
[connection signal="gui_input" from="ExitButton" to="." method="_on_texture_rect_gui_input"]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue