Pickup Party Physics, part 15!

This commit is contained in:
JesusLuvsYooh 2024-07-25 11:31:48 +01:00
parent 968577ea11
commit 43685b124f
61 changed files with 6353 additions and 1286 deletions

View File

@ -1,206 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3350161566424659706
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1357295079658837445}
- component: {fileID: 6414208444886493924}
- component: {fileID: 7067323468124357061}
- component: {fileID: 4167309113991024219}
- component: {fileID: 1373717341218114730}
- component: {fileID: 3800001110859265949}
- component: {fileID: -3308771739656446756}
- component: {fileID: -337159362936431399}
m_Layer: 0
m_Name: PickupObject
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1357295079658837445
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3350161566424659706}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 2.6, y: -0.41, z: 2.7}
m_LocalScale: {x: 0.5, y: 1, z: 0.5}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &6414208444886493924
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3350161566424659706}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &7067323468124357061
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3350161566424659706}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 45d1084478c6d423da655089775d56a2, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!65 &4167309113991024219
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3350161566424659706}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!54 &1373717341218114730
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3350161566424659706}
serializedVersion: 4
m_Mass: 1
m_Drag: 0.1
m_AngularDrag: 0.1
m_CenterOfMass: {x: 0, y: 0, z: 0}
m_InertiaTensor: {x: 1, y: 1, z: 1}
m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_ImplicitCom: 1
m_ImplicitTensor: 1
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 1
--- !u!114 &3800001110859265949
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3350161566424659706}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a553cb17010b2403e8523b558bffbc14, type: 3}
m_Name:
m_EditorClassIdentifier:
syncDirection: 0
syncMode: 0
syncInterval: 0
target: {fileID: 1357295079658837445}
syncPosition: 1
syncRotation: 1
syncScale: 0
onlySyncOnChange: 1
compressRotation: 1
interpolatePosition: 1
interpolateRotation: 1
interpolateScale: 0
coordinateSpace: 0
sendIntervalMultiplier: 3
timelineOffset: 0
showGizmos: 0
showOverlay: 0
overlayColor: {r: 0, g: 0, b: 0, a: 0.5}
bufferResetMultiplier: 3
changedDetection: 1
positionSensitivity: 0.01
rotationSensitivity: 0.01
scaleSensitivity: 0.01
--- !u!114 &-3308771739656446756
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3350161566424659706}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9b91ecbcc199f4492b9a91e820070131, type: 3}
m_Name:
m_EditorClassIdentifier:
sceneId: 0
_assetId: 1184563065
serverOnly: 0
visibility: 0
hasSpawned: 0
--- !u!114 &-337159362936431399
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3350161566424659706}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d95a3d991242d4718977902608114040, type: 3}
m_Name:
m_EditorClassIdentifier:
pickupRigidbody: {fileID: 1373717341218114730}
pickupCollider: {fileID: 4167309113991024219}
networkTransform: {fileID: 3800001110859265949}
playerHolder: {fileID: 0}

View File

@ -1,6 +1,7 @@
fileFormatVersion: 2
guid: ab3b3f71325c24893869dd9f6c9bf556
PrefabImporter:
guid: 4facf9f66feb44a8da4f31ee3a1e14cf
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:

View File

@ -14,6 +14,7 @@ GameObject:
- component: {fileID: 9184944476735203567}
- component: {fileID: 4892178587342672605}
- component: {fileID: 1780178369352687266}
- component: {fileID: 4999314757453016244}
m_Layer: 0
m_Name: PickupChalkLongColoured
m_TagString: Untagged
@ -133,7 +134,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
sceneId: 0
_assetId: 1302157646
_assetId: 1072706199
serverOnly: 0
visibility: 0
hasSpawned: 0
@ -153,6 +154,25 @@ MonoBehaviour:
pickupCollider: {fileID: 9113390223865671775}
networkTransform: {fileID: 9184944476735203567}
playerHolder: {fileID: 0}
--- !u!114 &4999314757453016244
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 554305395009856133}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b168737e109924b7ea74e361300db21f, type: 3}
m_Name:
m_EditorClassIdentifier:
syncDirection: 0
syncMode: 0
syncInterval: 0
cachedMaterial: {fileID: 0}
color:
serializedVersion: 2
rgba: 4278190080
--- !u!1001 &7537242518953892556
PrefabInstance:
m_ObjectHideFlags: 0
@ -224,36 +244,8 @@ PrefabInstance:
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 0601e5e0761864fe68970761bea44f62,
type: 3}
insertIndex: -1
addedObject: {fileID: 6821112381721340016}
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 0601e5e0761864fe68970761bea44f62, type: 3}
--- !u!1 &7230744649990317981 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 0601e5e0761864fe68970761bea44f62,
type: 3}
m_PrefabInstance: {fileID: 7537242518953892556}
m_PrefabAsset: {fileID: 0}
--- !u!114 &6821112381721340016
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7230744649990317981}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a91a718a70d01b347b75cb768a6f1a92, type: 3}
m_Name:
m_EditorClassIdentifier:
syncDirection: 0
syncMode: 0
syncInterval: 0
color:
serializedVersion: 2
rgba: 4278190080
--- !u!4 &8003762259069959463 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 0601e5e0761864fe68970761bea44f62,

View File

@ -14,6 +14,7 @@ GameObject:
- component: {fileID: 2783739658601580604}
- component: {fileID: 1921595015120691595}
- component: {fileID: 2180922178403878518}
- component: {fileID: 1368718800921671203}
m_Layer: 0
m_Name: PickupChalkShortColoured
m_TagString: Untagged
@ -133,7 +134,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
sceneId: 0
_assetId: 880514189
_assetId: 195800184
serverOnly: 0
visibility: 0
hasSpawned: 0
@ -153,6 +154,24 @@ MonoBehaviour:
pickupCollider: {fileID: 2192957612375881960}
networkTransform: {fileID: 2783739658601580604}
playerHolder: {fileID: 0}
--- !u!114 &1368718800921671203
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4787222366602310171}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b168737e109924b7ea74e361300db21f, type: 3}
m_Name:
m_EditorClassIdentifier:
syncDirection: 0
syncMode: 0
syncInterval: 0
color:
serializedVersion: 2
rgba: 4278190080
--- !u!1001 &9195703681270822627
PrefabInstance:
m_ObjectHideFlags: 0
@ -224,36 +243,8 @@ PrefabInstance:
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 73168de20980d453eb9a96a61664fcd7,
type: 3}
insertIndex: -1
addedObject: {fileID: 619022868395563225}
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 73168de20980d453eb9a96a61664fcd7, type: 3}
--- !u!1 &8312758804838812594 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 73168de20980d453eb9a96a61664fcd7,
type: 3}
m_PrefabInstance: {fileID: 9195703681270822627}
m_PrefabAsset: {fileID: 0}
--- !u!114 &619022868395563225
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8312758804838812594}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a91a718a70d01b347b75cb768a6f1a92, type: 3}
m_Name:
m_EditorClassIdentifier:
syncDirection: 0
syncMode: 0
syncInterval: 0
color:
serializedVersion: 2
rgba: 4278190080
--- !u!4 &8653397009628877064 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 73168de20980d453eb9a96a61664fcd7,

View File

@ -14,6 +14,7 @@ GameObject:
- component: {fileID: 7991662279683009363}
- component: {fileID: 2620979091624209002}
- component: {fileID: 5264422104784615426}
- component: {fileID: 4702035821717647363}
m_Layer: 0
m_Name: PickupCrayon
m_TagString: Untagged
@ -153,6 +154,24 @@ MonoBehaviour:
pickupCollider: {fileID: 2739369298602236925}
networkTransform: {fileID: 7991662279683009363}
playerHolder: {fileID: 0}
--- !u!114 &4702035821717647363
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5079738540719071054}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b168737e109924b7ea74e361300db21f, type: 3}
m_Name:
m_EditorClassIdentifier:
syncDirection: 0
syncMode: 0
syncInterval: 0
color:
serializedVersion: 2
rgba: 4278190080
--- !u!1001 &4643990284772990485
PrefabInstance:
m_ObjectHideFlags: 0
@ -229,11 +248,7 @@ PrefabInstance:
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: c192f935a8a914ec186a0d7e928c192a,
type: 3}
insertIndex: -1
addedObject: {fileID: 3506225731455231265}
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: c192f935a8a914ec186a0d7e928c192a, type: 3}
--- !u!4 &5186033450846468606 stripped
Transform:
@ -241,27 +256,3 @@ Transform:
type: 3}
m_PrefabInstance: {fileID: 4643990284772990485}
m_PrefabAsset: {fileID: 0}
--- !u!1 &5526951790245798724 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: c192f935a8a914ec186a0d7e928c192a,
type: 3}
m_PrefabInstance: {fileID: 4643990284772990485}
m_PrefabAsset: {fileID: 0}
--- !u!114 &3506225731455231265
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5526951790245798724}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a91a718a70d01b347b75cb768a6f1a92, type: 3}
m_Name:
m_EditorClassIdentifier:
syncDirection: 0
syncMode: 0
syncInterval: 0
color:
serializedVersion: 2
rgba: 4278190080

View File

@ -14,6 +14,7 @@ GameObject:
- component: {fileID: 1480435262380293563}
- component: {fileID: 8818878242652262281}
- component: {fileID: 4789082806487785184}
- component: {fileID: 7441463936613718168}
m_Layer: 0
m_Name: PickupPaintTin
m_TagString: Untagged
@ -153,6 +154,24 @@ MonoBehaviour:
pickupCollider: {fileID: 2502692313652415529}
networkTransform: {fileID: 1480435262380293563}
playerHolder: {fileID: 0}
--- !u!114 &7441463936613718168
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7969466291425303323}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b168737e109924b7ea74e361300db21f, type: 3}
m_Name:
m_EditorClassIdentifier:
syncDirection: 0
syncMode: 0
syncInterval: 0
color:
serializedVersion: 2
rgba: 4278190080
--- !u!1001 &1288430148345446241
PrefabInstance:
m_ObjectHideFlags: 0
@ -229,11 +248,7 @@ PrefabInstance:
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: aa2ceef4b685340c69abdd2d761ee3cd,
type: 3}
insertIndex: -1
addedObject: {fileID: 5592702802968154305}
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: aa2ceef4b685340c69abdd2d761ee3cd, type: 3}
--- !u!4 &1615619197926496394 stripped
Transform:
@ -241,27 +256,3 @@ Transform:
type: 3}
m_PrefabInstance: {fileID: 1288430148345446241}
m_PrefabAsset: {fileID: 0}
--- !u!1 &2098683702812181040 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: aa2ceef4b685340c69abdd2d761ee3cd,
type: 3}
m_PrefabInstance: {fileID: 1288430148345446241}
m_PrefabAsset: {fileID: 0}
--- !u!114 &5592702802968154305
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2098683702812181040}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a91a718a70d01b347b75cb768a6f1a92, type: 3}
m_Name:
m_EditorClassIdentifier:
syncDirection: 0
syncMode: 0
syncInterval: 0
color:
serializedVersion: 2
rgba: 4278190080

View File

@ -14,6 +14,7 @@ GameObject:
- component: {fileID: 1259858912182983357}
- component: {fileID: 8291715382060344692}
- component: {fileID: 2897126679107243476}
- component: {fileID: 6062182286588450117}
m_Layer: 0
m_Name: PickupSprayPaintCan
m_TagString: Untagged
@ -153,6 +154,24 @@ MonoBehaviour:
pickupCollider: {fileID: 957874725378652403}
networkTransform: {fileID: 1259858912182983357}
playerHolder: {fileID: 0}
--- !u!114 &6062182286588450117
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 791787283473868617}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b168737e109924b7ea74e361300db21f, type: 3}
m_Name:
m_EditorClassIdentifier:
syncDirection: 0
syncMode: 0
syncInterval: 0
color:
serializedVersion: 2
rgba: 4278190080
--- !u!1001 &8896251901713084076
PrefabInstance:
m_ObjectHideFlags: 0
@ -229,36 +248,8 @@ PrefabInstance:
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: f3fe0e2a4ca404555b1694d544ce1f8e,
type: 3}
insertIndex: -1
addedObject: {fileID: 6751795993838934852}
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: f3fe0e2a4ca404555b1694d544ce1f8e, type: 3}
--- !u!1 &8625726072850043901 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: f3fe0e2a4ca404555b1694d544ce1f8e,
type: 3}
m_PrefabInstance: {fileID: 8896251901713084076}
m_PrefabAsset: {fileID: 0}
--- !u!114 &6751795993838934852
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8625726072850043901}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a91a718a70d01b347b75cb768a6f1a92, type: 3}
m_Name:
m_EditorClassIdentifier:
syncDirection: 0
syncMode: 0
syncInterval: 0
color:
serializedVersion: 2
rgba: 4278190080
--- !u!4 &9007037098732882247 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: f3fe0e2a4ca404555b1694d544ce1f8e,

View File

@ -1,85 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &6978974387750546780
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1062778843848523349}
- component: {fileID: 8389380643536978851}
- component: {fileID: 7223330181636649155}
m_Layer: 0
m_Name: VisibleRangeSphere
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 4294967295
m_IsActive: 1
--- !u!4 &1062778843848523349
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6978974387750546780}
serializedVersion: 2
m_LocalRotation: {x: -0, y: 0.92387956, z: -0, w: 0.38268343}
m_LocalPosition: {x: -20, y: 1, z: 20}
m_LocalScale: {x: 10, y: 10, z: 10}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 135, z: 0}
--- !u!33 &8389380643536978851
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6978974387750546780}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &7223330181636649155
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6978974387750546780}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: a7c679cf124f7ae46a0291ea35848554, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: e9a60fd64a6794855b20af40191fc385
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,65 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Mirror;
namespace Mirror.Examples.PhysicsPickupParty
{
public class PickupManager : NetworkBehaviour
{
public SceneReference sceneReference;
public GameObject[] pickupArray;
public Transform spawnPoint;
public int maxSpawns = 10;
public int currentSpawns = 0;
public float spawnInterval = 5;
public int spawnRange = 4;
//public override void OnStartServer()
//{
// removed in favour of waiting until game starts, and then call the interval
// StartCoroutine(StartPickupInterval());
//}
public IEnumerator StartPickupInterval()
{
while (currentSpawns < maxSpawns)
{
yield return new WaitForSeconds(spawnInterval);
if (currentSpawns < maxSpawns)
{
// extra check in case amounts changed since timers waited
SpawnPickup();
currentSpawns += 1;
}
}
}
public void SpawnPickup()
{
Vector3 randomPosition = new Vector3(
Random.Range(spawnPoint.position.x - spawnRange, spawnPoint.position.x + spawnRange),
spawnPoint.position.y,
Random.Range(spawnPoint.position.z - spawnRange, spawnPoint.position.z + spawnRange));
Quaternion randomRotation = Random.rotation;
GameObject networkedPickup = Instantiate(pickupArray[Random.Range(0, pickupArray.Length)],
randomPosition,
randomRotation);
NetworkServer.Spawn(networkedPickup);
RpcPlayAudio();
}
[ClientRpc]
public void RpcPlayAudio()
{
PlayAudio();
}
public void PlayAudio()
{
sceneReference.spawnPickupSound.Play();
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 87c437f8cf330463897963a108958a5c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -29,6 +29,9 @@ public class PlayerPickupParty : NetworkBehaviour
public Renderer[] playerRenderers;
public Material materialTeamColour;
public AudioSource[] jumpSounds;
public AudioSource pickupSound, dropSound, Arm1Sound, Arm2Sound;
[SyncVar(hook = nameof(OnTeamChanged))]
public int teamID = -1; // use -1 so 0 triggers hook
@ -100,10 +103,14 @@ void Update()
if (slotActive == 0)
{
slotActive = 1;
PlayAudio(3);
CmdPlayAudio(3);
}
else
{
slotActive = 0;
PlayAudio(4);
CmdPlayAudio(4);
}
}
@ -145,6 +152,8 @@ void PlayerMovement()
if (Input.GetKeyDown(KeyCode.Space))
{
verticalSpeed = jumpSpeed;
PlayAudio(5);
CmdPlayAudio(5);
}
}
else
@ -212,10 +221,14 @@ void Interact()
{
playerArmSlots[slotActive].CmdPickup(playerArmSlots[slotActive].pickupObject.GetComponent<NetworkIdentity>());
canPickup = false;
PlayAudio(1);
CmdPlayAudio(1);
}
else if (playerArmSlots[slotActive].pickedUpNetworkObject != null)
{
playerArmSlots[slotActive].CmdDrop();
PlayAudio(2);
CmdPlayAudio(2);
}
}
#endif
@ -229,5 +242,41 @@ public void OnDestroy()
cameraFollow.transform.localEulerAngles = new Vector3(90, 0, 0);
}
}
[Command]
public void CmdPlayAudio(int _value)
{
RpcPlayAudio(_value);
}
[ClientRpc(includeOwner = false)]
public void RpcPlayAudio(int _value)
{
PlayAudio(_value);
}
public void PlayAudio(int _value)
{
if (_value == 1)
{
pickupSound.Play();
}
else if (_value == 2)
{
dropSound.Play();
}
else if (_value == 3)
{
Arm1Sound.Play();
}
else if (_value == 4)
{
Arm2Sound.Play();
}
else if (_value == 5)
{
jumpSounds[Random.Range(0,jumpSounds.Length)].Play();
}
}
}
}

View File

@ -0,0 +1,35 @@
using UnityEngine;
namespace Mirror.Examples.PhysicsPickupParty
{
[AddComponentMenu("")]
public class RandomColor : NetworkBehaviour
{
// Unity clones the material when GetComponent<Renderer>().material is called
// Cache it here and destroy it in OnDestroy to prevent a memory leak
Material cachedMaterial;
// Color32 packs to 4 bytes
[SyncVar(hook = nameof(SetColor))]
public Color32 color = Color.black;
void SetColor(Color32 _, Color32 newColor)
{
if (cachedMaterial == null) cachedMaterial = GetComponentInChildren<Renderer>().material;
cachedMaterial.color = newColor;
}
public override void OnStartServer()
{
// Only set the color once. Players may be respawned,
// and we don't want to keep changing their colors.
if (color == Color.black)
color = Random.ColorHSV(0f, 1f, 1f, 1f, 0.5f, 1f);
}
void OnDestroy()
{
Destroy(cachedMaterial);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b168737e109924b7ea74e361300db21f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -13,6 +13,7 @@ public class SceneReference : MonoBehaviour
public PlayerPickupParty playerPickupParty;
public TeamManager teamManager;
public ZonesManager zonesManager;
public PickupManager pickupManager;
public Text gameStartTimer, roundEndTimer;
public Button skipGameStartTimerButton;
public GameObject panelControls, panelInfo, panelGameStartTimer, panelRoundEndTimer, panelEndGame;
@ -21,6 +22,8 @@ public class SceneReference : MonoBehaviour
public Text[] scoresTeam;
public Image[] scoresTeamImageColour;
public AudioSource winSound, loseSound, spawnPickupSound, UIButtonSound, scoreSound, startGameSound, BGSoundWaiting, BGSoundGameplay;
private void Start()
@ -48,6 +51,7 @@ public void SkipGameStartTimerButton()
{
teamManager.gameStartTime = 0;
}
PlayUIButtonSound();
}
public void UpdateScoresUI(int _index, int _teamID, int _score)
@ -63,12 +67,19 @@ public void EndGameUI()
{
panelEndGame.SetActive(true);
winObj.SetActive(true);
winSound.Play();
}
else
{
panelEndGame.SetActive(true);
loseObj.SetActive(true);
loseSound.Play();
}
}
public void PlayUIButtonSound()
{
UIButtonSound.Play();
}
}
}

View File

@ -65,6 +65,7 @@ private IEnumerator GameStartTimerCountdown()
{
gameStatus = 1;
StartCoroutine(RoundEndTimerCountdown());
StartCoroutine(sceneReference.pickupManager.StartPickupInterval());
}
}
@ -78,6 +79,10 @@ public void OnGameStartTimerChanged(int _old, int _new)
{
sceneReference.gameStartTimer.text = "Go!";
sceneReference.playerPickupParty.cameraFollow.enabled = true;
sceneReference.startGameSound.Play();
sceneReference.BGSoundGameplay.Play();
sceneReference.BGSoundWaiting.Stop();
}
}
@ -115,6 +120,14 @@ public void OnGameStatusChanged(int _old, int _new)
public void OnRoundEndTimerChanged(int _old, int _new)
{
sceneReference.roundEndTimer.text = roundEndTime + "s";
if (roundEndTime <= 0)
{
sceneReference.startGameSound.Play();
sceneReference.BGSoundGameplay.Stop();
sceneReference.BGSoundWaiting.volume = 0.3f;
sceneReference.BGSoundWaiting.Play();
}
}
private IEnumerator RoundEndTimerCountdown()
@ -128,6 +141,7 @@ private IEnumerator RoundEndTimerCountdown()
{
gameStatus = 2;
StartCoroutine(RestartRoundCountdown());
sceneReference.pickupManager.currentSpawns = sceneReference.pickupManager.maxSpawns;
}
}

View File

@ -6,6 +6,8 @@ namespace Mirror.Examples.PhysicsPickupParty
{
public class Zones : MonoBehaviour
{
// this needs to only run on server?
private PickupObject pickupObject;
public TextMesh textMesh;
public byte zonesID = 0;

View File

@ -39,6 +39,11 @@ public void UpdateScores(int _zonesID, int _score)
Array.Copy(scoresSyncVars, temp, scoresSyncVars.Length);
temp[_zonesID] += _score;
scoresSyncVars = temp;
if (sceneReference.playerPickupParty.teamID == _zonesID)
{
RpcPlayAudio();
}
}
public void CalculateZoneWinnersList()
@ -63,5 +68,16 @@ public void CalculateZoneWinnersList()
sceneReference.UpdateScoresUI(2,zoneResultsListTuple[2].Item2, zoneResultsListTuple[2].Item1);
sceneReference.UpdateScoresUI(3,zoneResultsListTuple[3].Item2, zoneResultsListTuple[3].Item1);
}
[ClientRpc]
public void RpcPlayAudio()
{
PlayAudio();
}
public void PlayAudio()
{
sceneReference.scoreSound.Play();
}
}
}

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 564a8b3a45fc74fbba43f8a4715ae1a1
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: a8a951b60b40e4fbebe8a6bdff6ed109
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: a243d18bcac2640b08f8b48647de2f24
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 58f98275ff2ad4f38aeb2d16554cb178
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 9c725e679ef774aaebbe3109eb1f1a75
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 2fd3cbc494c2c41ce93f6d975ba14547
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: dbeb9eede79d844e39235d9344ccb354
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 4b0a9857e35454f33a6312589ad3349a
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 497b3cb67769748b480f41bf582a0a6a
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: ad2e2f2950fd1428d800558bcd9a5b4d
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: d41d0a866b7c14ec18d57e114bdb04ad
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 999d6a723033c4890a3b8f2e5e786b38
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 9d50016b6f7d24f23bc36ae052658e35
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 791bb473421074e31b933203094ddba9
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 1d5e6167462154652b4c26e488f77192
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant: