浏览代码

reduce restart time

/hh-develop-fps_game_project
HH 4 年前
当前提交
00448e8c
共有 4 个文件被更改,包括 23 次插入39 次删除
  1. 4
      Project/Assets/ML-Agents/Examples/FPS_Game/Prefabs/FPSAgent.prefab
  2. 49
      Project/Assets/ML-Agents/Examples/FPS_Game/Scenes/FPS_Game.unity
  3. 2
      Project/Assets/ML-Agents/Examples/FPS_Game/Scripts/AgentHealth.cs
  4. 7
      Project/Assets/ML-Agents/Examples/FPS_Game/Scripts/PlayBackgroundAudio.cs

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


AllowKeyboardInput: 0
shootKey: 106
autoShootEnabled: 0
shootingRate: 0.02
shootingRate: 0
coolDownWait: 0
projectilePrefab: {fileID: 3911029810215854908, guid: 01e75f85d5a3c451b9a5bed7070be0a0,
type: 3}

AllowKeyboardInput: 0
shootKey: 106
autoShootEnabled: 0
shootingRate: 0.02
shootingRate: 0
coolDownWait: 0
projectilePrefab: {fileID: 3911029810215854908, guid: 01e75f85d5a3c451b9a5bed7070be0a0,
type: 3}

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


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_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -13.48854, y: 1, z: -20.442457}
m_Father: {fileID: 1132733227}
m_RootOrder: 0
m_Father: {fileID: 0}
m_RootOrder: 11
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!82 &134432281
AudioSource:

serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 8300000, guid: 32d90d29710e442e197cb2238790c963, type: 3}
m_PlayOnAwake: 1
m_PlayOnAwake: 0
m_Volume: 0.75
m_Pitch: 1
Loop: 1

- {fileID: 1236036023}
- {fileID: 253704780}
m_Father: {fileID: 0}
m_RootOrder: 17
m_RootOrder: 18
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &253704779
GameObject:

m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 19
m_RootOrder: 20
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &320583313
GameObject:

m_Children:
- {fileID: 1545228315}
m_Father: {fileID: 0}
m_RootOrder: 18
m_RootOrder: 19
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &338592044
GameObject:

m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 12
m_RootOrder: 13
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &975117374
GameObject:

- {fileID: 1419764706}
- {fileID: 965336649}
m_Father: {fileID: 0}
m_RootOrder: 14
m_RootOrder: 15
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1103948492
GameObject:

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:
- {fileID: 134432280}
m_Children: []
m_RootOrder: 11
m_RootOrder: 12
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1137767715
GameObject:

m_Children:
- {fileID: 1695256207}
m_Father: {fileID: 0}
m_RootOrder: 13
m_RootOrder: 14
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1527549674
GameObject:

- {fileID: 2372382112527972584}
- {fileID: 320583314}
m_Father: {fileID: 0}
m_RootOrder: 16
m_RootOrder: 17
m_LocalEulerAnglesHint: {x: 0, y: -165.00002, z: 0}
--- !u!1 &1672274306
GameObject:

m_Children:
- {fileID: 1627753779}
m_Father: {fileID: 0}
m_RootOrder: 15
m_RootOrder: 16
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2144694764
GameObject:

m_Modification:
m_TransformParent: {fileID: 4595975476135097}
m_Modifications:
- target: {fileID: 1828481692, guid: a0e7db83e097b4a3e96a89b390d1ebed, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1828481692, guid: a0e7db83e097b4a3e96a89b390d1ebed, type: 3}
propertyPath: m_LocalPosition.z
value: -5
objectReference: {fileID: 0}
- target: {fileID: 2747490485226133338, guid: a0e7db83e097b4a3e96a89b390d1ebed,
type: 3}
propertyPath: shootingRate
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2747490485406847266, guid: a0e7db83e097b4a3e96a89b390d1ebed,
type: 3}
propertyPath: shootingRate
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4453630946124038627, guid: a0e7db83e097b4a3e96a89b390d1ebed,
type: 3}
propertyPath: m_ActionEvents.Array.data[7].m_PersistentCalls.m_Calls.Array.data[0].m_Target

2
Project/Assets/ML-Agents/Examples/FPS_Game/Scripts/AgentHealth.cs


// }
WaitForFixedUpdate wait = new WaitForFixedUpdate();
float timer = 0;
while (timer < 3)
while (timer < 1)
{
timer += Time.fixedDeltaTime;
yield return wait;

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


private AudioSource m_AudioSource;
void Awake()
{
DontDestroyOnLoad(gameObject);
// DontDestroyOnLoad(gameObject);
if (m_AudioSource == null)
{

// if (BackgroundSong)
// {
// m_AudioSource.clip = BackgroundSong;
m_AudioSource.Play();
if (!m_AudioSource.isPlaying)
{
m_AudioSource.Play();
}
// }
}

正在加载...
取消
保存