aboutsummaryrefslogtreecommitdiff
path: root/game
diff options
context:
space:
mode:
Diffstat (limited to 'game')
-rw-r--r--game/FPS.gd9
-rw-r--r--game/Game.gd5
-rw-r--r--game/Game.tscn17
-rw-r--r--game/Interface.tscn6
-rw-r--r--game/Pause.gd10
-rw-r--r--game/characters/player/Player.gd8
6 files changed, 30 insertions, 25 deletions
diff --git a/game/FPS.gd b/game/FPS.gd
index 8b4c50f..688437d 100644
--- a/game/FPS.gd
+++ b/game/FPS.gd
@@ -1,16 +1,7 @@
extends Label
-
-# Declare member variables here. Examples:
-# var a = 2
-# var b = "text"
-
-
-# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
-
-# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_delta: float) -> void:
set_text("FPS " + String(Engine.get_frames_per_second()))
diff --git a/game/Game.gd b/game/Game.gd
index 0463af4..2bf346f 100644
--- a/game/Game.gd
+++ b/game/Game.gd
@@ -8,10 +8,11 @@ extends Node2D
# Called when the node enters the scene tree for the first time.
func _ready():
+
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
-func _process(delta):
+#func _process(delta):
- pass
+# pass
diff --git a/game/Game.tscn b/game/Game.tscn
index e0bf6cb..ccfd590 100644
--- a/game/Game.tscn
+++ b/game/Game.tscn
@@ -1,4 +1,4 @@
-[gd_scene load_steps=8 format=2]
+[gd_scene load_steps=9 format=2]
[ext_resource path="res://game/Game.gd" type="Script" id=1]
[ext_resource path="res://game/Interface.tscn" type="PackedScene" id=2]
@@ -6,6 +6,7 @@
[ext_resource path="res://assets/images/white.png" type="Texture" id=4]
[ext_resource path="res://game/characters/player/Player.gd" type="Script" id=5]
[ext_resource path="res://game/Pause.gd" type="Script" id=6]
+[ext_resource path="res://assets/audio/Happy Bee.mp3" type="AudioStream" id=7]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 8, 8 )
@@ -13,6 +14,11 @@ extents = Vector2( 8, 8 )
[node name="World" type="Node2D"]
script = ExtResource( 1 )
+[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
+pause_mode = 2
+stream = ExtResource( 7 )
+autoplay = true
+
[node name="HUD" type="CanvasLayer" parent="."]
[node name="Interface" parent="HUD" instance=ExtResource( 2 )]
@@ -63,14 +69,14 @@ text = "Quit"
tile_set = ExtResource( 3 )
cell_size = Vector2( 16, 16 )
format = 1
-tile_data = PoolIntArray( 2031662, 0, 0, 2031663, 0, 0, 2031664, 0, 0, 2031665, 0, 0, 2031666, 0, 0, 2031667, 0, 0, 2031668, 0, 0, 2031669, 0, 0, 2031670, 0, 0, 2031671, 0, 0, 2031672, 0, 0, 2031673, 0, 0, 2031674, 0, 0, 2031675, 0, 0, 2031676, 0, 0, 2031677, 0, 0, 2031678, 0, 0, 2031679, 0, 0, 2031680, 0, 0, 2031681, 0, 0, 2031682, 0, 0, 2031683, 0, 0, 2031684, 0, 0, 2031685, 0, 0, 2031686, 0, 0, 2031687, 0, 0, 2031688, 0, 0, 2031689, 0, 0, 2031690, 0, 0, 2031691, 0, 0, 2031692, 0, 0, 2031693, 0, 0, 2031694, 0, 0, 2031695, 0, 0, 2424870, 0, 0, 2424871, 0, 0, 2424872, 0, 0, 2424873, 0, 0, 2424874, 0, 0, 2424875, 0, 0, 2424876, 0, 0, 2424877, 0, 0, 2424878, 0, 0, 2424879, 0, 0, 2424880, 0, 0, 2424881, 0, 0, 2424882, 0, 0, 2424883, 0, 0, 2424884, 0, 0, 2424885, 0, 0, 2424886, 0, 0, 2424887, 0, 0, 2424888, 0, 0, 2424889, 0, 0, 2424890, 0, 0, 2424891, 0, 0, 2424892, 0, 0, 2424893, 0, 0, 2424894, 0, 0, 2424895, 0, 0, 2424896, 0, 0, 2424897, 0, 0, 2424898, 0, 0, 2818048, 0, 0, 2818049, 0, 0, 2818050, 0, 0, 2818051, 0, 0, 2818052, 0, 0, 2818053, 0, 0, 2818054, 0, 0, 2818055, 0, 0, 2818056, 0, 0, 2818057, 0, 0, 2818058, 0, 0, 2818059, 0, 0, 2818060, 0, 0, 2818061, 0, 0, 2818062, 0, 0, 2818063, 0, 0, 2818064, 0, 0, 2818065, 0, 0, 2818066, 0, 0, 2818067, 0, 0, 2818068, 0, 0, 2818069, 0, 0, 2818070, 0, 0, 2818071, 0, 0, 2818072, 0, 0, 2818073, 0, 0, 2818074, 0, 0, 2818075, 0, 0, 2818076, 0, 0, 2818077, 0, 0, 2818078, 0, 0, 2818079, 0, 0, 2818080, 0, 0, 2818081, 0, 0, 2818082, 0, 0, 2818083, 0, 0, 2818084, 0, 0, 2818085, 0, 0, 2818086, 0, 0, 2818087, 0, 0, 2818088, 0, 0, 2818089, 0, 0, 2818090, 0, 0, 2818091, 0, 0, 2818092, 0, 0, 2818093, 0, 0, 2818094, 0, 0, 2818095, 0, 0, 2818096, 0, 0, 2818097, 0, 0, 2818098, 0, 0, 2818099, 0, 0, 2818100, 0, 0, 2818101, 0, 0, 2818102, 0, 0, 2818103, 0, 0, 2818104, 0, 0, 2818105, 0, 0, 2818106, 0, 0, 2818107, 0, 0, 2818108, 0, 0, 2818109, 0, 0, 2818110, 0, 0, 2818111, 0, 0, 2818112, 0, 0, 2818113, 0, 0, 2818114, 0, 0, 2818115, 0, 0, 2818116, 0, 0, 2818117, 0, 0, 2818118, 0, 0, 2818119, 0, 0, 2818120, 0, 0, 2818121, 0, 0, 2818122, 0, 0, 2818123, 0, 0, 2818124, 0, 0, 2818125, 0, 0, 2818126, 0, 0, 2818127, 0, 0, 2883584, 0, 0, 2883585, 0, 0, 2883586, 0, 0, 2883587, 0, 0, 2883588, 0, 0, 2883589, 0, 0, 2883590, 0, 0, 2883591, 0, 0, 2883592, 0, 0, 2883593, 0, 0, 2883594, 0, 0, 2883595, 0, 0, 2883596, 0, 0, 2883597, 0, 0, 2883598, 0, 0, 2883599, 0, 0, 2883600, 0, 0, 2883601, 0, 0, 2883602, 0, 0, 2883603, 0, 0, 2883604, 0, 0, 2883605, 0, 0, 2883606, 0, 0, 2883607, 0, 0, 2883608, 0, 0, 2883609, 0, 0, 2883610, 0, 0, 2883611, 0, 0, 2883612, 0, 0, 2883613, 0, 0, 2883614, 0, 0, 2883615, 0, 0, 2883616, 0, 0, 2883617, 0, 0, 2883618, 0, 0, 2883619, 0, 0, 2883620, 0, 0, 2883621, 0, 0, 2883622, 0, 0, 2883623, 0, 0, 2883624, 0, 0, 2883625, 0, 0, 2883626, 0, 0, 2883627, 0, 0, 2883628, 0, 0, 2883629, 0, 0, 2883630, 0, 0, 2883631, 0, 0, 2883632, 0, 0, 2883633, 0, 0, 2883634, 0, 0, 2883635, 0, 0, 2883636, 0, 0, 2883637, 0, 0, 2883638, 0, 0, 2883639, 0, 0, 2883640, 0, 0, 2883641, 0, 0, 2883642, 0, 0, 2883643, 0, 0, 2883644, 0, 0, 2883645, 0, 0, 2883646, 0, 0, 2883647, 0, 0, 2883648, 0, 0, 2883649, 0, 0, 2883650, 0, 0, 2883651, 0, 0, 2883652, 0, 0, 2883653, 0, 0, 2883654, 0, 0, 2883655, 0, 0, 2883656, 0, 0, 2883657, 0, 0, 2883658, 0, 0, 2883659, 0, 0, 2883660, 0, 0, 2883661, 0, 0, 2883662, 0, 0, 2883663, 0, 0 )
+tile_data = PoolIntArray( 2424870, 0, 0, 2424871, 0, 0, 2424872, 0, 0, 2424873, 0, 0, 2424874, 0, 0, 2424875, 0, 0, 2424876, 0, 0, 2424877, 0, 0, 2424878, 0, 0, 2424879, 0, 0, 2424880, 0, 0, 2424881, 0, 0, 2424882, 0, 0, 2424883, 0, 0, 2424884, 0, 0, 2424885, 0, 0, 2424886, 0, 0, 2424887, 0, 0, 2424888, 0, 0, 2424889, 0, 0, 2424890, 0, 0, 2424891, 0, 0, 2424892, 0, 0, 2424893, 0, 0, 2424894, 0, 0, 2424895, 0, 0, 2424896, 0, 0, 2424897, 0, 0, 2424898, 0, 0, 2424899, 0, 0, 2424900, 0, 0, 2424901, 0, 0, 2424902, 0, 0, 2424903, 0, 0, 2424904, 0, 0, 2424905, 0, 0, 2424906, 0, 0, 2424907, 0, 0, 2424908, 0, 0, 2424909, 0, 0, 2424910, 0, 0, 2424911, 0, 0, 2818048, 0, 0, 2818049, 0, 0, 2818050, 0, 0, 2818051, 0, 0, 2818052, 0, 0, 2818053, 0, 0, 2818054, 0, 0, 2818055, 0, 0, 2818056, 0, 0, 2818057, 0, 0, 2818058, 0, 0, 2818059, 0, 0, 2818060, 0, 0, 2818061, 0, 0, 2818062, 0, 0, 2818063, 0, 0, 2818064, 0, 0, 2818065, 0, 0, 2818066, 0, 0, 2818067, 0, 0, 2818068, 0, 0, 2818069, 0, 0, 2818070, 0, 0, 2818071, 0, 0, 2818072, 0, 0, 2818073, 0, 0, 2818074, 0, 0, 2818075, 0, 0, 2818076, 0, 0, 2818077, 0, 0, 2818078, 0, 0, 2818079, 0, 0, 2818080, 0, 0, 2818081, 0, 0, 2818082, 0, 0, 2818083, 0, 0, 2818084, 0, 0, 2818085, 0, 0, 2818086, 0, 0, 2818087, 0, 0, 2818088, 0, 0, 2818089, 0, 0, 2818090, 0, 0, 2818091, 0, 0, 2818092, 0, 0, 2818093, 0, 0, 2818094, 0, 0, 2818095, 0, 0, 2818096, 0, 0, 2818097, 0, 0, 2818098, 0, 0, 2818099, 0, 0, 2818100, 0, 0, 2818101, 0, 0, 2818102, 0, 0, 2818103, 0, 0, 2818104, 0, 0, 2818105, 0, 0, 2818106, 0, 0, 2818107, 0, 0, 2818108, 0, 0, 2818109, 0, 0, 2818110, 0, 0, 2818111, 0, 0, 2818112, 0, 0, 2818113, 0, 0, 2818114, 0, 0, 2818115, 0, 0, 2818116, 0, 0, 2818117, 0, 0, 2818118, 0, 0, 2818119, 0, 0, 2818120, 0, 0, 2818121, 0, 0, 2818122, 0, 0, 2818123, 0, 0, 2818124, 0, 0, 2818125, 0, 0, 2818126, 0, 0, 2818127, 0, 0, 2883584, 0, 0, 2883585, 0, 0, 2883586, 0, 0, 2883587, 0, 0, 2883588, 0, 0, 2883589, 0, 0, 2883590, 0, 0, 2883591, 0, 0, 2883592, 0, 0, 2883593, 0, 0, 2883594, 0, 0, 2883595, 0, 0, 2883596, 0, 0, 2883597, 0, 0, 2883598, 0, 0, 2883599, 0, 0, 2883600, 0, 0, 2883601, 0, 0, 2883602, 0, 0, 2883603, 0, 0, 2883604, 0, 0, 2883605, 0, 0, 2883606, 0, 0, 2883607, 0, 0, 2883608, 0, 0, 2883609, 0, 0, 2883610, 0, 0, 2883611, 0, 0, 2883612, 0, 0, 2883613, 0, 0, 2883614, 0, 0, 2883615, 0, 0, 2883616, 0, 0, 2883617, 0, 0, 2883618, 0, 0, 2883619, 0, 0, 2883620, 0, 0, 2883621, 0, 0, 2883622, 0, 0, 2883623, 0, 0, 2883624, 0, 0, 2883625, 0, 0, 2883626, 0, 0, 2883627, 0, 0, 2883628, 0, 0, 2883629, 0, 0, 2883630, 0, 0, 2883631, 0, 0, 2883632, 0, 0, 2883633, 0, 0, 2883634, 0, 0, 2883635, 0, 0, 2883636, 0, 0, 2883637, 0, 0, 2883638, 0, 0, 2883639, 0, 0, 2883640, 0, 0, 2883641, 0, 0, 2883642, 0, 0, 2883643, 0, 0, 2883644, 0, 0, 2883645, 0, 0, 2883646, 0, 0, 2883647, 0, 0, 2883648, 0, 0, 2883649, 0, 0, 2883650, 0, 0, 2883651, 0, 0, 2883652, 0, 0, 2883653, 0, 0, 2883654, 0, 0, 2883655, 0, 0, 2883656, 0, 0, 2883657, 0, 0, 2883658, 0, 0, 2883659, 0, 0, 2883660, 0, 0, 2883661, 0, 0, 2883662, 0, 0, 2883663, 0, 0 )
[node name="Player" type="KinematicBody2D" parent="."]
position = Vector2( 50, 600 )
script = ExtResource( 5 )
-MAXSPEED = 100
+MAXSPEED = 200
JUMPFORCE = 500
-ACCEL = 200
+ACCEL = 100
[node name="Sprite" type="Sprite" parent="Player"]
texture = ExtResource( 4 )
@@ -82,3 +88,6 @@ shape = SubResource( 1 )
current = true
zoom = Vector2( 0.5, 0.5 )
smoothing_enabled = true
+
+[connection signal="pressed" from="Pause/Pause/Overlay/CenterContainer/VBoxContainer/Resume" to="Pause/Pause" method="_on_Resume_pressed"]
+[connection signal="pressed" from="Pause/Pause/Overlay/CenterContainer/VBoxContainer/Quit" to="Pause/Pause" method="_on_Quit_pressed"]
diff --git a/game/Interface.tscn b/game/Interface.tscn
index fa0ea6e..ed071d2 100644
--- a/game/Interface.tscn
+++ b/game/Interface.tscn
@@ -11,13 +11,13 @@ margin_right = 67.0
margin_bottom = 40.0
[node name="FPS" type="Label" parent="VBoxContainer"]
-margin_right = 107.0
+margin_right = 83.0
margin_bottom = 14.0
text = "FPS"
script = ExtResource( 1 )
[node name="Money" type="Label" parent="VBoxContainer"]
margin_top = 18.0
-margin_right = 107.0
+margin_right = 83.0
margin_bottom = 32.0
-text = "Money Spent: $0"
+text = "Money Spent"
diff --git a/game/Pause.gd b/game/Pause.gd
index eae0f5e..ccdf132 100644
--- a/game/Pause.gd
+++ b/game/Pause.gd
@@ -5,3 +5,13 @@ func _input(event):
var new_pause_state = not get_tree().paused
get_tree().paused = new_pause_state
visible = new_pause_state
+
+
+func _on_Resume_pressed():
+ var new_pause_state = not get_tree().paused
+ get_tree().paused = new_pause_state
+ visible = new_pause_state
+
+
+func _on_Quit_pressed():
+ get_tree().quit()
diff --git a/game/characters/player/Player.gd b/game/characters/player/Player.gd
index ea87926..40d4148 100644
--- a/game/characters/player/Player.gd
+++ b/game/characters/player/Player.gd
@@ -9,10 +9,6 @@ export var ACCEL = 20
var motion = Vector2()
-# Called when the node enters the scene tree for the first time.
-func _ready():
- pass # Replace with function body.
-
func _physics_process(_delta):
@@ -34,9 +30,7 @@ func _physics_process(_delta):
if is_on_floor():
if Input.is_action_just_pressed("jump"):
motion.y = -JUMPFORCE
- pass
motion = move_and_slide(motion,UP)
-
- pass
+