Music autoplays through levels

This commit is contained in:
Logan 2020-07-23 11:36:28 -05:00
parent 4dde0a79b5
commit 2ff0e9625c
21 changed files with 348 additions and 129 deletions

Binary file not shown.

View file

@ -0,0 +1,21 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/Endless Pain of Nightmares.WAV-d070559b7108485e1ba4d18d7e664454.sample"
[deps]
source_file="res://Music and Fonts(Misc.)/Endless Pain of Nightmares.WAV"
dest_files=[ "res://.import/Endless Pain of Nightmares.WAV-d070559b7108485e1ba4d18d7e664454.sample" ]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop=false
compress/mode=0

View file

@ -1,4 +1,5 @@
[gd_resource type="DynamicFontData" format=2]
[resource]
antialiased = false
font_path = "res://Music and Fonts(Misc.)/m5x7.ttf"

View file

@ -3,7 +3,6 @@
[ext_resource path="res://art/SpinningBone.png" type="Texture" id=1]
[ext_resource path="res://ai/Script/SpinningBone.gd" type="Script" id=2]
[sub_resource type="Animation" id=1]
resource_name = "Bone Throw"
length = 0.5

View file

@ -1,7 +1,7 @@
extends KinematicBody2D
class_name EnemyProjectile
export var speed = 200
export var speed = 150
var velocity = Vector2.ZERO
var damage = 0.5

BIN
art/lever.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 B

34
art/lever.png.import Normal file
View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/lever.png-2dc2995a81cdee8289449895bb71623a.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/lever.png"
dest_files=[ "res://.import/lever.png-2dc2995a81cdee8289449895bb71623a.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,6 +1,5 @@
[gd_scene load_steps=7 format=2]
[gd_scene load_steps=6 format=2]
[ext_resource path="res://Music and Fonts(Misc.)/Hawaii Partii - Stranded Lullaby(8-Bit).wav" type="AudioStream" id=1]
[ext_resource path="res://npc/Wizard.tscn" type="PackedScene" id=2]
[ext_resource path="res://objects/Door.tscn" type="PackedScene" id=3]
[ext_resource path="res://objects/torch.tscn" type="PackedScene" id=4]
@ -9,11 +8,6 @@
[node name="World" type="Node2D"]
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 1 )
volume_db = -21.204
autoplay = true
[node name="Door" parent="." instance=ExtResource( 3 )]
position = Vector2( 180, 128 )
next_scene = "res://levels/Campaign/Level 1/Level 1.tscn"

View file

@ -1,5 +1,5 @@
extends Beam
func _ready():
energy_cost = 0
energy_cost = 1
damage = 0.5

View file

@ -3,6 +3,6 @@ extends Projectile
func _ready():
$FireSound.play(0.0)
energy_cost = 0
energy_cost = 1
damage = 0.5

9
meta/Music.tscn Normal file
View file

@ -0,0 +1,9 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://Music and Fonts(Misc.)/Endless Pain of Nightmares.WAV" type="AudioStream" id=1]
[node name="Node" type="Node"]
[node name="MainMusic" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 1 )
volume_db = -2.0

74
music credits.TXT Normal file
View file

@ -0,0 +1,74 @@
Title:
NES Shooter Music (5 tracks, 3 jingles)
Author:
SketchyLogic
URL:
https://opengameart.org/content/nes-shooter-music-5-tracks-3-jingles
License(s):
* CC0 ( http://creativecommons.org/publicdomain/zero/1.0/legalcode )
File(s):
* FTM.zip
* WAV.zip
----------------------------------------
Title:
Endless Pain of Nightmares
Author:
nene
URL:
https://opengameart.org/content/endless-pain-of-nightmares
License(s):
* CC0 ( http://creativecommons.org/publicdomain/zero/1.0/legalcode )
File(s):
* Endless Pain of Nightmares.mid
* Endless Pain of Nightmares.WAV
----------------------------------------
Title:
8 Bit The Hero
Author:
ShwiggityShwag
URL:
https://opengameart.org/content/8-bit-the-hero
License(s):
* CC0 ( http://creativecommons.org/publicdomain/zero/1.0/legalcode )
File(s):
* The Hero.ogg
----------------------------------------
Title:
Boss Battle #2 ["8 bit"]
Author:
nene
URL:
https://opengameart.org/content/boss-battle-2-8-bit
License(s):
* CC0 ( http://creativecommons.org/publicdomain/zero/1.0/legalcode )
File(s):
* boss_battle_#2.mid
* boss_battle_#2.WAV
----------------------------------------

View file

@ -14,6 +14,9 @@ var current_line
signal dialogue_finished
func _ready():
Music.get_node("MainMusic").play(0.0)
func _process(delta):
var p = Player.position
if p.x > position.x:

View file

@ -7,7 +7,7 @@ onready var door = get_node("AnimationPlayer")
func _process(delta):
if $Area2D.get_overlapping_bodies().size() != 0:
if true:
if unlocked:
$Label.text = "F to Open"
if Input.is_action_just_pressed("open"):
Player.current_scene = next_scene

23
objects/Lever.gd Normal file
View file

@ -0,0 +1,23 @@
extends Sprite
signal on
signal off
export var lock: bool = true
var active = false
func _process(delta):
if $Area2D.get_overlapping_bodies().size() != 0:
$Label.visible = true
if Input.is_action_just_pressed("open") and not active:
emit_signal("on")
active = true
frame = 1
elif Input.is_action_just_pressed("open") and active and not lock:
emit_signal("off")
active = false
frame = 0
else:
$Label.visible = false

35
objects/Lever.tscn Normal file
View file

@ -0,0 +1,35 @@
[gd_scene load_steps=6 format=2]
[ext_resource path="res://art/lever.png" type="Texture" id=1]
[ext_resource path="res://Music and Fonts(Misc.)/m5x7.tres" type="DynamicFontData" id=2]
[ext_resource path="res://objects/Lever.gd" type="Script" id=3]
[sub_resource type="DynamicFont" id=2]
font_data = ExtResource( 2 )
[sub_resource type="CircleShape2D" id=1]
radius = 21.0238
[node name="Lever" type="Sprite"]
position = Vector2( 0, -8 )
texture = ExtResource( 1 )
hframes = 2
script = ExtResource( 3 )
[node name="Label" type="Label" parent="."]
margin_left = -39.0
margin_top = -31.0
margin_right = 39.0
margin_bottom = -17.0
custom_fonts/font = SubResource( 2 )
text = "F to Interact"
align = 1
valign = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Area2D" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
shape = SubResource( 1 )

View file

@ -66,6 +66,7 @@ IconLoaderGithub="*res://addons/github-integration/scripts/IconLoaderGithub.gd"
RestHandler="*res://addons/github-integration/scripts/RestHandler.gd"
Globals="*res://script/globals.gd"
Player="*res://Player/PlayerVariables.gd"
Music="*res://meta/Music.tscn"
[debug]

View file

@ -52,7 +52,7 @@ anims/SlideIn = SubResource( 1 )
anims/SlideOut = SubResource( 2 )
[node name="Inventory" type="Sprite" parent="."]
position = Vector2( 160, -55 )
position = Vector2( 160, -57 )
texture = ExtResource( 1 )
[node name="Conduits" type="Node2D" parent="Inventory"]

View file

@ -6,7 +6,6 @@
[ext_resource path="res://ui/Energy.png" type="Texture" id=4]
[ext_resource path="res://ui/Energy Burnout.png" type="Texture" id=5]
[node name="Stats" type="CanvasLayer"]
script = ExtResource( 1 )
@ -40,8 +39,8 @@ margin_left = 4.0
margin_top = -5.0
margin_right = -64.0
margin_bottom = -16.0
max_value = 20.0
value = 20.0
max_value = 10.0
value = 10.0
texture_progress = ExtResource( 4 )
__meta__ = {
"_edit_use_anchors_": false