Added music and updated teddy models + animations

This commit is contained in:
Paul Black 2023-03-10 23:24:39 -07:00
parent 510b5a53b9
commit 61f6c2898a
40 changed files with 369 additions and 42 deletions

View file

@ -99,14 +99,17 @@ func _physics_process(delta):
var input_dir = Input.get_vector("player_left", "player_right", "player_forward", "player_backward")
var direction = (neck.transform.basis * Vector3(input_dir.x, 0, input_dir.y)).normalized()
if input_dir:
rpc("teddy_walk_anim")
if not Input.is_action_pressed("sprint"):
rpc("teddy_play_anim", "walk")
else:
rpc("teddy_play_anim", "idle")
if Input.is_action_pressed("sprint"):
if Global.fatigue > 5:
SPEED = 10.0
if Global.fatigue < 5:
SPEED = 2.0
if Input.is_action_pressed("sprint"):
pass
rpc("teddy_play_anim", "run")
elif Global.fatigue > 5:
SPEED = 5.0
if Input.is_action_just_released("sprint"):
@ -155,9 +158,9 @@ func remote_set_position(authority_position, teddy_rotation, bulletgenerator_pos
$CollisionShape3D/Neck/Camera3D/BulletGenerator.global_position = bulletgenerator_position
$CollisionShape3D/Neck/Camera3D/BulletGenerator.global_rotation = bulletgenerator_rotation
@rpc("any_peer", "reliable")
func teddy_walk_anim():
$CollisionShape3D/Neck/Teddy/AnimationPlayer.play("mixamocom")
@rpc("any_peer", "unreliable")
func teddy_play_anim(animation):
$CollisionShape3D/Neck/Teddy/AnimationPlayer.play(animation)
@rpc("any_peer", "unreliable")
func shoot_bullet():

View file

@ -3,9 +3,9 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://cro0qy8p8j1nc"
path.etc2="res://.godot/imported/Teddy-de34648a55743de65735b80db47e8535_BrownFabric.png-e262ea1b1791f537d156e62ada10e3d9.etc2.ctex"
path.s3tc="res://.godot/imported/Teddy-de34648a55743de65735b80db47e8535_BrownFabric.png-e262ea1b1791f537d156e62ada10e3d9.s3tc.ctex"
metadata={
"imported_formats": ["etc2_astc"],
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
generator_parameters={}
@ -13,7 +13,7 @@ generator_parameters={}
[deps]
source_file="res://characters/teddy/model/Teddy-de34648a55743de65735b80db47e8535_BrownFabric.png"
dest_files=["res://.godot/imported/Teddy-de34648a55743de65735b80db47e8535_BrownFabric.png-e262ea1b1791f537d156e62ada10e3d9.etc2.ctex"]
dest_files=["res://.godot/imported/Teddy-de34648a55743de65735b80db47e8535_BrownFabric.png-e262ea1b1791f537d156e62ada10e3d9.s3tc.ctex"]
[params]

View file

@ -3,9 +3,9 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://t4uhkvweq55l"
path.etc2="res://.godot/imported/Teddy-de34648a55743de65735b80db47e8535_BrownFabricBelly.png-f48e4aaa79e2a0cf3814c7dbef28823a.etc2.ctex"
path.s3tc="res://.godot/imported/Teddy-de34648a55743de65735b80db47e8535_BrownFabricBelly.png-f48e4aaa79e2a0cf3814c7dbef28823a.s3tc.ctex"
metadata={
"imported_formats": ["etc2_astc"],
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
generator_parameters={}
@ -13,7 +13,7 @@ generator_parameters={}
[deps]
source_file="res://characters/teddy/model/Teddy-de34648a55743de65735b80db47e8535_BrownFabricBelly.png"
dest_files=["res://.godot/imported/Teddy-de34648a55743de65735b80db47e8535_BrownFabricBelly.png-f48e4aaa79e2a0cf3814c7dbef28823a.etc2.ctex"]
dest_files=["res://.godot/imported/Teddy-de34648a55743de65735b80db47e8535_BrownFabricBelly.png-f48e4aaa79e2a0cf3814c7dbef28823a.s3tc.ctex"]
[params]

View file

@ -3,9 +3,9 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://c1fr5ak803h0k"
path.etc2="res://.godot/imported/Teddy-de34648a55743de65735b80db47e8535_FabricNose.png-12c7438645ca0861b049ecee40b0b65c.etc2.ctex"
path.s3tc="res://.godot/imported/Teddy-de34648a55743de65735b80db47e8535_FabricNose.png-12c7438645ca0861b049ecee40b0b65c.s3tc.ctex"
metadata={
"imported_formats": ["etc2_astc"],
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
generator_parameters={}
@ -13,7 +13,7 @@ generator_parameters={}
[deps]
source_file="res://characters/teddy/model/Teddy-de34648a55743de65735b80db47e8535_FabricNose.png"
dest_files=["res://.godot/imported/Teddy-de34648a55743de65735b80db47e8535_FabricNose.png-12c7438645ca0861b049ecee40b0b65c.etc2.ctex"]
dest_files=["res://.godot/imported/Teddy-de34648a55743de65735b80db47e8535_FabricNose.png-12c7438645ca0861b049ecee40b0b65c.s3tc.ctex"]
[params]

Binary file not shown.

View file

@ -0,0 +1,32 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://b3l10agcjfgdx"
path="res://.godot/imported/teddy.glb-ebbf9bd3c2e74b718cf629c296ed53f2.scn"
[deps]
source_file="res://characters/teddy/model_glb/teddy.glb"
dest_files=["res://.godot/imported/teddy.glb-ebbf9bd3c2e74b718cf629c296ed53f2.scn"]
[params]
nodes/root_type="Node3D"
nodes/root_name="Scene Root"
nodes/apply_root_scale=true
nodes/root_scale=1.0
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
import_script/path=""
_subresources={}
gltf/embedded_image_handling=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 MiB

View file

@ -0,0 +1,36 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bcx8hi3wfgmjm"
path.s3tc="res://.godot/imported/teddy_BrownFabric.png-a0848c50880febd342859d548681f9c4.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
generator_parameters={}
[deps]
source_file="res://characters/teddy/model_glb/teddy_BrownFabric.png"
dest_files=["res://.godot/imported/teddy_BrownFabric.png-a0848c50880febd342859d548681f9c4.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 MiB

View file

@ -0,0 +1,36 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b25on3sg58fj0"
path.s3tc="res://.godot/imported/teddy_BrownFabricBelly.png-1bd897be98ecc156ecc97dbffeccc079.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
generator_parameters={}
[deps]
source_file="res://characters/teddy/model_glb/teddy_BrownFabricBelly.png"
dest_files=["res://.godot/imported/teddy_BrownFabricBelly.png-1bd897be98ecc156ecc97dbffeccc079.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 MiB

View file

@ -0,0 +1,36 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://r61f275fmhx0"
path.s3tc="res://.godot/imported/teddy_FabricNose.png-d56f6fc7c66beaf71d8f62ebfefbaa3e.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
generator_parameters={}
[deps]
source_file="res://characters/teddy/model_glb/teddy_FabricNose.png"
dest_files=["res://.godot/imported/teddy_FabricNose.png-d56f6fc7c66beaf71d8f62ebfefbaa3e.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0

BIN
music/DRIVE.mp3 Normal file

Binary file not shown.

19
music/DRIVE.mp3.import Normal file
View file

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://bn6t4eda6urs0"
path="res://.godot/imported/DRIVE.mp3-1558016f0474d30c5ba646ef3d6cb5d2.mp3str"
[deps]
source_file="res://music/DRIVE.mp3"
dest_files=["res://.godot/imported/DRIVE.mp3-1558016f0474d30c5ba646ef3d6cb5d2.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

BIN
music/Fall-From-Grace.mp3 Normal file

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://ccbshroalxbnl"
path="res://.godot/imported/Fall-From-Grace.mp3-392869c8de5595c61f7a0e06863ded15.mp3str"
[deps]
source_file="res://music/Fall-From-Grace.mp3"
dest_files=["res://.godot/imported/Fall-From-Grace.mp3-392869c8de5595c61f7a0e06863ded15.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

BIN
music/Fluffing-a-Duck.mp3 Normal file

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://b68xsl1egw7db"
path="res://.godot/imported/Fluffing-a-Duck.mp3-048daba38e8683f8a9a42d84d459360a.mp3str"
[deps]
source_file="res://music/Fluffing-a-Duck.mp3"
dest_files=["res://.godot/imported/Fluffing-a-Duck.mp3-048daba38e8683f8a9a42d84d459360a.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://6td2m07prwaw"
path="res://.godot/imported/Monkeys-Spinning-Monkeys.mp3-318fc32cd1aaaff25d5ee55e7b561e6a.mp3str"
[deps]
source_file="res://music/Monkeys-Spinning-Monkeys.mp3"
dest_files=["res://.godot/imported/Monkeys-Spinning-Monkeys.mp3-318fc32cd1aaaff25d5ee55e7b561e6a.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

BIN
music/Run-Amok.mp3 Normal file

Binary file not shown.

19
music/Run-Amok.mp3.import Normal file
View file

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://dbe17v61itleq"
path="res://.godot/imported/Run-Amok.mp3-ea46dd888bd28a24c175a8436c4e36b1.mp3str"
[deps]
source_file="res://music/Run-Amok.mp3"
dest_files=["res://.godot/imported/Run-Amok.mp3-ea46dd888bd28a24c175a8436c4e36b1.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

BIN
music/Sneaky-Snitch.mp3 Normal file

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://dqt3w0gxdp8u5"
path="res://.godot/imported/Sneaky-Snitch.mp3-d4c1e606b81753b2dd4a64724746bb0c.mp3str"
[deps]
source_file="res://music/Sneaky-Snitch.mp3"
dest_files=["res://.godot/imported/Sneaky-Snitch.mp3-d4c1e606b81753b2dd4a64724746bb0c.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

BIN
music/Wallpaper.mp3 Normal file

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://dob7iy2o7km3p"
path="res://.godot/imported/Wallpaper.mp3-5db3bfa1d7f0e3b2585acdfed8dc64ad.mp3str"
[deps]
source_file="res://music/Wallpaper.mp3"
dest_files=["res://.godot/imported/Wallpaper.mp3-5db3bfa1d7f0e3b2585acdfed8dc64ad.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://cnx8k5lconyym"
path="res://.godot/imported/alexander-nakarada-chase.mp3-2ed56b05c227a593faf93f66c39eadb7.mp3str"
[deps]
source_file="res://music/alexander-nakarada-chase.mp3"
dest_files=["res://.godot/imported/alexander-nakarada-chase.mp3-2ed56b05c227a593faf93f66c39eadb7.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View file

@ -49,6 +49,6 @@ func damage_player(): # This can be used later to make sure the server and all o
@rpc("any_peer", "call_remote")
func take_damage(damager):
var damage = RandomNumberGenerator.new().randf_range(7.0, 16.0)
var damage = RandomNumberGenerator.new().randi_range(7, 16)
Global.playerHealth = Global.playerHealth - damage
Global.lastPersonToHitMe = damager

View file

@ -3,16 +3,16 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://dnobq0anmbln8"
path.etc2="res://.godot/imported/Wood050_2K_Color.jpg-e6185de0fa12ff4588e435b3845fb87e.etc2.ctex"
path.s3tc="res://.godot/imported/Wood050_2K_Color.jpg-e6185de0fa12ff4588e435b3845fb87e.s3tc.ctex"
metadata={
"imported_formats": ["etc2_astc"],
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://objects/toyland/Wood050_2K_Color.jpg"
dest_files=["res://.godot/imported/Wood050_2K_Color.jpg-e6185de0fa12ff4588e435b3845fb87e.etc2.ctex"]
dest_files=["res://.godot/imported/Wood050_2K_Color.jpg-e6185de0fa12ff4588e435b3845fb87e.s3tc.ctex"]
[params]

View file

@ -3,16 +3,16 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://cmhq2gjngssxg"
path.etc2="res://.godot/imported/newplaster.jpg-c0159d01e1a6adffe0c3bf5b8dcfc7a7.etc2.ctex"
path.s3tc="res://.godot/imported/newplaster.jpg-c0159d01e1a6adffe0c3bf5b8dcfc7a7.s3tc.ctex"
metadata={
"imported_formats": ["etc2_astc"],
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://objects/toyland/newplaster.jpg"
dest_files=["res://.godot/imported/newplaster.jpg-c0159d01e1a6adffe0c3bf5b8dcfc7a7.etc2.ctex"]
dest_files=["res://.godot/imported/newplaster.jpg-c0159d01e1a6adffe0c3bf5b8dcfc7a7.s3tc.ctex"]
[params]

View file

@ -3,9 +3,9 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://c4brgjvonnjkr"
path.etc2="res://.godot/imported/toyland-acc3ec7302587eef6111479be4ff2e5f_Wood050_2K_Color.png-09e60c6431251b5cdad5e7603ca8ef91.etc2.ctex"
path.s3tc="res://.godot/imported/toyland-acc3ec7302587eef6111479be4ff2e5f_Wood050_2K_Color.png-09e60c6431251b5cdad5e7603ca8ef91.s3tc.ctex"
metadata={
"imported_formats": ["etc2_astc"],
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
generator_parameters={}
@ -13,7 +13,7 @@ generator_parameters={}
[deps]
source_file="res://objects/toyland/toyland-acc3ec7302587eef6111479be4ff2e5f_Wood050_2K_Color.png"
dest_files=["res://.godot/imported/toyland-acc3ec7302587eef6111479be4ff2e5f_Wood050_2K_Color.png-09e60c6431251b5cdad5e7603ca8ef91.etc2.ctex"]
dest_files=["res://.godot/imported/toyland-acc3ec7302587eef6111479be4ff2e5f_Wood050_2K_Color.png-09e60c6431251b5cdad5e7603ca8ef91.s3tc.ctex"]
[params]

View file

@ -3,9 +3,9 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://ql40b60xucke"
path.etc2="res://.godot/imported/toyland-acc3ec7302587eef6111479be4ff2e5f_newplaster.png-56bf5185a878e2d32e5a25ec8c8517fb.etc2.ctex"
path.s3tc="res://.godot/imported/toyland-acc3ec7302587eef6111479be4ff2e5f_newplaster.png-56bf5185a878e2d32e5a25ec8c8517fb.s3tc.ctex"
metadata={
"imported_formats": ["etc2_astc"],
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
generator_parameters={}
@ -13,7 +13,7 @@ generator_parameters={}
[deps]
source_file="res://objects/toyland/toyland-acc3ec7302587eef6111479be4ff2e5f_newplaster.png"
dest_files=["res://.godot/imported/toyland-acc3ec7302587eef6111479be4ff2e5f_newplaster.png-56bf5185a878e2d32e5a25ec8c8517fb.etc2.ctex"]
dest_files=["res://.godot/imported/toyland-acc3ec7302587eef6111479be4ff2e5f_newplaster.png-56bf5185a878e2d32e5a25ec8c8517fb.s3tc.ctex"]
[params]

View file

@ -3,9 +3,9 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://cj28kq4i36gcg"
path.etc2="res://.godot/imported/toyland-acc3ec7302587eef6111479be4ff2e5f_windows_xp_bliss-wide.png-c0ea880c9d43e5d1d8d800dd069f83dd.etc2.ctex"
path.s3tc="res://.godot/imported/toyland-acc3ec7302587eef6111479be4ff2e5f_windows_xp_bliss-wide.png-c0ea880c9d43e5d1d8d800dd069f83dd.s3tc.ctex"
metadata={
"imported_formats": ["etc2_astc"],
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
generator_parameters={}
@ -13,7 +13,7 @@ generator_parameters={}
[deps]
source_file="res://objects/toyland/toyland-acc3ec7302587eef6111479be4ff2e5f_windows_xp_bliss-wide.png"
dest_files=["res://.godot/imported/toyland-acc3ec7302587eef6111479be4ff2e5f_windows_xp_bliss-wide.png-c0ea880c9d43e5d1d8d800dd069f83dd.etc2.ctex"]
dest_files=["res://.godot/imported/toyland-acc3ec7302587eef6111479be4ff2e5f_windows_xp_bliss-wide.png-c0ea880c9d43e5d1d8d800dd069f83dd.s3tc.ctex"]
[params]

View file

@ -3,16 +3,16 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://co6sxyhce6s7"
path.etc2="res://.godot/imported/windows_xp_bliss-wide.jpg-b027b98d80d6be8ceaca628f4dcf54ce.etc2.ctex"
path.s3tc="res://.godot/imported/windows_xp_bliss-wide.jpg-b027b98d80d6be8ceaca628f4dcf54ce.s3tc.ctex"
metadata={
"imported_formats": ["etc2_astc"],
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://objects/toyland/windows_xp_bliss-wide.jpg"
dest_files=["res://.godot/imported/windows_xp_bliss-wide.jpg-b027b98d80d6be8ceaca628f4dcf54ce.etc2.ctex"]
dest_files=["res://.godot/imported/windows_xp_bliss-wide.jpg-b027b98d80d6be8ceaca628f4dcf54ce.s3tc.ctex"]
[params]

View file

@ -3,16 +3,16 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://b6f2baaxv23qx"
path.etc2="res://.godot/imported/woodfloor4k.jpg.001.jpg-e2bdf4950350ecebed41e5db675a15f9.etc2.ctex"
path.s3tc="res://.godot/imported/woodfloor4k.jpg.001.jpg-e2bdf4950350ecebed41e5db675a15f9.s3tc.ctex"
metadata={
"imported_formats": ["etc2_astc"],
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://objects/toyland/woodfloor4k.jpg.001.jpg"
dest_files=["res://.godot/imported/woodfloor4k.jpg.001.jpg-e2bdf4950350ecebed41e5db675a15f9.etc2.ctex"]
dest_files=["res://.godot/imported/woodfloor4k.jpg.001.jpg-e2bdf4950350ecebed41e5db675a15f9.s3tc.ctex"]
[params]

View file

@ -1,7 +1,7 @@
[gd_scene load_steps=5 format=3 uid="uid://dp1q51kvd8uow"]
[ext_resource type="Script" path="res://characters/teddy/Teddy.gd" id="1_ywxo5"]
[ext_resource type="PackedScene" uid="uid://gw6tb1oyx3vj" path="res://characters/teddy/model_scene/teddy.tscn" id="2_63i6c"]
[ext_resource type="PackedScene" path="res://characters/teddy/model_glb/teddy.glb" id="2_22nhn"]
[sub_resource type="BoxShape3D" id="BoxShape3D_rpt2n"]
size = Vector3(1, 1.99126, 1)
@ -27,8 +27,8 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.859224, 0)
[node name="BulletGenerator" type="Marker3D" parent="CollisionShape3D/Neck/Camera3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.104801, -0.858231)
[node name="Teddy" parent="CollisionShape3D/Neck" instance=ExtResource("2_63i6c")]
transform = Transform3D(-0.319764, 1.11529e-16, -2.79546e-08, 1.11529e-16, 0.319764, -1.11529e-16, 2.79546e-08, -1.11529e-16, -0.319764, 2.08165e-12, -1.90215, 2.08165e-12)
[node name="Teddy" parent="CollisionShape3D/Neck" instance=ExtResource("2_22nhn")]
transform = Transform3D(-0.32, 0, -2.79753e-08, 0, 0.32, 0, 2.79753e-08, 0, -0.32, 0, -1.92932, 0)
[node name="sound" type="AudioStreamPlayer3D" parent="."]

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=11 format=3 uid="uid://dtvtu8w6b5es0"]
[gd_scene load_steps=12 format=3 uid="uid://dtvtu8w6b5es0"]
[ext_resource type="Script" path="res://scripts/mainmenu.gd" id="1_w5lhm"]
[ext_resource type="Texture2D" uid="uid://p427bphnxyjc" path="res://2DArt/Main Menu/Background.jpg" id="2_xwdfd"]
@ -10,6 +10,7 @@
[ext_resource type="Texture2D" uid="uid://c8q2aon4qw0xp" path="res://2DArt/Main Menu/CreditUnselected.png" id="8_h20ni"]
[ext_resource type="Texture2D" uid="uid://ds6ymkq367mdi" path="res://2DArt/Main Menu/CreditSelected.png" id="8_plwex"]
[ext_resource type="Texture2D" uid="uid://deqe3xaqpv1xf" path="res://splashes/OurTimeIsNow_Solo.png" id="10_oafyi"]
[ext_resource type="AudioStream" uid="uid://ccbshroalxbnl" path="res://music/Fall-From-Grace.mp3" id="11_6irkm"]
[node name="mainmenu" type="Control"]
layout_mode = 3
@ -136,6 +137,10 @@ position = Vector2(123, 104)
scale = Vector2(0.170075, 0.170075)
texture = ExtResource("10_oafyi")
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource("11_6irkm")
autoplay = true
[connection signal="pressed" from="Button" to="." method="_on_button_pressed"]
[connection signal="mouse_entered" from="playButton" to="." method="_on_play_button_mouse_entered"]
[connection signal="mouse_exited" from="playButton" to="." method="_on_play_button_mouse_exited"]

View file

@ -10,9 +10,12 @@ func _ready():
$playButton.visible = false
$OurTimeIsNowSolo.visible = false
$Button.disabled = false
$AudioStreamPlayer.playing = false
func _process(delta):
pass
if Global.playingGame == false:
if $AudioStreamPlayer.playing == false:
$AudioStreamPlayer.playing = true
func _on_button_pressed():
if Global.playingGame == false:

View file

@ -1,6 +1,7 @@
extends Node
@onready var mapNode = get_node("/root/toyland")
var audio_stream_player = AudioStreamPlayer.new()
func _ready():
Global.currentMapNode = mapNode
@ -10,4 +11,27 @@ func _ready():
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"))
elif randomnum == 1:
play_music(load("res://music/DRIVE.mp3"))
elif randomnum == 2:
play_music(load("res://music/Fluffing-a-Duck.mp3"))
elif randomnum == 3:
play_music(load("res://music/Monkeys-Spinning-Monkeys.mp3"))
elif randomnum == 4:
play_music(load("res://music/Run-Amok.mp3"))
elif randomnum == 5:
play_music(load("res://music/Sneaky-Snitch.mp3"))
elif randomnum == 6:
play_music(load("res://music/Wallpaper.mp3"))
else:
print("This shouldn't ever be called, toyland.gd")
func play_music(music):
audio_stream_player.set_stream(music)
add_child(audio_stream_player)
audio_stream_player.play()