wip : player breathing switch control
This commit is contained in:
@@ -0,0 +1,18 @@
|
|||||||
|
%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: 7b54f077b8751ef4fab18faa68deb555, type: 3}
|
||||||
|
m_Name: 915DE8D3-8E06-4ACC-86F0-1EFD7EB6AE0F
|
||||||
|
m_EditorClassIdentifier: AK.Wwise.Unity.API.WwiseTypes::WwiseSwitchReference
|
||||||
|
objectName: normal
|
||||||
|
id: 1160234136
|
||||||
|
guid: 915DE8D3-8E06-4ACC-86F0-1EFD7EB6AE0F
|
||||||
|
WwiseSwitchGroupReference: {fileID: 11400000, guid: ce10cc38cf773994e820356f0f6bd009, type: 2}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 0874a05c32d66134ba26d69c426a7e74
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 11400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
%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: 7b54f077b8751ef4fab18faa68deb555, type: 3}
|
||||||
|
m_Name: 9271FB30-5987-49D5-9CF3-4166D333B3C1
|
||||||
|
m_EditorClassIdentifier: AK.Wwise.Unity.API.WwiseTypes::WwiseSwitchReference
|
||||||
|
objectName: high
|
||||||
|
id: 3550808449
|
||||||
|
guid: 9271FB30-5987-49D5-9CF3-4166D333B3C1
|
||||||
|
WwiseSwitchGroupReference: {fileID: 11400000, guid: ce10cc38cf773994e820356f0f6bd009, type: 2}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 85931c72894f91444a889d42cebba6e1
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 11400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
File diff suppressed because one or more lines are too long
@@ -997,7 +997,7 @@ MonoBehaviour:
|
|||||||
m_CorrespondingSourceObject: {fileID: 5295567073180248356, guid: 6493d77978c5c1246a0410d1f9204524, type: 3}
|
m_CorrespondingSourceObject: {fileID: 5295567073180248356, guid: 6493d77978c5c1246a0410d1f9204524, type: 3}
|
||||||
m_PrefabInstance: {fileID: 1549040694}
|
m_PrefabInstance: {fileID: 1549040694}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 0}
|
m_GameObject: {fileID: 863648456}
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
m_EditorHideFlags: 0
|
m_EditorHideFlags: 0
|
||||||
m_Script: {fileID: 11500000, guid: c85c0434d95406f4da8daa149ba90838, type: 3}
|
m_Script: {fileID: 11500000, guid: c85c0434d95406f4da8daa149ba90838, type: 3}
|
||||||
@@ -7428,6 +7428,11 @@ Transform:
|
|||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 235456880}
|
m_Father: {fileID: 235456880}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &863648456 stripped
|
||||||
|
GameObject:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 8162540767767967414, guid: 6493d77978c5c1246a0410d1f9204524, type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 1549040694}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
--- !u!1 &864883470
|
--- !u!1 &864883470
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -18466,7 +18471,7 @@ PrefabInstance:
|
|||||||
m_AddedComponents:
|
m_AddedComponents:
|
||||||
- targetCorrespondingSourceObject: {fileID: 4567019715677106522, guid: aec729894f9f57b46b671ad6de6dfd31, type: 3}
|
- targetCorrespondingSourceObject: {fileID: 4567019715677106522, guid: aec729894f9f57b46b671ad6de6dfd31, type: 3}
|
||||||
insertIndex: -1
|
insertIndex: -1
|
||||||
addedObject: {fileID: 2129907050}
|
addedObject: {fileID: 2129907055}
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: aec729894f9f57b46b671ad6de6dfd31, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: aec729894f9f57b46b671ad6de6dfd31, type: 3}
|
||||||
--- !u!1001 &1820726846
|
--- !u!1001 &1820726846
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
@@ -18704,6 +18709,7 @@ GameObject:
|
|||||||
- component: {fileID: 1857350192}
|
- component: {fileID: 1857350192}
|
||||||
- component: {fileID: 1857350193}
|
- component: {fileID: 1857350193}
|
||||||
- component: {fileID: 1857350194}
|
- component: {fileID: 1857350194}
|
||||||
|
- component: {fileID: 1857350195}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: 'Trigger_HouseOfLeaves '
|
m_Name: 'Trigger_HouseOfLeaves '
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
@@ -18791,6 +18797,25 @@ MonoBehaviour:
|
|||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier: OctoCore.Runtime::OctoCore.Navigation.OctoSceneTrigger
|
m_EditorClassIdentifier: OctoCore.Runtime::OctoCore.Navigation.OctoSceneTrigger
|
||||||
_sceneData: {fileID: 11400000, guid: 95381629b7e563a45b923c8eca96a142, type: 2}
|
_sceneData: {fileID: 11400000, guid: 95381629b7e563a45b923c8eca96a142, type: 2}
|
||||||
|
--- !u!114 &1857350195
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1857350191}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 358c75d041ea30a4ab85380893077e70, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier: Assembly-CSharp::Unheimlich.Core.Events.GameEventTrigger
|
||||||
|
_fireOnStart: 0
|
||||||
|
_fireOnEnable: 0
|
||||||
|
_delay: 0
|
||||||
|
_fireOnlyOnce: 1
|
||||||
|
_onTriggered:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
--- !u!64 &1871289640
|
--- !u!64 &1871289640
|
||||||
MeshCollider:
|
MeshCollider:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -19876,7 +19901,7 @@ Transform:
|
|||||||
m_CorrespondingSourceObject: {fileID: 5806845514899202101, guid: aec729894f9f57b46b671ad6de6dfd31, type: 3}
|
m_CorrespondingSourceObject: {fileID: 5806845514899202101, guid: aec729894f9f57b46b671ad6de6dfd31, type: 3}
|
||||||
m_PrefabInstance: {fileID: 1820322907}
|
m_PrefabInstance: {fileID: 1820322907}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
--- !u!114 &2129907050
|
--- !u!114 &2129907055
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
@@ -19885,18 +19910,18 @@ MonoBehaviour:
|
|||||||
m_GameObject: {fileID: 2129907046}
|
m_GameObject: {fileID: 2129907046}
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
m_EditorHideFlags: 0
|
m_EditorHideFlags: 0
|
||||||
m_Script: {fileID: 11500000, guid: 7c1cc6d5ab210fa4baa79dabb29253e3, type: 3}
|
m_Script: {fileID: 11500000, guid: 248105068f0589c40b0dfd7ca39a26e5, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier: Assembly-CSharp::Audio_WwiseEventTrigger
|
m_EditorClassIdentifier: Assembly-CSharp::Audio_Trigger
|
||||||
wwiseEvents:
|
wwiseSwitch:
|
||||||
- label: Set_pplayerBreathingMid
|
idInternal: 0
|
||||||
wwiseEvent:
|
valueGuidInternal:
|
||||||
idInternal: 0
|
groupIdInternal: 0
|
||||||
valueGuidInternal:
|
groupGuidInternal:
|
||||||
WwiseObjectReference: {fileID: 11400000, guid: 8331bb00a444e69408abb3a16cb2a8a2, type: 2}
|
WwiseObjectReference: {fileID: 11400000, guid: dd280fd6158c19b4981c6c696a09c2e1, type: 2}
|
||||||
triggerOnEnter: 1
|
switchTarget: {fileID: 863648456}
|
||||||
triggerOnExit: 0
|
filterTag: Player
|
||||||
playerTag: Player
|
conditions: 05000000
|
||||||
--- !u!1001 &2145614592
|
--- !u!1001 &2145614592
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
@@ -24,8 +24,7 @@ public class Audio_AudioManager : MonoBehaviour
|
|||||||
public AK.Wwise.Event PlayMusic;
|
public AK.Wwise.Event PlayMusic;
|
||||||
public AK.Wwise.Event StopMusic;
|
public AK.Wwise.Event StopMusic;
|
||||||
|
|
||||||
[Header("Wwise Player Event")]
|
|
||||||
public AK.Wwise.Event PlayerBreath;
|
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
@@ -40,7 +39,7 @@ public class Audio_AudioManager : MonoBehaviour
|
|||||||
|
|
||||||
SetWwiseMusicState(WwiseMusicState.Sane);
|
SetWwiseMusicState(WwiseMusicState.Sane);
|
||||||
PlayMusic.Post(gameObject);
|
PlayMusic.Post(gameObject);
|
||||||
PlayerBreath.Post(gameObject);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public class Audio_BreathControl : MonoBehaviour
|
||||||
|
{
|
||||||
|
[SerializeField] private AK.Wwise.Event PlayerBreath;
|
||||||
|
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
PlayerBreath.Post(gameObject);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 84fb04a3132ab974e96cb88e98eb4d4e
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
public enum TriggerCondition
|
||||||
|
{
|
||||||
|
Awake,
|
||||||
|
Start,
|
||||||
|
OnEnable,
|
||||||
|
OnDisable,
|
||||||
|
OnDestroy,
|
||||||
|
OnTriggerEnter,
|
||||||
|
OnTriggerExit,
|
||||||
|
OnTriggerStay,
|
||||||
|
OnCollisionEnter,
|
||||||
|
OnCollisionExit
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Audio_SwitchTrigger : MonoBehaviour
|
||||||
|
{
|
||||||
|
[Header("Switch Settings")]
|
||||||
|
[SerializeField] private AK.Wwise.Switch wwiseSwitch;
|
||||||
|
[SerializeField] private GameObject switchTarget;
|
||||||
|
|
||||||
|
[Header("Trigger Settings")]
|
||||||
|
[SerializeField] private string filterTag = "Player";
|
||||||
|
[SerializeField] private List<TriggerCondition> conditions;
|
||||||
|
|
||||||
|
private void Awake() => TryFire(TriggerCondition.Awake);
|
||||||
|
private void Start() => TryFire(TriggerCondition.Start);
|
||||||
|
private void OnEnable() => TryFire(TriggerCondition.OnEnable);
|
||||||
|
private void OnDisable() => TryFire(TriggerCondition.OnDisable);
|
||||||
|
private void OnDestroy() => TryFire(TriggerCondition.OnDestroy);
|
||||||
|
|
||||||
|
private void OnTriggerEnter(Collider other)
|
||||||
|
{
|
||||||
|
if (other.CompareTag(filterTag)) TryFire(TriggerCondition.OnTriggerEnter);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnTriggerExit(Collider other)
|
||||||
|
{
|
||||||
|
if (other.CompareTag(filterTag)) TryFire(TriggerCondition.OnTriggerExit);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnTriggerStay(Collider other)
|
||||||
|
{
|
||||||
|
if (other.CompareTag(filterTag)) TryFire(TriggerCondition.OnTriggerStay);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnCollisionEnter(Collision collision)
|
||||||
|
{
|
||||||
|
if (collision.gameObject.CompareTag(filterTag)) TryFire(TriggerCondition.OnCollisionEnter);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnCollisionExit(Collision collision)
|
||||||
|
{
|
||||||
|
if (collision.gameObject.CompareTag(filterTag)) TryFire(TriggerCondition.OnCollisionExit);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void TryFire(TriggerCondition condition)
|
||||||
|
{
|
||||||
|
if (conditions.Contains(condition))
|
||||||
|
wwiseSwitch.SetValue(switchTarget);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 248105068f0589c40b0dfd7ca39a26e5
|
||||||
Reference in New Issue
Block a user