ok ok
This commit is contained in:
1 parent
bec18d9382
commit
80b57276fa
24 files changed
+392
-84
No files matched your search
Executable
BIN
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 10a4e1180cb3be54da0d7d98dd327c8c
|
||||
guid: 613e0b85af271854f9d89cb48db1445b
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 7
|
||||
Executable
BIN
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1cdd6e27104267647b16db497f41744f
|
||||
guid: f5e946c296766694b97892f7386e533e
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 7
|
||||
Executable
BIN
Binary file not shown.
Executable
+23
@@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4ba402be6dacb3340a1c791560c97b97
|
||||
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:
|
||||
Executable
BIN
Binary file not shown.
Executable
+23
@@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0384b39259118674781276c265b83dec
|
||||
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:
|
||||
Binary file not shown.
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
+23
@@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b34b1ec00bb1ba643afcdc88ea960e06
|
||||
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:
|
||||
@@ -220,6 +220,64 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
ship: {fileID: 1093091269199902593}
|
||||
--- !u!1 &4508084525431060037
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7603488991399315273}
|
||||
- component: {fileID: 2362953346451262734}
|
||||
- component: {fileID: 6156246831092198731}
|
||||
m_Layer: 10
|
||||
m_Name: Audio
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &7603488991399315273
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4508084525431060037}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 3589635702276405719}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &2362953346451262734
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4508084525431060037}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 9bcaa1cfcea9cae4bb92bdc96cfbb4d2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
soundNames: 020000000300000004000000
|
||||
clips:
|
||||
- {fileID: 8300000, guid: 613e0b85af271854f9d89cb48db1445b, type: 3}
|
||||
- {fileID: 8300000, guid: 0384b39259118674781276c265b83dec, type: 3}
|
||||
- {fileID: 8300000, guid: b34b1ec00bb1ba643afcdc88ea960e06, type: 3}
|
||||
--- !u!81 &6156246831092198731
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4508084525431060037}
|
||||
m_Enabled: 1
|
||||
--- !u!1 &5535911989893287240
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -445,6 +503,7 @@ Transform:
|
||||
- {fileID: 1526924705325842294}
|
||||
- {fileID: 3869627124329100603}
|
||||
- {fileID: 2024927552184032925}
|
||||
- {fileID: 7603488991399315273}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &3273845117821321837
|
||||
|
||||
Regular → Executable
File mode changed.
Regular → Executable
+23
-11
@@ -865,13 +865,13 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 52048083}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 977.23474, y: -165.7302, z: -2086.4595}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &55853259
|
||||
PrefabInstance:
|
||||
@@ -3760,6 +3760,7 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 203474076}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: 0.7071068, z: -0, w: 0.7071068}
|
||||
m_LocalPosition: {x: 2578.8755, y: 251.83788, z: 212.81699}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
@@ -3767,7 +3768,6 @@ Transform:
|
||||
m_Children:
|
||||
- {fileID: 887408362}
|
||||
m_Father: {fileID: 766862835}
|
||||
m_RootOrder: -2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0}
|
||||
--- !u!114 &203474082
|
||||
MonoBehaviour:
|
||||
@@ -7726,13 +7726,13 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 475149571}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 3146.8, y: 251, z: 311.4}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &475769272
|
||||
PrefabInstance:
|
||||
@@ -10801,13 +10801,13 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 705507993}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0.27417248, y: -0.3337574, z: 0.3633117, w: 0.8254938}
|
||||
m_LocalPosition: {x: -365.9992, y: -2002.0156, z: -426.01685}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1906469785}
|
||||
m_RootOrder: -2
|
||||
m_LocalEulerAnglesHint: {x: -167.869, y: 129.88, z: -126.800995}
|
||||
--- !u!114 &705507997
|
||||
MonoBehaviour:
|
||||
@@ -11918,13 +11918,13 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 755742072}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0.9998229, z: -0, w: -0.018819254}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1136171772}
|
||||
m_RootOrder: -2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: -182.157, z: 0}
|
||||
--- !u!73398921 &755742074
|
||||
VFXRenderer:
|
||||
@@ -13763,13 +13763,13 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 887408361}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 203474081}
|
||||
m_RootOrder: -2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!73398921 &887408363
|
||||
VFXRenderer:
|
||||
@@ -14927,6 +14927,7 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 955820482}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -1773.5925, y: -52.500008, z: 877.1588}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
@@ -15356,7 +15357,6 @@ Transform:
|
||||
- {fileID: 1651403266}
|
||||
- {fileID: 112688477}
|
||||
m_Father: {fileID: 2050641105}
|
||||
m_RootOrder: -2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &956530159
|
||||
PrefabInstance:
|
||||
@@ -18699,6 +18699,7 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1136171767}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0.7071068, w: 0.7071068}
|
||||
m_LocalPosition: {x: 1654.8756, y: -183.06215, z: -2418.183}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
@@ -18706,7 +18707,6 @@ Transform:
|
||||
m_Children:
|
||||
- {fileID: 755742073}
|
||||
m_Father: {fileID: 766862835}
|
||||
m_RootOrder: -2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90}
|
||||
--- !u!114 &1136171773
|
||||
MonoBehaviour:
|
||||
@@ -32197,6 +32197,7 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1906469784}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.71074754, y: 0.5701635, z: -0.3333826, w: 0.24209014}
|
||||
m_LocalPosition: {x: 2416.41, y: 267.92, z: -1402}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
@@ -32204,7 +32205,6 @@ Transform:
|
||||
m_Children:
|
||||
- {fileID: 705507995}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!4 &1913193847 stripped
|
||||
Transform:
|
||||
@@ -33530,7 +33530,8 @@ PrefabInstance:
|
||||
propertyPath: m_Name
|
||||
value: Ship
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedComponents:
|
||||
- {fileID: 7510218262252450460, guid: 217f9c8f922f2d41cac52c3699bde478, type: 3}
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
@@ -34160,6 +34161,7 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2050641104}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 1773.5925, y: 52.500008, z: -877.1588}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
@@ -34167,7 +34169,6 @@ Transform:
|
||||
m_Children:
|
||||
- {fileID: 955820483}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &2059307177
|
||||
PrefabInstance:
|
||||
@@ -35798,3 +35799,14 @@ PrefabInstance:
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 87a51212e10250274a8feda6be865b7c, type: 3}
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
m_Roots:
|
||||
- {fileID: 52048085}
|
||||
- {fileID: 1906469785}
|
||||
- {fileID: 2050641105}
|
||||
- {fileID: 475149573}
|
||||
- {fileID: 766862834}
|
||||
- {fileID: 327871849}
|
||||
- {fileID: 2015948213}
|
||||
Regular → Executable
+41
-5
@@ -333,13 +333,13 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 705507993}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0.27417248, y: -0.3337574, z: 0.3633117, w: 0.8254938}
|
||||
m_LocalPosition: {x: 0, y: 100, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1906469785}
|
||||
m_RootOrder: -2
|
||||
m_LocalEulerAnglesHint: {x: -167.869, y: 129.88, z: -126.800995}
|
||||
--- !u!114 &705507997
|
||||
MonoBehaviour:
|
||||
@@ -536,6 +536,7 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 965851723}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0.9914445, z: -0, w: 0.13052872}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0.66, y: 0.66, z: 0.66}
|
||||
@@ -543,7 +544,6 @@ Transform:
|
||||
m_Children:
|
||||
- {fileID: 1556238047}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: -165, z: 0}
|
||||
--- !u!114 &1088368772 stripped
|
||||
MonoBehaviour:
|
||||
@@ -556,6 +556,28 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 385acf04d40a396a9a95f738b7353198, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &1359172646 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 4508084525431060037, guid: 217f9c8f922f2d41cac52c3699bde478, type: 3}
|
||||
m_PrefabInstance: {fileID: 5198188376350273124}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &1359172648
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1359172646}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 566ffe93221add0489d9a9a01670b93a, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
soundNames: 020000000300000004000000
|
||||
clips:
|
||||
- {fileID: 8300000, guid: 613e0b85af271854f9d89cb48db1445b, type: 3}
|
||||
- {fileID: 8300000, guid: 0384b39259118674781276c265b83dec, type: 3}
|
||||
- {fileID: 8300000, guid: b34b1ec00bb1ba643afcdc88ea960e06, type: 3}
|
||||
--- !u!1001 &1556238046
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -865,6 +887,7 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1906469784}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.71074754, y: 0.5701635, z: -0.3333826, w: 0.24209014}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
@@ -872,7 +895,6 @@ Transform:
|
||||
m_Children:
|
||||
- {fileID: 705507995}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1972710421 stripped
|
||||
MonoBehaviour:
|
||||
@@ -1157,10 +1179,15 @@ PrefabInstance:
|
||||
propertyPath: m_Name
|
||||
value: Ship
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedComponents:
|
||||
- {fileID: 2362953346451262734, guid: 217f9c8f922f2d41cac52c3699bde478, type: 3}
|
||||
- {fileID: 6156246831092198731, guid: 217f9c8f922f2d41cac52c3699bde478, type: 3}
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_AddedComponents:
|
||||
- targetCorrespondingSourceObject: {fileID: 4508084525431060037, guid: 217f9c8f922f2d41cac52c3699bde478, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 1359172648}
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 217f9c8f922f2d41cac52c3699bde478, type: 3}
|
||||
--- !u!114 &5198188376350273125 stripped
|
||||
MonoBehaviour:
|
||||
@@ -1195,3 +1222,12 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 8401c141ee093632d847505914412cee, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
m_Roots:
|
||||
- {fileID: 1906469785}
|
||||
- {fileID: 965851724}
|
||||
- {fileID: 656092325660581143}
|
||||
- {fileID: 5198188376350273124}
|
||||
- {fileID: 766862834}
|
||||
@@ -1,56 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
public enum Sound {
|
||||
MenuLow,
|
||||
MenuHigh,
|
||||
|
||||
Accelerate,
|
||||
Decelerate,
|
||||
Strafe,
|
||||
|
||||
Damage,
|
||||
Respawn,
|
||||
|
||||
BoostAcceleration,
|
||||
BoostDeceleration,
|
||||
BoostStrafe,
|
||||
BoostShield,
|
||||
|
||||
BoostGenerate,
|
||||
BoostAvailable,
|
||||
BoostFull,
|
||||
BoostDrain,
|
||||
}
|
||||
|
||||
[RequireComponent(typeof(AudioSource))]
|
||||
public class Audio : MonoBehaviour {
|
||||
[SerializeField]
|
||||
Sound[] soundNames;
|
||||
|
||||
[SerializeField]
|
||||
AudioClip[] clips;
|
||||
|
||||
Dictionary<Sound, AudioClip> sounds = new();
|
||||
|
||||
AudioSource source;
|
||||
|
||||
void Start() {
|
||||
source = GetComponent<AudioSource>();
|
||||
|
||||
for (int i = 0; i < clips.Length; i++) {
|
||||
sounds.Add(soundNames[i], clips[i]);
|
||||
}
|
||||
}
|
||||
|
||||
public void PlaySound(Sound s) {
|
||||
AudioClip clip;
|
||||
bool found = sounds.TryGetValue(s, out clip);
|
||||
if (clip) {
|
||||
source.clip = clip;
|
||||
source.Play(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
Executable
+183
@@ -0,0 +1,183 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
public enum Sound {
|
||||
MenuLow,
|
||||
MenuHigh,
|
||||
|
||||
Accelerate,
|
||||
Decelerate,
|
||||
Strafe,
|
||||
|
||||
Damage,
|
||||
Respawn,
|
||||
|
||||
BoostAcceleration,
|
||||
BoostDeceleration,
|
||||
BoostStrafe,
|
||||
BoostShield,
|
||||
|
||||
BoostGenerate,
|
||||
BoostAvailable,
|
||||
BoostFull,
|
||||
BoostDrain,
|
||||
}
|
||||
|
||||
public class ShipAudio : MonoBehaviour {
|
||||
// Match these two up
|
||||
[SerializeField]
|
||||
Sound[] soundNames;
|
||||
|
||||
[SerializeField]
|
||||
AudioClip[] clips;
|
||||
|
||||
Dictionary<Sound, AudioClip> sounds = new();
|
||||
|
||||
AudioSource srcAccel;
|
||||
AudioSource srcDecel;
|
||||
AudioSource srcStrafe;
|
||||
|
||||
SpaceRaceInput input;
|
||||
ShipControls ship;
|
||||
|
||||
void Awake() {
|
||||
for (int i = 0; i < clips.Length; i++) {
|
||||
sounds.Add(soundNames[i], clips[i]);
|
||||
}
|
||||
|
||||
ship = GetComponentInParent<ShipControls>();
|
||||
|
||||
srcAccel = gameObject.AddComponent<AudioSource>();
|
||||
srcAccel.clip = sounds[Sound.Accelerate];
|
||||
srcAccel.loop = true;
|
||||
srcAccel.volume = 0f;
|
||||
srcAccel.Play();
|
||||
|
||||
srcDecel = gameObject.AddComponent<AudioSource>();
|
||||
srcDecel.clip = sounds[Sound.Decelerate];
|
||||
srcDecel.loop = true;
|
||||
srcDecel.volume = 0f;
|
||||
srcDecel.Play();
|
||||
|
||||
srcStrafe = gameObject.AddComponent<AudioSource>();
|
||||
srcStrafe.clip = sounds[Sound.Strafe];
|
||||
srcStrafe.loop = true;
|
||||
srcStrafe.volume = 0f;
|
||||
srcStrafe.Play();
|
||||
|
||||
RegisterEvents();
|
||||
}
|
||||
|
||||
void Update() {
|
||||
srcAccel.pitch = Math.Min(1f, (1f / 500f) * ship.Speed);
|
||||
srcDecel.pitch = Math.Min(1f, (1f / 500f) * ship.Speed);
|
||||
srcStrafe.pitch = Math.Min(1f, (1f / 500f) * ship.Speed);
|
||||
|
||||
// Super fucking annoying
|
||||
// stops all the clicks and pops of starting / stopping the clips
|
||||
// 0.125s to get max volume
|
||||
// == 8x per second...
|
||||
float volumeDelta = Time.deltaTime / 8000;
|
||||
|
||||
bool accelerating = input.ship.accelerate.ReadValue<float>() > 0;
|
||||
bool decelerating = input.ship.decelerate.ReadValue<float>() > 0;
|
||||
bool strafing = input.ship.strafe.ReadValue<Vector2>().magnitude > 0;
|
||||
|
||||
if (accelerating) {
|
||||
srcAccel.volume = Math.Max(1f, srcAccel.volume + volumeDelta);
|
||||
} else {
|
||||
srcAccel.volume = Math.Min(0f, srcAccel.volume - volumeDelta);
|
||||
}
|
||||
|
||||
if (decelerating) {
|
||||
srcDecel.volume = Math.Max(1f, srcDecel.volume + volumeDelta);
|
||||
} else {
|
||||
srcDecel.volume = Math.Min(0f, srcDecel.volume - volumeDelta);
|
||||
}
|
||||
|
||||
if (strafing) {
|
||||
srcStrafe.volume = Math.Max(1f, srcStrafe.volume + volumeDelta);
|
||||
} else {
|
||||
srcStrafe.volume = Math.Min(0f, srcStrafe.volume - volumeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// public void PlaySound(Sound s) {
|
||||
// AudioSource src = sounds[s];
|
||||
// src.Play(0);
|
||||
// }
|
||||
|
||||
void RegisterEvents() {
|
||||
if (input == null)
|
||||
input = new SpaceRaceInput();
|
||||
|
||||
input.ship.Enable();
|
||||
|
||||
// input.ship.accelerate.started += OnAccelerateStart;
|
||||
// input.ship.accelerate.canceled += OnAccelerateCancel;
|
||||
// input.ship.decelerate.started += OnDecelerateStart;
|
||||
// input.ship.decelerate.canceled += OnDecelerateCancel;
|
||||
// input.ship.strafe.started += OnStrafeStart;
|
||||
// input.ship.strafe.canceled += OnStrafeCancel;
|
||||
|
||||
// these we only care about the initial press
|
||||
// input.ship.respawn.started += OnRespawn;
|
||||
// input.ship.quit.started += OnQuit;
|
||||
// input.ship.powerUnit1.started += OnPowerUnit1;
|
||||
// input.ship.powerUnit2.started += OnPowerUnit2;
|
||||
// input.ship.powerUnit3.started += OnPowerUnit3;
|
||||
// input.ship.powerUnit4.started += OnPowerUnit4;
|
||||
}
|
||||
|
||||
// void OnDestroy() {
|
||||
// input.ship.accelerate.started -= OnAccelerateStart;
|
||||
// input.ship.accelerate.canceled -= OnAccelerateCancel;
|
||||
// input.ship.decelerate.started -= OnDecelerateStart;
|
||||
// input.ship.decelerate.canceled -= OnDecelerateCancel;
|
||||
// input.ship.strafe.started -= OnStrafeStart;
|
||||
// input.ship.strafe.canceled -= OnStrafeCancel;
|
||||
|
||||
|
||||
// // these we only care about the initial press
|
||||
// input.ship.respawn.started -= OnRespawn;
|
||||
// input.ship.quit.started -= OnQuit;
|
||||
// input.ship.powerUnit1.started -= OnPowerUnit1;
|
||||
// input.ship.powerUnit2.started -= OnPowerUnit2;
|
||||
// input.ship.powerUnit3.started -= OnPowerUnit3;
|
||||
// input.ship.powerUnit4.started -= OnPowerUnit4;
|
||||
// }
|
||||
|
||||
// void OnAcceleratePerformed(InputAction.CallbackContext _ctx) {
|
||||
// Debug.Log(_ctx.duration);
|
||||
// }
|
||||
|
||||
// void OnAccelerateStart(InputAction.CallbackContext _ctx) {
|
||||
// srcAccel.Play();
|
||||
// }
|
||||
|
||||
// void OnAccelerateCancel(InputAction.CallbackContext _ctx) {
|
||||
// srcAccel.Stop();
|
||||
// }
|
||||
|
||||
// void OnDecelerateStart(InputAction.CallbackContext _ctx) {
|
||||
// srcDecel.Play();
|
||||
// }
|
||||
|
||||
// void OnDecelerateCancel(InputAction.CallbackContext _ctx) {
|
||||
// srcDecel.Stop();
|
||||
// }
|
||||
|
||||
// void OnStrafeStart(InputAction.CallbackContext _ctx) {
|
||||
// srcStrafe.Play();
|
||||
// }
|
||||
|
||||
// void OnStrafeCancel(InputAction.CallbackContext _ctx) {
|
||||
// srcStrafe.Stop();
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9bcaa1cfcea9cae4bb92bdc96cfbb4d2
|
||||
guid: 566ffe93221add0489d9a9a01670b93a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
@@ -47,6 +47,10 @@ public class ShipControls : MonoBehaviour {
|
||||
|
||||
public float Speed => rigidBody.velocity.magnitude;
|
||||
|
||||
// used for audio
|
||||
public bool Accelerating => input.ship.accelerate.ReadValue<float>() > 0;
|
||||
public bool Decelerating => input.ship.decelerate.ReadValue<float>() > 0;
|
||||
|
||||
void Start() {
|
||||
Cursor.lockState = CursorLockMode.Locked;
|
||||
rigidBody = GetComponent<Rigidbody>();
|
||||
|
||||
@@ -29,7 +29,7 @@ public class MenuControls : MonoBehaviour {
|
||||
ControlsUI controlsUI;
|
||||
|
||||
[SerializeField]
|
||||
Audio audio;
|
||||
ShipAudio audio;
|
||||
|
||||
SpaceRaceInput input;
|
||||
|
||||
|
||||
Reference in new issue
Block a user