added queue to barks, modified barks manager, barks trigger
This commit is contained in:
@@ -9524,7 +9524,7 @@ MonoBehaviour:
|
|||||||
type: 0
|
type: 0
|
||||||
typeString: CustomFieldType_Text
|
typeString: CustomFieldType_Text
|
||||||
- title: Sequence
|
- title: Sequence
|
||||||
value: AudioWait(Dialogues/VO/CH01/CH01_wasteland_vo_opening_wanderer_01)
|
value:
|
||||||
type: 0
|
type: 0
|
||||||
typeString: CustomFieldType_Text
|
typeString: CustomFieldType_Text
|
||||||
- title: pl
|
- title: pl
|
||||||
@@ -9550,7 +9550,7 @@ MonoBehaviour:
|
|||||||
m_Calls: []
|
m_Calls: []
|
||||||
canvasRect:
|
canvasRect:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
x: 20
|
x: 19
|
||||||
y: 80
|
y: 80
|
||||||
width: 160
|
width: 160
|
||||||
height: 30
|
height: 30
|
||||||
@@ -15983,6 +15983,394 @@ MonoBehaviour:
|
|||||||
height: 30
|
height: 30
|
||||||
canvasScrollPosition: {x: 0, y: 0}
|
canvasScrollPosition: {x: 0, y: 0}
|
||||||
canvasZoom: 1
|
canvasZoom: 1
|
||||||
|
- id: 56
|
||||||
|
fields:
|
||||||
|
- title: Title
|
||||||
|
value: Barks/Combat/InsectsLargerThanVultures
|
||||||
|
type: 0
|
||||||
|
typeString: CustomFieldType_Text
|
||||||
|
- title: Pictures
|
||||||
|
value: '[]'
|
||||||
|
type: 3
|
||||||
|
typeString: CustomFieldType_Files
|
||||||
|
- title: Description
|
||||||
|
value:
|
||||||
|
type: 0
|
||||||
|
typeString: CustomFieldType_Text
|
||||||
|
- title: Actor
|
||||||
|
value: 1
|
||||||
|
type: 5
|
||||||
|
typeString: CustomFieldType_Actor
|
||||||
|
- title: Conversant
|
||||||
|
value: 2
|
||||||
|
type: 5
|
||||||
|
typeString: CustomFieldType_Actor
|
||||||
|
overrideSettings:
|
||||||
|
useOverrides: 0
|
||||||
|
overrideSubtitleSettings: 0
|
||||||
|
showNPCSubtitlesDuringLine: 1
|
||||||
|
showNPCSubtitlesWithResponses: 1
|
||||||
|
showPCSubtitlesDuringLine: 0
|
||||||
|
skipPCSubtitleAfterResponseMenu: 0
|
||||||
|
subtitleCharsPerSecond: 30
|
||||||
|
minSubtitleSeconds: 2
|
||||||
|
continueButton: 0
|
||||||
|
overrideSequenceSettings: 0
|
||||||
|
defaultSequence:
|
||||||
|
defaultPlayerSequence:
|
||||||
|
defaultResponseMenuSequence:
|
||||||
|
overrideInputSettings: 0
|
||||||
|
alwaysForceResponseMenu: 1
|
||||||
|
includeInvalidEntries: 0
|
||||||
|
responseTimeout: 0
|
||||||
|
cancelSubtitle:
|
||||||
|
key: 27
|
||||||
|
buttonName:
|
||||||
|
cancelConversation:
|
||||||
|
key: 27
|
||||||
|
buttonName:
|
||||||
|
nodeColor:
|
||||||
|
dialogueEntries:
|
||||||
|
- id: 0
|
||||||
|
fields:
|
||||||
|
- title: Title
|
||||||
|
value: START
|
||||||
|
type: 0
|
||||||
|
typeString:
|
||||||
|
- title: Pictures
|
||||||
|
value: '[]'
|
||||||
|
type: 3
|
||||||
|
typeString: CustomFieldType_Files
|
||||||
|
- title: Description
|
||||||
|
value:
|
||||||
|
type: 0
|
||||||
|
typeString:
|
||||||
|
- title: Actor
|
||||||
|
value: 1
|
||||||
|
type: 5
|
||||||
|
typeString: CustomFieldType_Actor
|
||||||
|
- title: Conversant
|
||||||
|
value: 2
|
||||||
|
type: 5
|
||||||
|
typeString: CustomFieldType_Actor
|
||||||
|
- title: Menu Text
|
||||||
|
value:
|
||||||
|
type: 0
|
||||||
|
typeString:
|
||||||
|
- title: Dialogue Text
|
||||||
|
value:
|
||||||
|
type: 0
|
||||||
|
typeString:
|
||||||
|
- title: Parenthetical
|
||||||
|
value:
|
||||||
|
type: 0
|
||||||
|
typeString:
|
||||||
|
- title: Audio Files
|
||||||
|
value: '[]'
|
||||||
|
type: 3
|
||||||
|
typeString: CustomFieldType_Files
|
||||||
|
- title: Video File
|
||||||
|
value:
|
||||||
|
type: 0
|
||||||
|
typeString:
|
||||||
|
- title: Sequence
|
||||||
|
value: None()
|
||||||
|
type: 0
|
||||||
|
typeString:
|
||||||
|
- title: pl
|
||||||
|
value:
|
||||||
|
type: 4
|
||||||
|
typeString: CustomFieldType_Localization
|
||||||
|
conversationID: 56
|
||||||
|
isRoot: 0
|
||||||
|
isGroup: 0
|
||||||
|
nodeColor:
|
||||||
|
delaySimStatus: 0
|
||||||
|
falseConditionAction: Block
|
||||||
|
conditionPriority: 2
|
||||||
|
outgoingLinks:
|
||||||
|
- originConversationID: 56
|
||||||
|
originDialogueID: 0
|
||||||
|
destinationConversationID: 56
|
||||||
|
destinationDialogueID: 1
|
||||||
|
isConnector: 0
|
||||||
|
priority: 2
|
||||||
|
conditionsString:
|
||||||
|
userScript:
|
||||||
|
onExecute:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
canvasRect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 21
|
||||||
|
y: 30
|
||||||
|
width: 160
|
||||||
|
height: 30
|
||||||
|
- id: 1
|
||||||
|
fields:
|
||||||
|
- title: Title
|
||||||
|
value:
|
||||||
|
type: 0
|
||||||
|
typeString: CustomFieldType_Text
|
||||||
|
- title: Pictures
|
||||||
|
value: '[]'
|
||||||
|
type: 3
|
||||||
|
typeString: CustomFieldType_Files
|
||||||
|
- title: Description
|
||||||
|
value:
|
||||||
|
type: 0
|
||||||
|
typeString: CustomFieldType_Text
|
||||||
|
- title: Actor
|
||||||
|
value: 2
|
||||||
|
type: 5
|
||||||
|
typeString: CustomFieldType_Actor
|
||||||
|
- title: Conversant
|
||||||
|
value: 1
|
||||||
|
type: 5
|
||||||
|
typeString: CustomFieldType_Actor
|
||||||
|
- title: Menu Text
|
||||||
|
value:
|
||||||
|
type: 0
|
||||||
|
typeString: CustomFieldType_Text
|
||||||
|
- title: Dialogue Text
|
||||||
|
value: Insects larger than vultures! And with a bite to match!
|
||||||
|
type: 0
|
||||||
|
typeString: CustomFieldType_Text
|
||||||
|
- title: Parenthetical
|
||||||
|
value:
|
||||||
|
type: 0
|
||||||
|
typeString: CustomFieldType_Text
|
||||||
|
- title: Audio Files
|
||||||
|
value: '[]'
|
||||||
|
type: 3
|
||||||
|
typeString: CustomFieldType_Files
|
||||||
|
- title: Video File
|
||||||
|
value:
|
||||||
|
type: 0
|
||||||
|
typeString: CustomFieldType_Text
|
||||||
|
- title: Sequence
|
||||||
|
value:
|
||||||
|
type: 0
|
||||||
|
typeString: CustomFieldType_Text
|
||||||
|
- title: pl
|
||||||
|
value:
|
||||||
|
type: 4
|
||||||
|
typeString: CustomFieldType_Localization
|
||||||
|
conversationID: 56
|
||||||
|
isRoot: 0
|
||||||
|
isGroup: 0
|
||||||
|
nodeColor:
|
||||||
|
delaySimStatus: 0
|
||||||
|
falseConditionAction: Block
|
||||||
|
conditionPriority: 2
|
||||||
|
outgoingLinks: []
|
||||||
|
conditionsString:
|
||||||
|
userScript:
|
||||||
|
onExecute:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
canvasRect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 21
|
||||||
|
y: 80
|
||||||
|
width: 160
|
||||||
|
height: 30
|
||||||
|
canvasScrollPosition: {x: 0, y: 0}
|
||||||
|
canvasZoom: 1
|
||||||
|
- id: 57
|
||||||
|
fields:
|
||||||
|
- title: Title
|
||||||
|
value: Barks/Misc/WoodenBoxes
|
||||||
|
type: 0
|
||||||
|
typeString: CustomFieldType_Text
|
||||||
|
- title: Pictures
|
||||||
|
value: '[]'
|
||||||
|
type: 3
|
||||||
|
typeString: CustomFieldType_Files
|
||||||
|
- title: Description
|
||||||
|
value:
|
||||||
|
type: 0
|
||||||
|
typeString: CustomFieldType_Text
|
||||||
|
- title: Actor
|
||||||
|
value: 1
|
||||||
|
type: 5
|
||||||
|
typeString: CustomFieldType_Actor
|
||||||
|
- title: Conversant
|
||||||
|
value: 2
|
||||||
|
type: 5
|
||||||
|
typeString: CustomFieldType_Actor
|
||||||
|
overrideSettings:
|
||||||
|
useOverrides: 0
|
||||||
|
overrideSubtitleSettings: 0
|
||||||
|
showNPCSubtitlesDuringLine: 1
|
||||||
|
showNPCSubtitlesWithResponses: 1
|
||||||
|
showPCSubtitlesDuringLine: 0
|
||||||
|
skipPCSubtitleAfterResponseMenu: 0
|
||||||
|
subtitleCharsPerSecond: 30
|
||||||
|
minSubtitleSeconds: 2
|
||||||
|
continueButton: 0
|
||||||
|
overrideSequenceSettings: 0
|
||||||
|
defaultSequence:
|
||||||
|
defaultPlayerSequence:
|
||||||
|
defaultResponseMenuSequence:
|
||||||
|
overrideInputSettings: 0
|
||||||
|
alwaysForceResponseMenu: 1
|
||||||
|
includeInvalidEntries: 0
|
||||||
|
responseTimeout: 0
|
||||||
|
cancelSubtitle:
|
||||||
|
key: 27
|
||||||
|
buttonName:
|
||||||
|
cancelConversation:
|
||||||
|
key: 27
|
||||||
|
buttonName:
|
||||||
|
nodeColor:
|
||||||
|
dialogueEntries:
|
||||||
|
- id: 0
|
||||||
|
fields:
|
||||||
|
- title: Title
|
||||||
|
value: START
|
||||||
|
type: 0
|
||||||
|
typeString:
|
||||||
|
- title: Pictures
|
||||||
|
value: '[]'
|
||||||
|
type: 3
|
||||||
|
typeString: CustomFieldType_Files
|
||||||
|
- title: Description
|
||||||
|
value:
|
||||||
|
type: 0
|
||||||
|
typeString:
|
||||||
|
- title: Actor
|
||||||
|
value: 1
|
||||||
|
type: 5
|
||||||
|
typeString: CustomFieldType_Actor
|
||||||
|
- title: Conversant
|
||||||
|
value: 2
|
||||||
|
type: 5
|
||||||
|
typeString: CustomFieldType_Actor
|
||||||
|
- title: Menu Text
|
||||||
|
value:
|
||||||
|
type: 0
|
||||||
|
typeString:
|
||||||
|
- title: Dialogue Text
|
||||||
|
value:
|
||||||
|
type: 0
|
||||||
|
typeString:
|
||||||
|
- title: Parenthetical
|
||||||
|
value:
|
||||||
|
type: 0
|
||||||
|
typeString:
|
||||||
|
- title: Audio Files
|
||||||
|
value: '[]'
|
||||||
|
type: 3
|
||||||
|
typeString: CustomFieldType_Files
|
||||||
|
- title: Video File
|
||||||
|
value:
|
||||||
|
type: 0
|
||||||
|
typeString:
|
||||||
|
- title: Sequence
|
||||||
|
value: None()
|
||||||
|
type: 0
|
||||||
|
typeString:
|
||||||
|
- title: pl
|
||||||
|
value:
|
||||||
|
type: 4
|
||||||
|
typeString: CustomFieldType_Localization
|
||||||
|
conversationID: 57
|
||||||
|
isRoot: 0
|
||||||
|
isGroup: 0
|
||||||
|
nodeColor:
|
||||||
|
delaySimStatus: 0
|
||||||
|
falseConditionAction:
|
||||||
|
conditionPriority: 2
|
||||||
|
outgoingLinks:
|
||||||
|
- originConversationID: 57
|
||||||
|
originDialogueID: 0
|
||||||
|
destinationConversationID: 57
|
||||||
|
destinationDialogueID: 1
|
||||||
|
isConnector: 0
|
||||||
|
priority: 2
|
||||||
|
conditionsString:
|
||||||
|
userScript:
|
||||||
|
onExecute:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
canvasRect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 20
|
||||||
|
y: 30
|
||||||
|
width: 160
|
||||||
|
height: 30
|
||||||
|
- id: 1
|
||||||
|
fields:
|
||||||
|
- title: Title
|
||||||
|
value:
|
||||||
|
type: 0
|
||||||
|
typeString: CustomFieldType_Text
|
||||||
|
- title: Pictures
|
||||||
|
value: '[]'
|
||||||
|
type: 3
|
||||||
|
typeString: CustomFieldType_Files
|
||||||
|
- title: Description
|
||||||
|
value:
|
||||||
|
type: 0
|
||||||
|
typeString: CustomFieldType_Text
|
||||||
|
- title: Actor
|
||||||
|
value: 2
|
||||||
|
type: 5
|
||||||
|
typeString: CustomFieldType_Actor
|
||||||
|
- title: Conversant
|
||||||
|
value: 1
|
||||||
|
type: 5
|
||||||
|
typeString: CustomFieldType_Actor
|
||||||
|
- title: Menu Text
|
||||||
|
value:
|
||||||
|
type: 0
|
||||||
|
typeString: CustomFieldType_Text
|
||||||
|
- title: Dialogue Text
|
||||||
|
value: Wooden Boxes!
|
||||||
|
type: 0
|
||||||
|
typeString: CustomFieldType_Text
|
||||||
|
- title: Parenthetical
|
||||||
|
value:
|
||||||
|
type: 0
|
||||||
|
typeString: CustomFieldType_Text
|
||||||
|
- title: Audio Files
|
||||||
|
value: '[]'
|
||||||
|
type: 3
|
||||||
|
typeString: CustomFieldType_Files
|
||||||
|
- title: Video File
|
||||||
|
value:
|
||||||
|
type: 0
|
||||||
|
typeString: CustomFieldType_Text
|
||||||
|
- title: Sequence
|
||||||
|
value:
|
||||||
|
type: 0
|
||||||
|
typeString: CustomFieldType_Text
|
||||||
|
- title: pl
|
||||||
|
value:
|
||||||
|
type: 4
|
||||||
|
typeString: CustomFieldType_Localization
|
||||||
|
conversationID: 57
|
||||||
|
isRoot: 0
|
||||||
|
isGroup: 0
|
||||||
|
nodeColor:
|
||||||
|
delaySimStatus: 0
|
||||||
|
falseConditionAction: Block
|
||||||
|
conditionPriority: 2
|
||||||
|
outgoingLinks: []
|
||||||
|
conditionsString:
|
||||||
|
userScript:
|
||||||
|
onExecute:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
canvasRect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 20
|
||||||
|
y: 80
|
||||||
|
width: 160
|
||||||
|
height: 30
|
||||||
|
canvasScrollPosition: {x: 0, y: 0}
|
||||||
|
canvasZoom: 1
|
||||||
syncInfo:
|
syncInfo:
|
||||||
syncActors: 0
|
syncActors: 0
|
||||||
syncItems: 0
|
syncItems: 0
|
||||||
|
|||||||
Binary file not shown.
@@ -1,5 +1,6 @@
|
|||||||
// Copyright (c) Pixel Crushers. All rights reserved.
|
// Copyright (c) Pixel Crushers. All rights reserved.
|
||||||
|
|
||||||
|
using UnityEditor.Localization.Platform.iOS;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace PixelCrushers.DialogueSystem.Wrappers
|
namespace PixelCrushers.DialogueSystem.Wrappers
|
||||||
@@ -13,6 +14,7 @@ namespace PixelCrushers.DialogueSystem.Wrappers
|
|||||||
[AddComponentMenu("Pixel Crushers/Dialogue System/Trigger/Dialogue System Trigger")]
|
[AddComponentMenu("Pixel Crushers/Dialogue System/Trigger/Dialogue System Trigger")]
|
||||||
public class DialogueSystemTrigger : PixelCrushers.DialogueSystem.DialogueSystemTrigger
|
public class DialogueSystemTrigger : PixelCrushers.DialogueSystem.DialogueSystemTrigger
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,12 +1,15 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using PixelCrushers.DialogueSystem;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Events;
|
using UnityEngine.Events;
|
||||||
|
|
||||||
[System.Serializable]
|
[System.Serializable]
|
||||||
public class ActionResponse
|
public class ActionResponse
|
||||||
{
|
{
|
||||||
public string barkText;
|
[Tooltip("Conversation to get bark content from.")]
|
||||||
|
[ConversationPopup(false)]
|
||||||
|
public string barkConversation;
|
||||||
public AudioClip audioClip;
|
public AudioClip audioClip;
|
||||||
public UnityEvent responseEvent;
|
public UnityEvent responseEvent;
|
||||||
public float delay = 0f;
|
public float delay = 0f;
|
||||||
|
|||||||
@@ -20,8 +20,9 @@ public class QuestTriggerBase : Saver
|
|||||||
public bool wasFired;
|
public bool wasFired;
|
||||||
}
|
}
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
virtual public void Awake()
|
public override void Awake()
|
||||||
{
|
{
|
||||||
|
base.Awake();
|
||||||
m_audioSource = GetComponent<AudioSource>();
|
m_audioSource = GetComponent<AudioSource>();
|
||||||
m_audioSource.playOnAwake = false;
|
m_audioSource.playOnAwake = false;
|
||||||
gameObject.layer = LayerMask.NameToLayer("Triggers");
|
gameObject.layer = LayerMask.NameToLayer("Triggers");
|
||||||
@@ -40,13 +41,15 @@ public class QuestTriggerBase : Saver
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void Start()
|
public override void Start()
|
||||||
{
|
{
|
||||||
|
base.Start();
|
||||||
Player.Instance.ThirdPersonController.onDead.AddListener(OnDead);
|
Player.Instance.ThirdPersonController.onDead.AddListener(OnDead);
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void OnDestroy()
|
public override void OnDestroy()
|
||||||
{
|
{
|
||||||
|
base.OnDestroy();
|
||||||
if (Player.Instance != null && Player.Instance.ThirdPersonController != null)
|
if (Player.Instance != null && Player.Instance.ThirdPersonController != null)
|
||||||
Player.Instance.ThirdPersonController.onDead.RemoveListener(OnDead);
|
Player.Instance.ThirdPersonController.onDead.RemoveListener(OnDead);
|
||||||
}
|
}
|
||||||
@@ -83,9 +86,10 @@ public class QuestTriggerBase : Saver
|
|||||||
m_audioSource.clip = action.audioClip;
|
m_audioSource.clip = action.audioClip;
|
||||||
m_audioSource.Play();
|
m_audioSource.Play();
|
||||||
}
|
}
|
||||||
if (action.barkText != null && action.barkText != "")
|
if (action.barkConversation != null && action.barkConversation != "")
|
||||||
{
|
{
|
||||||
DialogueManager.BarkString(action.barkText, m_player);
|
//DialogueManager.BarkString(action.barkText, m_player);
|
||||||
|
BarkManager.Instance.PlayBark(action.barkConversation);
|
||||||
}
|
}
|
||||||
if (action.responseEvent != null)
|
if (action.responseEvent != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using PixelCrushers.DialogueSystem;
|
||||||
|
using Sirenix.Utilities;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Beyond
|
namespace Beyond
|
||||||
@@ -15,6 +17,9 @@ namespace Beyond
|
|||||||
public ActionResponse m_actionResponse;
|
public ActionResponse m_actionResponse;
|
||||||
|
|
||||||
public MaterialChanger[] m_materialsToChange;
|
public MaterialChanger[] m_materialsToChange;
|
||||||
|
//[Tooltip("Conversation to get bark content from.")]
|
||||||
|
//[ConversationPopup(false)]
|
||||||
|
//public string m_conversationBark = string.Empty;
|
||||||
|
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
@@ -86,6 +91,11 @@ namespace Beyond
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//if (!m_conversationBark.IsNullOrWhitespace())
|
||||||
|
//{
|
||||||
|
// BarkManager.Instance.PlayBark(m_conversationBark);
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
yield return null;
|
yield return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ using System.Collections.Generic;
|
|||||||
using PixelCrushers;
|
using PixelCrushers;
|
||||||
using PixelCrushers.DialogueSystem;
|
using PixelCrushers.DialogueSystem;
|
||||||
using Sirenix.OdinInspector;
|
using Sirenix.OdinInspector;
|
||||||
|
using Sirenix.Utilities;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Random = UnityEngine.Random;
|
using Random = UnityEngine.Random;
|
||||||
|
|
||||||
@@ -14,6 +15,9 @@ namespace Beyond
|
|||||||
[Serializable]
|
[Serializable]
|
||||||
public class Bark
|
public class Bark
|
||||||
{
|
{
|
||||||
|
[Tooltip("Conversation to get bark content from.")]
|
||||||
|
[ConversationPopup(false)]
|
||||||
|
public string barkConversation = string.Empty;
|
||||||
public string barkText;
|
public string barkText;
|
||||||
public AudioClip clip;
|
public AudioClip clip;
|
||||||
}
|
}
|
||||||
@@ -39,6 +43,26 @@ namespace Beyond
|
|||||||
public Queue<int> m_barkQueue = new Queue<int>();
|
public Queue<int> m_barkQueue = new Queue<int>();
|
||||||
public AudioSource m_audioSource;
|
public AudioSource m_audioSource;
|
||||||
|
|
||||||
|
private Dictionary<string, int> m_conversationToEntry = new Dictionary<string, int>();
|
||||||
|
|
||||||
|
private static BarkManager s_instance;
|
||||||
|
|
||||||
|
public static BarkManager Instance => s_instance;
|
||||||
|
|
||||||
|
public override void Awake()
|
||||||
|
{
|
||||||
|
base.Awake();
|
||||||
|
if (s_instance != null)
|
||||||
|
{
|
||||||
|
Debug.LogError("BarkManager instance already exists! destroying...");
|
||||||
|
Destroy(this);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
s_instance = this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void PlayBark(int num)
|
public void PlayBark(int num)
|
||||||
{
|
{
|
||||||
m_barkQueue.Enqueue(num);
|
m_barkQueue.Enqueue(num);
|
||||||
@@ -72,6 +96,19 @@ namespace Beyond
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void PlayBark(string conversation)
|
||||||
|
{
|
||||||
|
if (m_conversationToEntry.ContainsKey(conversation))
|
||||||
|
{
|
||||||
|
m_barkQueue.Enqueue(m_conversationToEntry[conversation]);
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.LogError("BarkManager: Conversation not found: "+conversation, this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//private AudioSource audioSourceLast;
|
//private AudioSource audioSourceLast;
|
||||||
//private GameObject audioSource => Player.Instance.audioSource;
|
//private GameObject audioSource => Player.Instance.audioSource;
|
||||||
|
|
||||||
@@ -118,6 +155,10 @@ namespace Beyond
|
|||||||
//audioSourceLast = audioObject.GetComponent<AudioSource>();
|
//audioSourceLast = audioObject.GetComponent<AudioSource>();
|
||||||
m_audioSource.PlayOneShot(b.clip);
|
m_audioSource.PlayOneShot(b.clip);
|
||||||
}
|
}
|
||||||
|
if (!string.IsNullOrWhiteSpace(b.barkConversation))
|
||||||
|
{
|
||||||
|
DialogueManager.Bark(b.barkConversation, Player.Instance.transform);
|
||||||
|
}
|
||||||
if (!string.IsNullOrEmpty(b.barkText))
|
if (!string.IsNullOrEmpty(b.barkText))
|
||||||
{
|
{
|
||||||
DialogueManager.BarkString(b.barkText, Player.Instance.transform);
|
DialogueManager.BarkString(b.barkText, Player.Instance.transform);
|
||||||
@@ -145,6 +186,14 @@ namespace Beyond
|
|||||||
m_saveData.wasPlayed = new bool[m_barks.Length];
|
m_saveData.wasPlayed = new bool[m_barks.Length];
|
||||||
for (int i = 0; i < m_saveData.wasPlayed.Length; i++)
|
for (int i = 0; i < m_saveData.wasPlayed.Length; i++)
|
||||||
m_saveData.wasPlayed[i] = false;
|
m_saveData.wasPlayed[i] = false;
|
||||||
|
for (int i=0; i<m_barks.Length; i++)
|
||||||
|
{
|
||||||
|
var b = m_barks[i];
|
||||||
|
if (b.barks.Length == 1 && !b.barks[0].barkConversation.IsNullOrWhitespace())
|
||||||
|
{
|
||||||
|
m_conversationToEntry[b.barks[0].barkConversation] = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string RecordData()
|
public override string RecordData()
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
"com.unity.localization": "1.5.4",
|
"com.unity.localization": "1.5.4",
|
||||||
"com.unity.multiplayer.center": "1.0.0",
|
"com.unity.multiplayer.center": "1.0.0",
|
||||||
"com.unity.postprocessing": "3.4.0",
|
"com.unity.postprocessing": "3.4.0",
|
||||||
"com.unity.render-pipelines.universal": "17.0.3",
|
"com.unity.render-pipelines.universal": "17.0.4",
|
||||||
"com.unity.timeline": "1.8.8",
|
"com.unity.timeline": "1.8.8",
|
||||||
"com.unity.modules.accessibility": "1.0.0",
|
"com.unity.modules.accessibility": "1.0.0",
|
||||||
"com.unity.modules.ai": "1.0.0",
|
"com.unity.modules.ai": "1.0.0",
|
||||||
|
|||||||
@@ -118,7 +118,7 @@
|
|||||||
"url": "https://packages.unity.com"
|
"url": "https://packages.unity.com"
|
||||||
},
|
},
|
||||||
"com.unity.render-pipelines.core": {
|
"com.unity.render-pipelines.core": {
|
||||||
"version": "17.0.3",
|
"version": "17.0.4",
|
||||||
"depth": 1,
|
"depth": 1,
|
||||||
"source": "builtin",
|
"source": "builtin",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -133,12 +133,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"com.unity.render-pipelines.universal": {
|
"com.unity.render-pipelines.universal": {
|
||||||
"version": "17.0.3",
|
"version": "17.0.4",
|
||||||
"depth": 0,
|
"depth": 0,
|
||||||
"source": "builtin",
|
"source": "builtin",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"com.unity.render-pipelines.core": "17.0.3",
|
"com.unity.render-pipelines.core": "17.0.4",
|
||||||
"com.unity.shadergraph": "17.0.3",
|
"com.unity.shadergraph": "17.0.4",
|
||||||
"com.unity.render-pipelines.universal-config": "17.0.3"
|
"com.unity.render-pipelines.universal-config": "17.0.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -175,11 +175,11 @@
|
|||||||
"url": "https://packages.unity.com"
|
"url": "https://packages.unity.com"
|
||||||
},
|
},
|
||||||
"com.unity.shadergraph": {
|
"com.unity.shadergraph": {
|
||||||
"version": "17.0.3",
|
"version": "17.0.4",
|
||||||
"depth": 1,
|
"depth": 1,
|
||||||
"source": "builtin",
|
"source": "builtin",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"com.unity.render-pipelines.core": "17.0.3",
|
"com.unity.render-pipelines.core": "17.0.4",
|
||||||
"com.unity.searcher": "4.9.3"
|
"com.unity.searcher": "4.9.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
m_EditorVersion: 6000.0.39f1
|
m_EditorVersion: 6000.0.40f1
|
||||||
m_EditorVersionWithRevision: 6000.0.39f1 (15ea7ed0b100)
|
m_EditorVersionWithRevision: 6000.0.40f1 (157d81624ddf)
|
||||||
|
|||||||
Reference in New Issue
Block a user