Cow_Life_Sim_RPG/Locations/Town/JuiceCafe/JuiceCafe.gd

28 lines
707 B
GDScript

extends "res://Locations/Location.gd"
var rng = RandomNumberGenerator.new()
func _ready():
play_entry_sounds()
func initialize_entry_locations():
entryLocations.append(Vector2(0, -5))
func initialize_camera_limits():
outside = false
leftCameraLimit = -440
rightCameraLimit = 440
upperCameraLimit = -750
lowerCameraLimit = 0
func play_entry_sounds():
var bellSounds = []
bellSounds.append(load("res://Sounds/SFX/Door/Bell/shopbell1.mp3"))
bellSounds.append(load("res://Sounds/SFX/Door/Bell/shopbell2.mp3"))
bellSounds.append(load("res://Sounds/SFX/Door/Bell/shopbell3.mp3"))
var soundIndex = rng.randi_range(0, bellSounds.size() - 1)
$Bell.stream = bellSounds[soundIndex]
$Bell.play()