1
0
mirror of https://github.com/JohnBreaux/Boat-Battle.git synced 2025-02-04 12:28:35 +00:00

Merge branch 'game-logic' of github.com:StatewideInk/Group12 into game-logic

This commit is contained in:
2021-11-13 23:58:47 -06:00
12 changed files with 38 additions and 7 deletions

View File

@@ -6,3 +6,6 @@ extends Node
# Ask for a scene change
signal button_clicked
signal ship_hit
signal ship_missed
signal ship_sunk

View File

@@ -9,9 +9,22 @@ extends Control
func _ready():
var _errno = 0
_errno += AudioBus.connect("button_clicked", self, "_button_clicked")
_errno += AudioBus.connect("ship_hit", self, "_ship_hit")
_errno += AudioBus.connect("ship_missed", self, "_ship_missed")
_errno += AudioBus.connect("ship_sunk", self, "_ship_sunk")
func _button_clicked():
$buttonSFX.play()
func _ship_hit():
$shipHitSFX.play()
func _ship_missed():
$shipMissedSFX.play()
func _ship_sunk():
$shipSunkSFX.play()
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass