浏览代码

Add start state for townsfolks

/main
Amel 3 年前
当前提交
8b2d50b0
共有 11 个文件被更改,包括 103 次插入8 次删除
  1. 8
      UOP1_Project/Assets/Scenes/Managers/PersistentManagers.unity
  2. 1
      UOP1_Project/Assets/ScriptableObjects/StateMachine/NPC/States/Idle.asset
  3. 6
      UOP1_Project/Assets/ScriptableObjects/StateMachine/NPC/Townsfolk/Townsfolk_TransitionTable.asset
  4. 9
      UOP1_Project/Assets/Scripts/Audio/AudioManager.cs
  5. 11
      UOP1_Project/Assets/Scripts/Cutscenes/CutsceneTrigger.cs
  6. 16
      UOP1_Project/Assets/ScriptableObjects/StateMachine/NPC/Conditions/StartIdle_RandomTimerElapsed.asset
  7. 8
      UOP1_Project/Assets/ScriptableObjects/StateMachine/NPC/Conditions/StartIdle_RandomTimerElapsed.asset.meta
  8. 16
      UOP1_Project/Assets/ScriptableObjects/StateMachine/NPC/States/Start.asset
  9. 8
      UOP1_Project/Assets/ScriptableObjects/StateMachine/NPC/States/Start.asset.meta
  10. 20
      UOP1_Project/Assets/ScriptableObjects/StateMachine/NPC/Townsfolk/Actions/IsIdle_True_OnEnter.asset
  11. 8
      UOP1_Project/Assets/ScriptableObjects/StateMachine/NPC/Townsfolk/Actions/IsIdle_True_OnEnter.asset.meta

8
UOP1_Project/Assets/Scenes/Managers/PersistentManagers.unity


m_Events:
- m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 610459580}
m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine
m_MethodName: SetActive
m_Mode: 6
- m_Target: {fileID: 610459582}
m_TargetAssemblyTypeName: AudioManager, Assembly-CSharp
m_MethodName: TimelineInterruptsMusic
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine

1
UOP1_Project/Assets/ScriptableObjects/StateMachine/NPC/States/Idle.asset


m_Name: Idle
m_EditorClassIdentifier:
_actions:
- {fileID: 11400000, guid: feacd98ece19c8b4393b6cc268e2a84b, type: 2}
- {fileID: 11400000, guid: 098a951ce0fcb154bb9cb4900665dd9b, type: 2}

6
UOP1_Project/Assets/ScriptableObjects/StateMachine/NPC/Townsfolk/Townsfolk_TransitionTable.asset


m_Name: Townsfolk_TransitionTable
m_EditorClassIdentifier:
_transitions:
- FromState: {fileID: 11400000, guid: eaf1104636c91824ebf0615d314abd49, type: 2}
ToState: {fileID: 11400000, guid: 7aedcd9c179a4824eaf24451ab5689ba, type: 2}
Conditions:
- ExpectedResult: 0
Condition: {fileID: 11400000, guid: 947847d6157ee0f4fb31d9b2a744ca54, type: 2}
Operator: 0
- FromState: {fileID: 11400000, guid: 7aedcd9c179a4824eaf24451ab5689ba, type: 2}
ToState: {fileID: 11400000, guid: 1aad0cd7a387c6544a113d9fa8df1ce3, type: 2}
Conditions:

9
UOP1_Project/Assets/Scripts/Audio/AudioManager.cs


}
/// <summary>
/// Only used by the timeline to stop the gameplay music during the final cutscene
/// </summary>
/// <returns></returns>
public void TimelineInterruptsMusic()
{
StopMusic(AudioCueKey.Invalid);
}
/// <summary>
/// Plays an AudioCue by requesting the appropriate number of SoundEmitters from the pool.
/// </summary>
public AudioCueKey PlayAudioCue(AudioCueSO audioCue, AudioConfigurationSO settings, Vector3 position = default)

11
UOP1_Project/Assets/Scripts/Cutscenes/CutsceneTrigger.cs


//Remember to remove collider componenet when we remove this
private void OnTriggerEnter(Collider other)
{
if (_playCutsceneEvent != null)
_playCutsceneEvent.RaiseEvent(_playableDirector);
//Fake event raise to test quicker
_playSpeceficCutscene.RaiseEvent();
//if (_playCutsceneEvent != null)
// _playCutsceneEvent.RaiseEvent(_playableDirector);
if (_playOnce)
Destroy(this);
//if (_playOnce)
// Destroy(this);
}
}

16
UOP1_Project/Assets/ScriptableObjects/StateMachine/NPC/Conditions/StartIdle_RandomTimerElapsed.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 176cefe776b9f114393e9f982ce6e208, type: 3}
m_Name: StartIdle_RandomTimerElapsed
m_EditorClassIdentifier:
minTimerLength: 1
maxTimerLength: 5

8
UOP1_Project/Assets/ScriptableObjects/StateMachine/NPC/Conditions/StartIdle_RandomTimerElapsed.asset.meta


fileFormatVersion: 2
guid: 947847d6157ee0f4fb31d9b2a744ca54
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

16
UOP1_Project/Assets/ScriptableObjects/StateMachine/NPC/States/Start.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 35432205b9a6a374bbbfe6b7cac92179, type: 3}
m_Name: Start
m_EditorClassIdentifier:
_actions:
- {fileID: 11400000, guid: 098a951ce0fcb154bb9cb4900665dd9b, type: 2}

8
UOP1_Project/Assets/ScriptableObjects/StateMachine/NPC/States/Start.asset.meta


fileFormatVersion: 2
guid: eaf1104636c91824ebf0615d314abd49
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

20
UOP1_Project/Assets/ScriptableObjects/StateMachine/NPC/Townsfolk/Actions/IsIdle_True_OnEnter.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4c70afd7f911db7449d578cc18700875, type: 3}
m_Name: IsIdle_True_OnEnter
m_EditorClassIdentifier:
parameterType: 0
parameterName: IsIdle
boolValue: 1
intValue: 0
floatValue: 0
whenToRun: 0

8
UOP1_Project/Assets/ScriptableObjects/StateMachine/NPC/Townsfolk/Actions/IsIdle_True_OnEnter.asset.meta


fileFormatVersion: 2
guid: feacd98ece19c8b4393b6cc268e2a84b
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存