Added settings for volume and mouse mode
This commit is contained in:
@@ -31,8 +31,6 @@ func _physics_process(delta: float) -> void:
|
||||
|
||||
|
||||
|
||||
func _on_body_entered(body: Node) -> void:
|
||||
pass
|
||||
|
||||
func capture(ob : Node2D, offset : Vector2 = Vector2.ZERO) -> void:
|
||||
captured = true
|
||||
|
||||
88
Dunkanoid.gd
88
Dunkanoid.gd
@@ -7,6 +7,8 @@ var _Upgrade = preload("res://Upgrade/Upgrade.tscn")
|
||||
var bricks : Array = []
|
||||
var balls : Array[Node] = []
|
||||
|
||||
const PADDLE_SPEED : float = 150
|
||||
|
||||
enum {
|
||||
MODE_WAIT,
|
||||
MODE_PLAY,
|
||||
@@ -15,10 +17,9 @@ enum {
|
||||
}
|
||||
|
||||
var mode = MODE_WAIT
|
||||
var round : int = 0
|
||||
var chr : int = 0
|
||||
signal update_lives
|
||||
|
||||
var capture_mode : bool = false
|
||||
var lives : int = 3 :
|
||||
set(x):
|
||||
lives = x
|
||||
@@ -33,7 +34,11 @@ var leave_direction : int = 0
|
||||
var paused : bool = false
|
||||
|
||||
func _ready() -> void:
|
||||
if Global.relative_mouse:
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
||||
else:
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_CONFINED_HIDDEN)
|
||||
|
||||
EventBus.update_score.connect(_on_update_score)
|
||||
new_level()
|
||||
|
||||
@@ -57,6 +62,24 @@ func _process(delta : float) -> void:
|
||||
if $Paddle.global_position.x < -16 or $Paddle.global_position.x > 428:
|
||||
if not $Sounds/RoundWon.playing:
|
||||
new_level()
|
||||
else:
|
||||
if Input.is_action_pressed("left"):
|
||||
var leftmost = 16 + $Paddle.width / 2
|
||||
$Paddle.position.x -= delta * PADDLE_SPEED
|
||||
$Paddle.position.y = 340
|
||||
if $Paddle.position.x < leftmost:
|
||||
$Paddle.position.x = leftmost
|
||||
if Input.is_action_pressed("right"):
|
||||
var rightmost = 432 - $Paddle.width / 2
|
||||
$Paddle.position.x += delta * PADDLE_SPEED
|
||||
$Paddle.position.y = 340
|
||||
if $Paddle.position.x > rightmost:
|
||||
$Paddle.position.x = rightmost
|
||||
if Input.is_action_just_pressed("fire"):
|
||||
if mode == MODE_PLAY:
|
||||
for ball in balls:
|
||||
if (ball.captured):
|
||||
ball.release()
|
||||
|
||||
|
||||
func leave(dir : int) -> void:
|
||||
@@ -65,6 +88,7 @@ func leave(dir : int) -> void:
|
||||
|
||||
func new_level() -> void:
|
||||
$Paddle.normal()
|
||||
$Paddle.position.x = 224
|
||||
mode = MODE_WAIT
|
||||
$Exits.visible = false
|
||||
for ball in balls:
|
||||
@@ -72,14 +96,14 @@ func new_level() -> void:
|
||||
ball.queue_free()
|
||||
balls.clear()
|
||||
for brick in bricks:
|
||||
remove_child(brick)
|
||||
$Bricks.remove_child(brick)
|
||||
brick.queue_free()
|
||||
bricks.clear()
|
||||
round += 1
|
||||
chr += 1
|
||||
level_data = load_level_from_disk(level)
|
||||
|
||||
$Start/Title.text = level
|
||||
$Start/Round.text = "ROUND %3d" % [round]
|
||||
$Start/Round.text = "ROUND %3d" % [chr]
|
||||
$Background.texture = load("res://Backgrounds/%s.png" % level_data.background)
|
||||
load_level(level_data.data)
|
||||
var ball = _Ball.instantiate()
|
||||
@@ -95,21 +119,22 @@ func new_level() -> void:
|
||||
|
||||
func _brick_destroyed(brick) -> void:
|
||||
Global.score += brick.value
|
||||
if randf() > 0.9:
|
||||
if randf() > 0.4:
|
||||
var upgrade = _Upgrade.instantiate()
|
||||
upgrade.position = brick.position
|
||||
upgrade.upgrade_collected.connect(_on_upgrade_collected)
|
||||
match randi() % 5:
|
||||
0:
|
||||
#0:
|
||||
_:
|
||||
upgrade.set_upgrade("C", Color.BLUE)
|
||||
1:
|
||||
upgrade.set_upgrade("T", Color.GREEN)
|
||||
2:
|
||||
upgrade.set_upgrade("S", Color.CYAN)
|
||||
3:
|
||||
upgrade.set_upgrade("E", Color.DARK_SEA_GREEN)
|
||||
4:
|
||||
upgrade.set_upgrade("R", Color.LIGHT_CORAL)
|
||||
#1:
|
||||
#upgrade.set_upgrade("T", Color.GREEN)
|
||||
#2:
|
||||
#upgrade.set_upgrade("S", Color.CYAN)
|
||||
#3:
|
||||
#upgrade.set_upgrade("E", Color.DARK_SEA_GREEN)
|
||||
#4:
|
||||
#upgrade.set_upgrade("R", Color.LIGHT_CORAL)
|
||||
add_child(upgrade)
|
||||
bricks.erase(brick)
|
||||
var brick_count = 0
|
||||
@@ -138,6 +163,16 @@ func _input(event: InputEvent) -> void:
|
||||
return
|
||||
if event is InputEventMouseMotion:
|
||||
if mode != MODE_LEAVE:
|
||||
if Global.relative_mouse:
|
||||
var leftmost = 16 + $Paddle.width / 2
|
||||
var rightmost = 432 - $Paddle.width / 2
|
||||
$Paddle.position.x += event.relative.x
|
||||
$Paddle.position.y = 340
|
||||
if $Paddle.position.x < leftmost:
|
||||
$Paddle.position.x = leftmost
|
||||
if $Paddle.position.x > rightmost:
|
||||
$Paddle.position.x = rightmost
|
||||
else:
|
||||
$Paddle.position = Vector2(min(max(16 + $Paddle.width/2, event.position.x), 432-$Paddle.width/2), 340)
|
||||
if event is InputEventMouseButton:
|
||||
if mode != MODE_PLAY:
|
||||
@@ -147,7 +182,7 @@ func _input(event: InputEvent) -> void:
|
||||
ball.release()
|
||||
|
||||
func _on_hit_paddle(ball) -> void:
|
||||
if capture_mode:
|
||||
if $Paddle.is_capture():
|
||||
var diff = $Paddle.global_position.x - ball.global_position.x
|
||||
ball.capture($Paddle, Vector2(diff, 8))
|
||||
|
||||
@@ -161,7 +196,7 @@ func _on_hit_floor(ball) -> void:
|
||||
if c is Upgrade:
|
||||
remove_child(c)
|
||||
c.queue_free()
|
||||
capture_mode = false
|
||||
$Paddle.normal()
|
||||
ball = _Ball.instantiate()
|
||||
ball.capture($Paddle, Vector2((randf() * 32) - 16, 8))
|
||||
ball.hit_paddle.connect(_on_hit_paddle)
|
||||
@@ -188,8 +223,7 @@ func _on_upgrade_collected(code : String) -> void:
|
||||
$Sounds/UpgradeCollected.play()
|
||||
match code:
|
||||
"C":
|
||||
capture_mode = true
|
||||
get_tree().create_timer(10).timeout.connect(_cancel_capture_mode)
|
||||
$Paddle.capture()
|
||||
"T":
|
||||
add_ball()
|
||||
add_ball()
|
||||
@@ -217,11 +251,6 @@ func add_ball() -> void:
|
||||
balls.push_back(newball)
|
||||
|
||||
|
||||
func _cancel_capture_mode() -> void:
|
||||
capture_mode = false
|
||||
for ball in balls:
|
||||
if ball.captured:
|
||||
ball.release()
|
||||
|
||||
func load_level(data) -> void:
|
||||
for y in data.size():
|
||||
@@ -259,15 +288,12 @@ func load_level(data) -> void:
|
||||
brick.position = Vector2(x * 32 + 16 + 16, y * 16 + 8 + 16)
|
||||
bricks.push_back(brick)
|
||||
brick.brick_destroyed.connect(_brick_destroyed)
|
||||
add_child(brick)
|
||||
|
||||
|
||||
$Bricks.add_child(brick)
|
||||
|
||||
func _on_start_round_finished() -> void:
|
||||
$Start.visible = false
|
||||
mode = MODE_PLAY
|
||||
|
||||
|
||||
func _on_update_lives() -> void:
|
||||
$LivesBox.text = "%d" % lives
|
||||
|
||||
@@ -277,3 +303,9 @@ func load_level_from_disk(name : String) -> Dictionary:
|
||||
if FileAccess.file_exists("res://Levels/%s.json" % name):
|
||||
return JSON.parse_string(FileAccess.get_file_as_string("res://Levels/%s.json" % name))
|
||||
return JSON.parse_string(FileAccess.get_file_as_string("res://Levels/NOTFOUND.json"))
|
||||
|
||||
func _on_paddle_effect_finished(effect: int) -> void:
|
||||
if effect == Paddle.PADDLE_CAPTURE:
|
||||
for ball in balls:
|
||||
if ball.captured:
|
||||
ball.release()
|
||||
|
||||
@@ -33,39 +33,17 @@ distance = -360.0
|
||||
texture_filter = 1
|
||||
script = ExtResource("1_kv4if")
|
||||
|
||||
[node name="Paused" type="Node2D" parent="."]
|
||||
process_mode = 3
|
||||
visible = false
|
||||
z_index = 2
|
||||
script = ExtResource("12_8qv0d")
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="Paused"]
|
||||
offset_right = 448.0
|
||||
offset_bottom = 360.0
|
||||
color = Color(0, 0, 0, 0.247059)
|
||||
|
||||
[node name="Label" type="Label" parent="Paused"]
|
||||
material = ExtResource("9_ouuij")
|
||||
offset_right = 448.0
|
||||
offset_bottom = 360.0
|
||||
theme = ExtResource("8_wcf7g")
|
||||
theme_type_variation = &"Arkanoid"
|
||||
text = "PAUSED"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="Background" type="TextureRect" parent="."]
|
||||
z_index = -2
|
||||
texture_repeat = 2
|
||||
clip_contents = true
|
||||
offset_right = 640.0
|
||||
offset_bottom = 514.0
|
||||
scale = Vector2(0.7, 0.7)
|
||||
offset_right = 448.0
|
||||
offset_bottom = 360.0
|
||||
texture = ExtResource("5_j5mmn")
|
||||
stretch_mode = 1
|
||||
|
||||
[node name="Paddle" parent="." instance=ExtResource("2_26c5i")]
|
||||
position = Vector2(39, 340)
|
||||
position = Vector2(224, 340)
|
||||
input_pickable = false
|
||||
physics_material_override = null
|
||||
|
||||
@@ -215,6 +193,61 @@ offset_right = 641.0
|
||||
offset_bottom = 360.0
|
||||
color = Color(0, 0, 0, 1)
|
||||
|
||||
[node name="Bricks" type="Node2D" parent="."]
|
||||
|
||||
[node name="Paused" type="Node2D" parent="."]
|
||||
process_mode = 3
|
||||
visible = false
|
||||
script = ExtResource("12_8qv0d")
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="Paused"]
|
||||
offset_right = 448.0
|
||||
offset_bottom = 360.0
|
||||
color = Color(0, 0, 0, 0.247059)
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="Paused"]
|
||||
offset_right = 448.0
|
||||
offset_bottom = 360.0
|
||||
|
||||
[node name="VSeparator" type="VSeparator" parent="Paused/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
theme = ExtResource("8_wcf7g")
|
||||
|
||||
[node name="Label" type="Label" parent="Paused/VBoxContainer"]
|
||||
material = ExtResource("9_ouuij")
|
||||
layout_mode = 2
|
||||
theme = ExtResource("8_wcf7g")
|
||||
theme_type_variation = &"Arkanoid"
|
||||
text = "PAUSED"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="Paused/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="HSeparator" type="HSeparator" parent="Paused/VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme = ExtResource("8_wcf7g")
|
||||
|
||||
[node name="Quit" type="Button" parent="Paused/VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme = ExtResource("8_wcf7g")
|
||||
text = "QUIT"
|
||||
|
||||
[node name="HSeparator2" type="HSeparator" parent="Paused/VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme = ExtResource("8_wcf7g")
|
||||
|
||||
[node name="VSeparator2" type="VSeparator" parent="Paused/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
theme = ExtResource("8_wcf7g")
|
||||
|
||||
[connection signal="update_lives" from="." to="." method="_on_update_lives"]
|
||||
[connection signal="effect_finished" from="Paddle" to="." method="_on_paddle_effect_finished"]
|
||||
[connection signal="finished" from="Sounds/StartRound" to="." method="_on_start_round_finished"]
|
||||
[connection signal="finished" from="Sounds/RoundWon" to="." method="_on_round_won_finished"]
|
||||
[connection signal="pressed" from="Paused/VBoxContainer/HBoxContainer/Quit" to="Paused" method="_on_quit_pressed"]
|
||||
|
||||
27
Global.gd
27
Global.gd
@@ -13,14 +13,39 @@ var highscore : int = 0 :
|
||||
EventBus.update_highscore.emit(highscore)
|
||||
_save()
|
||||
|
||||
var relative_mouse : bool = true :
|
||||
set(x):
|
||||
relative_mouse = x
|
||||
_save()
|
||||
|
||||
var volume : int :
|
||||
set(x):
|
||||
volume = x
|
||||
AudioServer.set_bus_volume_db(0, volume)
|
||||
_save()
|
||||
|
||||
var _loading : bool = false
|
||||
|
||||
func _ready() -> void:
|
||||
_loading = true
|
||||
if FileAccess.file_exists("user://data.json"):
|
||||
var data = JSON.parse_string(FileAccess.get_file_as_string("user://data.json"))
|
||||
highscore = data.get("highscore", 0)
|
||||
relative_mouse = data.get("relative_mouse", true)
|
||||
volume = data.get("volume", AudioServer.get_bus_volume_db(0))
|
||||
else:
|
||||
highscore = 0
|
||||
relative_mouse = true
|
||||
volume = AudioServer.get_bus_volume_db(0)
|
||||
_loading = false
|
||||
|
||||
func _save() -> void:
|
||||
if _loading:
|
||||
return
|
||||
var data : Dictionary = {
|
||||
"highscore": highscore
|
||||
"highscore": highscore,
|
||||
"relative_mouse": relative_mouse,
|
||||
"volume": volume
|
||||
}
|
||||
var f = FileAccess.open("user://data.json", FileAccess.WRITE)
|
||||
f.store_string(JSON.stringify(data))
|
||||
|
||||
4
Intro.gd
4
Intro.gd
@@ -6,6 +6,7 @@ func _ready() -> void:
|
||||
EventBus.update_highscore.connect(_on_update_highscore)
|
||||
_on_update_score(Global.score)
|
||||
_on_update_highscore(Global.highscore)
|
||||
$VBoxContainer/HBoxContainer/Play.grab_focus()
|
||||
|
||||
func _on_button_pressed() -> void:
|
||||
get_tree().change_scene_to_file("res://Dunkanoid.tscn")
|
||||
@@ -19,8 +20,7 @@ func _on_update_highscore(score : int) -> void:
|
||||
|
||||
|
||||
func _on_settings_pressed() -> void:
|
||||
pass # Replace with function body.
|
||||
|
||||
get_tree().change_scene_to_file("res://Settings.tscn")
|
||||
|
||||
func _on_editor_pressed() -> void:
|
||||
get_tree().change_scene_to_file("res://LevelEditor.tscn")
|
||||
|
||||
@@ -9,7 +9,7 @@ content_margin_left = 3.0
|
||||
content_margin_top = 3.0
|
||||
content_margin_right = 3.0
|
||||
content_margin_bottom = 3.0
|
||||
bg_color = Color(0.168627, 0.168627, 0.168627, 1)
|
||||
bg_color = Color(0.231373, 0.231373, 0.231373, 1)
|
||||
corner_radius_top_left = 3
|
||||
corner_radius_top_right = 3
|
||||
corner_radius_bottom_right = 3
|
||||
|
||||
3
MouseMode.tres
Normal file
3
MouseMode.tres
Normal file
@@ -0,0 +1,3 @@
|
||||
[gd_resource type="ButtonGroup" format=3 uid="uid://6t0fev6x6qyf"]
|
||||
|
||||
[resource]
|
||||
@@ -1,6 +1,20 @@
|
||||
extends StaticBody2D
|
||||
class_name Paddle
|
||||
|
||||
signal effect_finished(effect : int)
|
||||
signal effect_started(effect : int)
|
||||
|
||||
enum {
|
||||
PADDLE_NORMAL,
|
||||
PADDLE_CAPTURE,
|
||||
PADDLE_SMALL,
|
||||
PADDLE_LARGE,
|
||||
PADDLE_LAZER
|
||||
}
|
||||
|
||||
var mode : int = PADDLE_NORMAL
|
||||
var running_effect : int = PADDLE_NORMAL
|
||||
|
||||
var width : int :
|
||||
get:
|
||||
return $CollisionShape2D.shape.height
|
||||
@@ -8,30 +22,61 @@ var width : int :
|
||||
func hit() -> void:
|
||||
pass
|
||||
|
||||
func _switch_effect(effect : int, time : int = 0) -> void:
|
||||
if mode != PADDLE_NORMAL:
|
||||
effect_finished.emit(mode)
|
||||
mode = effect
|
||||
if mode != PADDLE_NORMAL:
|
||||
effect_started.emit(mode)
|
||||
if time > 0:
|
||||
$EffectTimer.start(time)
|
||||
else:
|
||||
$EffectTimer.stop()
|
||||
|
||||
func big() -> void:
|
||||
$Normal.visible = false
|
||||
$Small.visible = false
|
||||
$Big.visible = true
|
||||
$CollisionShape2D.shape.height = 40
|
||||
$EffectTimer.start(30)
|
||||
$GrowSound.play()
|
||||
pass
|
||||
_switch_effect(PADDLE_LARGE, 30)
|
||||
|
||||
func small() -> void:
|
||||
$Normal.visible = false
|
||||
$Small.visible = true
|
||||
$Big.visible = false
|
||||
$CollisionShape2D.shape.height = 24
|
||||
$EffectTimer.start(30)
|
||||
$ShrinkSound.play()
|
||||
pass
|
||||
_switch_effect(PADDLE_SMALL, 30)
|
||||
|
||||
func normal() -> void:
|
||||
$Normal.visible = true
|
||||
$Small.visible = false
|
||||
$Big.visible = false
|
||||
$CollisionShape2D.shape.height = 32
|
||||
pass
|
||||
_switch_effect(PADDLE_NORMAL)
|
||||
|
||||
func capture() -> void:
|
||||
$Normal.visible = true
|
||||
$Small.visible = false
|
||||
$Big.visible = false
|
||||
$CollisionShape2D.shape.height = 32
|
||||
_switch_effect(PADDLE_CAPTURE, 15)
|
||||
|
||||
func _on_effect_timer_timeout() -> void:
|
||||
normal()
|
||||
|
||||
func is_big() -> bool:
|
||||
return mode == PADDLE_LARGE
|
||||
|
||||
func is_small() -> bool:
|
||||
return mode == PADDLE_SMALL
|
||||
|
||||
func is_normal() -> bool:
|
||||
return mode == PADDLE_NORMAL
|
||||
|
||||
func is_capture() -> bool:
|
||||
return mode == PADDLE_CAPTURE
|
||||
|
||||
func is_lazer() -> bool:
|
||||
return mode == PADDLE_LAZER
|
||||
|
||||
10
Paused.gd
10
Paused.gd
@@ -8,12 +8,22 @@ func _process(_delta : float) -> void:
|
||||
visible = false
|
||||
paused = false
|
||||
get_tree().paused = false
|
||||
if Global.relative_mouse:
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
||||
else:
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_CONFINED_HIDDEN)
|
||||
$VBoxContainer/HBoxContainer/Quit.release_focus()
|
||||
else:
|
||||
visible = true
|
||||
paused = true
|
||||
get_tree().paused = true
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
|
||||
$VBoxContainer/HBoxContainer/Quit.grab_focus()
|
||||
|
||||
if Input.is_action_just_pressed("mute"):
|
||||
AudioServer.set_bus_mute(0, !AudioServer.is_bus_mute(0))
|
||||
|
||||
func _on_quit_pressed() -> void:
|
||||
paused = false
|
||||
get_tree().paused = false
|
||||
get_tree().change_scene_to_file("res://Intro.tscn")
|
||||
|
||||
19
Settings.gd
Normal file
19
Settings.gd
Normal file
@@ -0,0 +1,19 @@
|
||||
extends Node2D
|
||||
|
||||
func _ready() -> void:
|
||||
$VBoxContainer/HBoxContainer/LeftPanel/Relative.button_pressed = Global.relative_mouse
|
||||
$VBoxContainer/HBoxContainer/LeftPanel/Absolute.button_pressed = !Global.relative_mouse
|
||||
$VBoxContainer/HBoxContainer/RightPanel/Volume.set_value_no_signal(Global.volume)
|
||||
|
||||
func _on_relative_pressed() -> void:
|
||||
Global.relative_mouse = true
|
||||
|
||||
func _on_absolute_pressed() -> void:
|
||||
Global.relative_mouse = false
|
||||
|
||||
func _on_exit_pressed() -> void:
|
||||
get_tree().change_scene_to_file("res://Intro.tscn")
|
||||
|
||||
func _on_volume_drag_ended(value_changed: bool) -> void:
|
||||
Global.volume = $VBoxContainer/HBoxContainer/RightPanel/Volume.value
|
||||
$Boink.play()
|
||||
89
Settings.tscn
Normal file
89
Settings.tscn
Normal file
@@ -0,0 +1,89 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://dm61ni80p8hll"]
|
||||
|
||||
[ext_resource type="Script" path="res://Settings.gd" id="1_a8wdi"]
|
||||
[ext_resource type="Theme" uid="uid://cfvww0geatnnk" path="res://MainTheme.tres" id="1_lirja"]
|
||||
[ext_resource type="ButtonGroup" uid="uid://6t0fev6x6qyf" path="res://MouseMode.tres" id="2_5uw4g"]
|
||||
[ext_resource type="AudioStream" uid="uid://d3g30x1n2ncjj" path="res://Sounds/PaddleHit.wav" id="4_hgwvx"]
|
||||
|
||||
[node name="Settings" type="Node2D"]
|
||||
script = ExtResource("1_a8wdi")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
offset_top = 38.0
|
||||
offset_right = 640.0
|
||||
offset_bottom = 324.0
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="LeftGutter" type="HSeparator" parent="VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme = ExtResource("1_lirja")
|
||||
|
||||
[node name="LeftPanel" type="VBoxContainer" parent="VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="MouseModeLabel" type="Label" parent="VBoxContainer/HBoxContainer/LeftPanel"]
|
||||
layout_mode = 2
|
||||
theme = ExtResource("1_lirja")
|
||||
text = "Mouse Mode"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="Relative" type="CheckButton" parent="VBoxContainer/HBoxContainer/LeftPanel"]
|
||||
layout_mode = 2
|
||||
theme = ExtResource("1_lirja")
|
||||
button_group = ExtResource("2_5uw4g")
|
||||
text = "Relative"
|
||||
|
||||
[node name="Absolute" type="CheckButton" parent="VBoxContainer/HBoxContainer/LeftPanel"]
|
||||
layout_mode = 2
|
||||
theme = ExtResource("1_lirja")
|
||||
button_group = ExtResource("2_5uw4g")
|
||||
text = "Absolute"
|
||||
|
||||
[node name="CenterGutter" type="HSeparator" parent="VBoxContainer/HBoxContainer"]
|
||||
custom_minimum_size = Vector2(32, 0)
|
||||
layout_mode = 2
|
||||
theme = ExtResource("1_lirja")
|
||||
|
||||
[node name="RightPanel" type="VBoxContainer" parent="VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="VolumeLabel" type="Label" parent="VBoxContainer/HBoxContainer/RightPanel"]
|
||||
layout_mode = 2
|
||||
theme = ExtResource("1_lirja")
|
||||
text = "Volume"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="Volume" type="HSlider" parent="VBoxContainer/HBoxContainer/RightPanel"]
|
||||
layout_mode = 2
|
||||
min_value = -80.0
|
||||
max_value = 6.0
|
||||
tick_count = 10
|
||||
|
||||
[node name="RightGutter" type="HSeparator" parent="VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme = ExtResource("1_lirja")
|
||||
|
||||
[node name="Exit" type="Button" parent="."]
|
||||
offset_left = 590.0
|
||||
offset_top = 324.0
|
||||
offset_right = 630.0
|
||||
offset_bottom = 350.0
|
||||
theme = ExtResource("1_lirja")
|
||||
text = "Exit"
|
||||
|
||||
[node name="Boink" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource("4_hgwvx")
|
||||
|
||||
[connection signal="pressed" from="VBoxContainer/HBoxContainer/LeftPanel/Relative" to="." method="_on_relative_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/HBoxContainer/LeftPanel/Absolute" to="." method="_on_absolute_pressed"]
|
||||
[connection signal="drag_ended" from="VBoxContainer/HBoxContainer/RightPanel/Volume" to="." method="_on_volume_drag_ended"]
|
||||
[connection signal="pressed" from="Exit" to="." method="_on_exit_pressed"]
|
||||
@@ -9,8 +9,8 @@ var character = "C"
|
||||
func _ready() -> void:
|
||||
linear_velocity = Vector2(0, 40)
|
||||
|
||||
func set_upgrade(char : String, color : Color) -> void:
|
||||
character = char
|
||||
func set_upgrade(chr : String, color : Color) -> void:
|
||||
character = chr
|
||||
$Label.text = character
|
||||
$Polygon2D.color = color
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_resource type="AudioBusLayout" format=3 uid="uid://cw31i0khpovnh"]
|
||||
|
||||
[resource]
|
||||
bus/0/volume_db = -19.6683
|
||||
bus/0/volume_db = -21.8264
|
||||
|
||||
@@ -44,7 +44,7 @@ runnable=true
|
||||
dedicated_server=false
|
||||
custom_features=""
|
||||
export_filter="all_resources"
|
||||
include_filter=""
|
||||
include_filter="*.json"
|
||||
exclude_filter=""
|
||||
export_path="../../export/Dunkanoid.x86_64"
|
||||
encryption_include_filters=""
|
||||
@@ -75,3 +75,66 @@ unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\"
|
||||
ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash
|
||||
kill $(pgrep -x -f \"{temp_dir}/{exe_name} {cmd_args}\")
|
||||
rm -rf \"{temp_dir}\""
|
||||
|
||||
[preset.2]
|
||||
|
||||
name="Windows Desktop"
|
||||
platform="Windows Desktop"
|
||||
runnable=true
|
||||
dedicated_server=false
|
||||
custom_features=""
|
||||
export_filter="all_resources"
|
||||
include_filter="*.json"
|
||||
exclude_filter=""
|
||||
export_path="../../export/Dunkanoid.exe"
|
||||
encryption_include_filters=""
|
||||
encryption_exclude_filters=""
|
||||
encrypt_pck=false
|
||||
encrypt_directory=false
|
||||
|
||||
[preset.2.options]
|
||||
|
||||
custom_template/debug=""
|
||||
custom_template/release=""
|
||||
debug/export_console_wrapper=1
|
||||
binary_format/embed_pck=true
|
||||
texture_format/bptc=true
|
||||
texture_format/s3tc=true
|
||||
texture_format/etc=false
|
||||
texture_format/etc2=false
|
||||
binary_format/architecture="x86_64"
|
||||
codesign/enable=false
|
||||
codesign/timestamp=true
|
||||
codesign/timestamp_server_url=""
|
||||
codesign/digest_algorithm=1
|
||||
codesign/description=""
|
||||
codesign/custom_options=PackedStringArray()
|
||||
application/modify_resources=false
|
||||
application/icon=""
|
||||
application/console_wrapper_icon=""
|
||||
application/icon_interpolation=4
|
||||
application/file_version=""
|
||||
application/product_version=""
|
||||
application/company_name="Majenko Technologies"
|
||||
application/product_name="Dunkanoid"
|
||||
application/file_description=""
|
||||
application/copyright=""
|
||||
application/trademarks=""
|
||||
application/export_angle=0
|
||||
ssh_remote_deploy/enabled=false
|
||||
ssh_remote_deploy/host="user@host_ip"
|
||||
ssh_remote_deploy/port="22"
|
||||
ssh_remote_deploy/extra_args_ssh=""
|
||||
ssh_remote_deploy/extra_args_scp=""
|
||||
ssh_remote_deploy/run_script="Expand-Archive -LiteralPath '{temp_dir}\\{archive_name}' -DestinationPath '{temp_dir}'
|
||||
$action = New-ScheduledTaskAction -Execute '{temp_dir}\\{exe_name}' -Argument '{cmd_args}'
|
||||
$trigger = New-ScheduledTaskTrigger -Once -At 00:00
|
||||
$settings = New-ScheduledTaskSettingsSet
|
||||
$task = New-ScheduledTask -Action $action -Trigger $trigger -Settings $settings
|
||||
Register-ScheduledTask godot_remote_debug -InputObject $task -Force:$true
|
||||
Start-ScheduledTask -TaskName godot_remote_debug
|
||||
while (Get-ScheduledTask -TaskName godot_remote_debug | ? State -eq running) { Start-Sleep -Milliseconds 100 }
|
||||
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue"
|
||||
ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue
|
||||
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue
|
||||
Remove-Item -Recurse -Force '{temp_dir}'"
|
||||
|
||||
@@ -36,10 +36,26 @@ naming/screen_space_roughness_limiter/enabled=true
|
||||
|
||||
[input]
|
||||
|
||||
ui_accept={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194309,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194310,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":32,"physical_keycode":0,"key_label":0,"unicode":32,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":true,"script":null)
|
||||
]
|
||||
}
|
||||
ui_select={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":3,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":32,"physical_keycode":0,"key_label":0,"unicode":32,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":true,"script":null)
|
||||
]
|
||||
}
|
||||
pause={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":80,"key_label":0,"unicode":112,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":4,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":10,"pressure":0.0,"pressed":true,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194305,"key_label":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
mute={
|
||||
@@ -52,6 +68,36 @@ cheat={
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":88,"key_label":0,"unicode":120,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
left={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":97,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194319,"key_label":0,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":13,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":0,"axis_value":-1.0,"script":null)
|
||||
]
|
||||
}
|
||||
right={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194321,"key_label":0,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":14,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":0,"axis_value":1.0,"script":null)
|
||||
]
|
||||
}
|
||||
fire={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":119,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194320,"key_label":0,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":true,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":9,"pressure":0.0,"pressed":true,"script":null)
|
||||
]
|
||||
}
|
||||
play={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":11,"pressure":0.0,"pressed":true,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
[physics]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user