Merge branch 'develop' into feature/enemies

This commit is contained in:
Chris Cromer 2022-07-23 13:07:55 -04:00
commit 332ac5b028
Signed by: cromer
GPG Key ID: FA91071797BEEEC2
7 changed files with 55 additions and 2 deletions

BIN
godot/assets/music/level2.ogg (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,15 @@
[remap]
importer="ogg_vorbis"
type="AudioStreamOGGVorbis"
path="res://.import/level2.ogg-0cba17639fcb1c4e45dc4f01c5837760.oggstr"
[deps]
source_file="res://assets/music/level2.ogg"
dest_files=[ "res://.import/level2.ogg-0cba17639fcb1c4e45dc4f01c5837760.oggstr" ]
[params]
loop=true
loop_offset=0

View File

@ -1,9 +1,11 @@
[gd_scene load_steps=5 format=2]
[gd_scene load_steps=7 format=2]
[ext_resource path="res://CameraLimit.gdns" type="Script" id=1]
[ext_resource path="res://characters/player/Player.tscn" type="PackedScene" id=2]
[ext_resource path="res://assets/backgrounds/hills.png" type="Texture" id=3]
[ext_resource path="res://levels/Level2.tmx" type="PackedScene" id=4]
[ext_resource path="res://assets/music/level2.ogg" type="AudioStream" id=5]
[ext_resource path="res://levels/MusicPlayer.gd" type="Script" id=6]
[node name="Level2" type="Node2D"]
@ -39,3 +41,8 @@ centered = false
[node name="Level2" parent="Map" instance=ExtResource( 4 )]
script = ExtResource( 1 )
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
pause_mode = 2
stream = ExtResource( 5 )
script = ExtResource( 6 )

View File

@ -0,0 +1,16 @@
extends AudioStreamPlayer
# there is currently a bug with AudioStreamPlayer
# it doesn't pause when the tree is paused
# so let's manually check if paused and pause the audio
# for this to work pause mode for the node is set to process instead of inherit
func _physics_process(_delta: float) -> void:
if get_tree().paused and playing:
stop()
playing = false
elif not get_tree().paused and not playing:
play()
playing = true

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=12 format=2]
[gd_scene load_steps=14 format=2]
[ext_resource path="res://assets/fonts/data/PixelOperator.tres" type="DynamicFontData" id=1]
[ext_resource path="res://assets/fonts/data/PixelOperator-Bold.tres" type="DynamicFontData" id=2]
@ -42,6 +42,13 @@ corner_radius_top_right = 5
corner_radius_bottom_right = 5
corner_radius_bottom_left = 5
[sub_resource type="InputEventAction" id=17]
action = "ui_accept"
pressed = true
[sub_resource type="ShortCut" id=18]
shortcut = SubResource( 17 )
[sub_resource type="StyleBoxFlat" id=15]
bg_color = Color( 0.239216, 0.239216, 0.239216, 1 )
corner_radius_top_left = 5
@ -160,7 +167,9 @@ margin_bottom = 61.0
focus_mode = 0
custom_fonts/font = SubResource( 11 )
custom_styles/normal = SubResource( 12 )
shortcut_in_tooltip = false
enabled_focus_mode = 0
shortcut = SubResource( 18 )
text = "Ingresar"
script = ExtResource( 5 )

View File

@ -99,6 +99,8 @@ func _ready() -> void:
func _physics_process(_delta: float) -> void:
if monitor_enabled:
if not $MonitorGUI.visible:
$MonitorGUI.visible = true
if started and not get_tree().paused:
var frame = empty_frame.duplicate(true)
frame["coins"] = coins

View File

@ -10,5 +10,6 @@ monitor_enabled = true
use_development_url = true
[node name="MonitorGUI" parent="." instance=ExtResource( 3 )]
visible = false
[node name="HTTPRequest" type="HTTPRequest" parent="."]