浏览代码

added music

/hh-develop-fps_game_project
HH 4 年前
当前提交
93bf2f07
共有 8 个文件被更改,包括 348 次插入19 次删除
  1. 10
      Project/Assets/ML-Agents/Examples/FPS_Game/Prefabs/FPSAgent.prefab
  2. 276
      Project/Assets/ML-Agents/Examples/FPS_Game/Scenes/FPS_Game.unity
  3. 8
      Project/Assets/ML-Agents/Examples/FPS_Game/Audio.meta
  4. 40
      Project/Assets/ML-Agents/Examples/FPS_Game/Scripts/PlayBackgroundAudio.cs
  5. 11
      Project/Assets/ML-Agents/Examples/FPS_Game/Scripts/PlayBackgroundAudio.cs.meta
  6. 22
      Project/Assets/ML-Agents/Examples/FPS_Game/Audio/WBA Free Track - The Engineer.mp3.meta

10
Project/Assets/ML-Agents/Examples/FPS_Game/Prefabs/FPSAgent.prefab


m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 2
m_BackGroundColor: {r: 0.25634634, g: 0.186594, b: 0.41099998, a: 1}
m_BackGroundColor: {r: 0.33952528, g: 0.30882353, b: 0.4117647, a: 1}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0

type: 3}
numberOfProjectilesToPool: 35
projectileOrigin: {fileID: 2747490485103127816}
forceToUse: 75
forceToUse: 85
forceMode: 2
UseScreenShake: 1
ShakeTransform: 1

type: 3}
numberOfProjectilesToPool: 35
projectileOrigin: {fileID: 2747490484821474612}
forceToUse: 75
forceToUse: 85
forceMode: 2
UseScreenShake: 1
ShakeTransform: 1

m_Calls: []
m_ActionId: b309ca48-95aa-4032-bd7d-46dcaeb138d0
m_ActionName: Player Action Map/Rotate[/Keyboard/q,/Keyboard/e,/DualShock4GamepadHID/rightStick/left,/DualShock4GamepadHID/rightStick/right]
- m_PersistentCalls:
m_Calls: []
m_ActionId: 82551a02-e3e9-4ef0-92d8-21d784984a6e
m_ActionName: Player Action Map/Restart[/Keyboard/r]
m_NeverAutoSwitchControlSchemes: 0
m_DefaultControlScheme:
m_DefaultActionMap: Player Action Map

276
Project/Assets/ML-Agents/Examples/FPS_Game/Scenes/FPS_Game.unity


m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.9126582, g: 0, b: 1, a: 1}
m_AmbientEquatorColor: {r: 0.7075472, g: 0.7075472, b: 0.7075472, a: 1}
m_AmbientEquatorColor: {r: 0.9339623, g: 0.9339623, b: 0.9339623, a: 1}
m_AmbientGroundColor: {r: 0.9740491, g: 0, b: 1, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 1

m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!54 &72111278
Rigidbody:
m_ObjectHideFlags: 0

m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 105147888}
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &134432279
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 134432280}
- component: {fileID: 134432281}
m_Layer: 0
m_Name: Music
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &134432280
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 134432279}
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_Children: []
m_Father: {fileID: 1132733227}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!82 &134432281
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 134432279}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 8300000, guid: 32d90d29710e442e197cb2238790c963, type: 3}
m_PlayOnAwake: 1
m_Volume: 0.75
m_Pitch: 1
Loop: 1
Mute: 0
Spatialize: 0
SpatializePostEffects: 0
Priority: 128
DopplerLevel: 0
MinDistance: 1
MaxDistance: 500
Pan2D: 0
rolloffMode: 0
BypassEffects: 0
BypassListenerEffects: 0
BypassReverbZones: 0
rolloffCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
panLevelCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
spreadCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
reverbZoneMixCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!1 &135646763
GameObject:
m_ObjectHideFlags: 0

objectReference: {fileID: 0}
- target: {fileID: 4943719350691982, guid: 5889392e3f05b448a8a06c5def6c2dec, type: 3}
propertyPath: m_LocalRotation.x
value: 0.68496823
value: 0.7005391
value: -0.66327685
value: -0.57201654
value: -0.14551054
value: 0.041852936
value: 0.26402473
value: 0.42460623
objectReference: {fileID: 0}
- target: {fileID: 4943719350691982, guid: 5889392e3f05b448a8a06c5def6c2dec, type: 3}
propertyPath: m_RootOrder

propertyPath: m_LocalEulerAnglesHint.x
value: 170.29
value: 140
objectReference: {fileID: 0}
- target: {fileID: 4943719350691982, guid: 5889392e3f05b448a8a06c5def6c2dec, type: 3}
propertyPath: m_LocalEulerAnglesHint.y

- target: {fileID: 108227806558212132, guid: 5889392e3f05b448a8a06c5def6c2dec,
type: 3}
propertyPath: m_Color.r
value: 1
value: 0.27659035
value: 0.9304245
value: 0
value: 0.7216981
value: 1
objectReference: {fileID: 0}
- target: {fileID: 108227806558212132, guid: 5889392e3f05b448a8a06c5def6c2dec,
type: 3}
propertyPath: m_Intensity
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 5889392e3f05b448a8a06c5def6c2dec, type: 3}

m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 713213190}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 9.48854, y: 5.74, z: 42.44246}
m_LocalPosition: {x: 27.2, y: 5.74, z: 51}
m_LocalScale: {x: 2, y: 2, z: 2}
m_Children: []
m_Father: {fileID: 1419764706}

m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 977383533}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 23.86854, y: 5.74, z: 12.712458}
m_LocalPosition: {x: 26.3, y: 5.74, z: 2.4}
m_LocalScale: {x: 2, y: 2, z: 2}
m_Children: []
m_Father: {fileID: 1419764706}

m_Component:
- component: {fileID: 1132733227}
m_Layer: 0
m_Name: =====CAMERA=====
m_Name: =====AUDIO=====
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0

m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -13.48854, y: 1.0000002, z: -20.442457}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Children:
- {fileID: 134432280}
m_Father: {fileID: 0}
m_RootOrder: 11
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1194830905}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 9.48854, y: 5.74, z: 14.802458}
m_LocalPosition: {x: -5, y: 5.74, z: 59.2}
m_LocalScale: {x: 2, y: 2, z: 2}
m_Children: []
m_Father: {fileID: 1419764706}

m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!4 &1419764706
Transform:
m_ObjectHideFlags: 0

- {fileID: 1605840219}
- {fileID: 1128407474}
- {fileID: 884017385}
- {fileID: 1826064872}
m_Father: {fileID: 1055797308}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1817763325}
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &1826064871
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1826064872}
- component: {fileID: 1826064876}
- component: {fileID: 1826064875}
- component: {fileID: 1826064874}
- component: {fileID: 1826064873}
m_Layer: 0
m_Name: Cube (7)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1826064872
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1826064871}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 42.4, y: 5.74, z: 33.8}
m_LocalScale: {x: 2, y: 2, z: 2}
m_Children: []
m_Father: {fileID: 1419764706}
m_RootOrder: 9
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!54 &1826064873
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1826064871}
serializedVersion: 2
m_Mass: 200
m_Drag: 0.1
m_AngularDrag: 0.1
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 2
--- !u!65 &1826064874
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1826064871}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &1826064875
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1826064871}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: cf2a3769e6d5446698f2e3f5aab68915, 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
--- !u!33 &1826064876
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1826064871}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!20 &1828481695 stripped
Camera:
m_CorrespondingSourceObject: {fileID: 1828481695, guid: a0e7db83e097b4a3e96a89b390d1ebed,

8
Project/Assets/ML-Agents/Examples/FPS_Game/Audio.meta


fileFormatVersion: 2
guid: 7af27d156b02140fd91d76f9c81e05ff
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

40
Project/Assets/ML-Agents/Examples/FPS_Game/Scripts/PlayBackgroundAudio.cs


using System.Collections;
using System.Collections.Generic;
using UnityEditor.SceneManagement;
using UnityEngine;
//songs used
// https://www.youtube.com/watch?v=gXm1W2eJ0e0
[RequireComponent(typeof(AudioSource))]
public class PlayBackgroundAudio : MonoBehaviour
{
public AudioClip BackgroundSong;
private AudioSource m_AudioSource;
void Awake()
{
if (m_AudioSource == null)
{
m_AudioSource = GetComponent<AudioSource>();
// m_AudioSource = gameObject.AddComponent<AudioSource>();
}
}
// Start is called before the first frame update
void Start()
{
if (BackgroundSong)
{
m_AudioSource.clip = BackgroundSong;
m_AudioSource.Play();
}
}
// Update is called once per frame
void Update()
{
}
}

11
Project/Assets/ML-Agents/Examples/FPS_Game/Scripts/PlayBackgroundAudio.cs.meta


fileFormatVersion: 2
guid: acf18f73005f24559bad430f9e4a9ca8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

22
Project/Assets/ML-Agents/Examples/FPS_Game/Audio/WBA Free Track - The Engineer.mp3.meta


fileFormatVersion: 2
guid: 32d90d29710e442e197cb2238790c963
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

部分文件因为文件数量过多而无法显示

正在加载...
取消
保存