PLAYTEST 20230318

This commit is contained in:
Paul Black 2023-03-18 12:47:09 -06:00
parent 81a2c8cf40
commit daf57a5289
5 changed files with 329 additions and 9 deletions

View file

@ -62,6 +62,7 @@ offset_bottom = 241.0
text = "Toyland"
[node name="islands" type="Button" parent="."]
layout_mode = 0
offset_left = 646.0
offset_top = 249.0
offset_right = 797.0

File diff suppressed because one or more lines are too long

View file

@ -123,7 +123,7 @@ offset_left = 4.0
offset_top = 622.0
offset_right = 94.0
offset_bottom = 648.0
text = "Version: ALPHA"
text = "Version: PLAYTEST 20230318"
[node name="OurTimeIsNowSolo" type="Sprite2D" parent="."]
position = Vector2(123, 104)

View file

@ -22,7 +22,7 @@ var teddyAuthorityID # Defined from teddy.gd after object is initalized
var miniMenuResume = false # Set to true by mainmenu.gd
var roundInSession = false # Goes true once the round is started in Teddy.gd
var HUDStartLabelText = "" # The text displayed at the bottom of the screen of the server
var lastPersonToHitMe = 0 # Defined in the Bullet RPC
var lastPersonToHitMe = "" # Defined in the Bullet RPC
var HUDPlayerDied = false # Tells the HUD.gd script that a point should be added or deducted
var connectedPlayers = [] # Currently connected players by their name (NOT THEIR ID)
var connectedPlayersByPeerID = [] # Currently connected players by their ID
@ -94,7 +94,7 @@ func reset_variables_hard():
teddyAuthorityID = null
miniMenuResume = false
HUDStartLabelText = ""
lastPersonToHitMe = 0
lastPersonToHitMe = ""
HUDPlayerDied = false
respawnTimeModifier = 1.0
menuLightSwitch = false
@ -139,9 +139,15 @@ func spawn_locations():
spawnCoords_y[0] = 2.85
spawnCoords_z[0] = 11.41
elif mapName == "Islands":
spawnCoords_x.resize(1)
spawnCoords_y.resize(1)
spawnCoords_z.resize(1)
spawnCoords_x.resize(3)
spawnCoords_y.resize(3)
spawnCoords_z.resize(3)
spawnCoords_x[0] = -1.32
spawnCoords_y[0] = 20
spawnCoords_z[0] = 2.92
spawnCoords_x[1] = 92.46
spawnCoords_y[1] = 14
spawnCoords_z[1] = 47.90
spawnCoords_x[2] = 88.84
spawnCoords_y[2] = 30
spawnCoords_z[2] = -81.81

View file

@ -2,14 +2,54 @@ extends Node3D
@onready var mapNode = get_node("/root/islands")
var mapPath = "res://scenes/islands.tscn"
var audio_stream_player = AudioStreamPlayer.new()
func _ready():
Global.currentMapNode = mapNode
Global.currentMapPath = mapPath
Global.playerHealth = 100
Global.fatigue = 100
Global.playerYDeath = -100
Global.playerYDeath = -50
func _process(delta):
pass
if audio_stream_player.playing == false:
var randomnum = RandomNumberGenerator.new().randi_range(0, 6)
if randomnum == 0:
play_music(load("res://music/alexander-nakarada-chase.mp3"))
Global.musicName = "Chase"
Global.musicAuthor = "Alexander Nakarada"
elif randomnum == 1:
play_music(load("res://music/DRIVE.mp3"))
Global.musicName = "DRIVE"
Global.musicAuthor = "Alex-Productions"
elif randomnum == 2:
play_music(load("res://music/Fluffing-a-Duck.mp3"))
Global.musicName = "Fluffing a Duck"
Global.musicAuthor = "Kevin MacLeod"
elif randomnum == 3:
play_music(load("res://music/Monkeys-Spinning-Monkeys.mp3"))
Global.musicName = "Monkeys Spinning Monkeys"
Global.musicAuthor = "Kevin MacLeod"
elif randomnum == 4:
play_music(load("res://music/Run-Amok.mp3"))
Global.musicName = "Run Amok"
Global.musicAuthor = "Kevin MacLeod"
elif randomnum == 5:
play_music(load("res://music/Sneaky-Snitch.mp3"))
Global.musicName = "Sneaky Snitch"
Global.musicAuthor = "Kevin MacLeod"
elif randomnum == 6:
play_music(load("res://music/Wallpaper.mp3"))
Global.musicName = "Wallpaper"
Global.musicAuthor = "Kevin MacLeod"
else:
print("This shouldn't ever be called, toyland.gd")
Global.musicUpdated = true
print("hehe")
func play_music(music):
audio_stream_player.set_stream(music)
add_child(audio_stream_player)
audio_stream_player.play()