Commit da3bae3a authored by Abdulrahman Mohammed's avatar Abdulrahman Mohammed

Demo

parent 108ed153
......@@ -13,7 +13,6 @@ GameObject:
- component: {fileID: 3877208973717692497}
- component: {fileID: 7453428382406276318}
- component: {fileID: 7592014169710111323}
- component: {fileID: 3966708739816864262}
m_Layer: 5
m_Name: DialogueMessageAR
m_TagString: Untagged
......@@ -122,21 +121,6 @@ MonoBehaviour:
- {fileID: 4949317386692519353}
- {fileID: 4631524098155153505}
- {fileID: 6581378033710487808}
--- !u!114 &3966708739816864262
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1741054887350408350}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e19747de3f5aca642ab2be37e372fb86, type: 3}
m_Name:
m_EditorClassIdentifier:
m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5}
m_EffectDistance: {x: 10, y: 10}
m_UseGraphicAlpha: 1
--- !u!1 &5351913775290478158
GameObject:
m_ObjectHideFlags: 0
......@@ -196,7 +180,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.92549026, g: 0.92549026, b: 0.92549026, a: 1}
m_Color: {r: 0.3137255, g: 0.8078432, b: 0.9960785, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
......@@ -287,7 +271,8 @@ MonoBehaviour:
\uFEF3\uFED8\uFED4\uFED0\uFE9C\uFE98\uFE9C\uFEFC\uFED7\uFED4\uFEF4\uFE8E \uFEF3\uFE92\uFEE0\uFE98\uFEF4\uFED8\uFED4\uFEFC\uFE97\uFEF4\uFED8\uFE90\n"
m_isRightToLeft: 1
m_fontAsset: {fileID: 11400000, guid: 66667e28087a64839a2747ce47035171, type: 2}
m_sharedMaterial: {fileID: 7170194958679140877, guid: 66667e28087a64839a2747ce47035171, type: 2}
m_sharedMaterial: {fileID: 7170194958679140877, guid: 66667e28087a64839a2747ce47035171,
type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
......@@ -380,11 +365,11 @@ GameObject:
- component: {fileID: 2534379369148424309}
m_Layer: 5
m_Name: Button
m_TagString: color
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &8444234996915329937
RectTransform:
m_ObjectHideFlags: 0
......@@ -403,7 +388,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -686, y: -97.71}
m_SizeDelta: {x: 95.42, y: 95.42}
m_SizeDelta: {x: 123.1094, y: 95.42}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3152125667820502156
CanvasRenderer:
......@@ -426,14 +411,14 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.8156863, a: 1}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: a65ce01f375554476acaef3c5d8a58a1, type: 3}
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
......@@ -502,9 +487,9 @@ MonoBehaviour:
voiceButton: {fileID: 5556728256055984987}
buttonImage: {fileID: 5674825158718156751}
messageText: {fileID: 8871772912470498426}
idleSprite: {fileID: 21300000, guid: cbe4da29d68394474941f05fed2476ce, type: 3}
recordingSprite: {fileID: 21300000, guid: 87504b254f4924afdafd0f104042f7a1, type: 3}
sendingSprite: {fileID: 21300000, guid: b4273cc35706f473db26a075cc073f94, type: 3}
idleSprite: {fileID: 21300000, guid: 93a79c49c196e47b3bda411a8f6966ac, type: 3}
recordingSprite: {fileID: 21300000, guid: cb3c09cf7e29c4925b5503c81d8c85a3, type: 3}
sendingSprite: {fileID: 21300000, guid: bb0faff2594aa4f488da7b0d68ad82f1, type: 3}
maxRecordingDuration: 30
recordingFrequency: 44100
--- !u!1 &7621513443958275610
......@@ -565,14 +550,14 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.92549026, g: 0.92549026, b: 0.92549026, a: 1}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: cbe4da29d68394474941f05fed2476ce, type: 3}
m_Sprite: {fileID: 21300000, guid: ffb3da67650234567ba5385e2a70b907, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
......@@ -650,7 +635,8 @@ MonoBehaviour:
m_text: "\uFECB\uFEE8\uFE8E\u0646"
m_isRightToLeft: 1
m_fontAsset: {fileID: 11400000, guid: 66667e28087a64839a2747ce47035171, type: 2}
m_sharedMaterial: {fileID: 7170194958679140877, guid: 66667e28087a64839a2747ce47035171, type: 2}
m_sharedMaterial: {fileID: 7170194958679140877, guid: 66667e28087a64839a2747ce47035171,
type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
......@@ -780,15 +766,15 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.92549026, g: 0.92549026, b: 0.92549026, a: 1}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: ac58bb78a34e846a0a6e6ac11a9da887, type: 3}
m_Type: 1
m_Sprite: {fileID: 21300000, guid: ab7ccdba25d3941b9a0232b1d909ec58, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
......@@ -999,6 +985,7 @@ PrefabInstance:
m_SourcePrefab: {fileID: 100100000, guid: 92c3c7fb26a59f74c9d659ca4f9ce348, type: 3}
--- !u!224 &7029142227164786082 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 22400002, guid: 92c3c7fb26a59f74c9d659ca4f9ce348, type: 3}
m_CorrespondingSourceObject: {fileID: 22400002, guid: 92c3c7fb26a59f74c9d659ca4f9ce348,
type: 3}
m_PrefabInstance: {fileID: 7029142227143041440}
m_PrefabAsset: {fileID: 0}
fileFormatVersion: 2
guid: f320a03c9c86d2548851073680c2d356
ModelImporter:
serializedVersion: 22200
internalIDToNameTable: []
externalObjects: {}
materials:
materialImportMode: 2
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
removeConstantScaleCurves: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 0
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 0
useSRGBMaterialColor: 1
sortHierarchyByName: 1
importPhysicalCameras: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
nodeNameCollisionStrategy: 1
fileIdsGeneration: 2
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
keepQuads: 0
weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0
skinWeightsMode: 0
maxBonesPerVertex: 4
minBoneWeight: 0.001
optimizeBones: 1
meshOptimizationFlags: -1
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
strictVertexDataChecks: 0
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
blendShapeNormalImportMode: 1
normalSmoothingSource: 0
referencedClips: []
importAnimation: 1
humanDescription:
serializedVersion: 3
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
globalScale: 1
rootMotionBoneName:
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
autoGenerateAvatarMappingIfUnspecified: 1
animationType: 2
humanoidOversampling: 1
avatarSetup: 0
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
importBlendShapeDeformPercent: 1
remapMaterialsIfMaterialImportModeIsNone: 0
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:
......@@ -128,6 +128,13 @@ namespace AL_Arcade.DialogueSystem.Scripts
{
response = result;
Debug.Log("[AIVoiceHandler] API Success");
// Report AI response to GameContextBuilder
if (GameContextBuilder.Instance != null && result != null)
{
string contextEntry = $"AI Assistant: {result.agent_response}";
GameContextBuilder.Instance.AddPlayerAction(contextEntry);
}
}
else
{
......@@ -182,6 +189,7 @@ namespace AL_Arcade.DialogueSystem.Scripts
yield break;
}
ChatResponse parsedResponse = null;
Exception parseException = null;
......
......@@ -5,8 +5,6 @@ using System.Collections;
using AL_Arcade.DialogueSystem.Scripts;
using ALArcade.ArabicTMP;
using TMPro;
using System;
using UnityEngine.Events;
namespace AL_Arcade.DialogueSystem.Scripts
{
......@@ -30,11 +28,6 @@ namespace AL_Arcade.DialogueSystem.Scripts
[Header("Audio")] public AudioSource voiceAudioSource;
[SerializeField] private AudioSource sfxAudioSource;
[Header("Start Events")]
[SerializeField] public UnityEvent OnDialogueStartForGame;
[SerializeField] public UnityEvent OnDialogueEndForGame;
// Current dialogue state
private DialogueMessageBase currentMessage;
......@@ -87,6 +80,44 @@ namespace AL_Arcade.DialogueSystem.Scripts
{
}
#region Audio Skip Functionality
/// <summary>
/// Stops any currently playing dialogue audio
/// </summary>
public void StopCurrentDialogueAudio()
{
if (voiceAudioSource != null && voiceAudioSource.isPlaying)
{
voiceAudioSource.Stop();
Debug.Log("[DialogueManager] Stopped current dialogue audio");
}
}
/// <summary>
/// Skips current dialogue audio and optionally advances to next message
/// </summary>
public void SkipCurrentDialogue(bool advanceToNext = false)
{
StopCurrentDialogueAudio();
if (advanceToNext && canAdvance && !isTyping)
{
if (currentMessage != null && (currentMessage.replies == null || currentMessage.replies.Count == 0))
{
AdvanceDialogue();
}
}
}
/// <summary>
/// Checks if dialogue audio is currently playing
/// </summary>
public bool IsDialogueAudioPlaying()
{
return voiceAudioSource != null && voiceAudioSource.isPlaying;
}
#endregion
void Update()
{
......@@ -104,7 +135,30 @@ namespace AL_Arcade.DialogueSystem.Scripts
{
CompleteTyping();
}
if (Input.GetKeyDown(advanceKey))
{
// If audio is playing, stop it first
if (IsDialogueAudioPlaying())
{
StopCurrentDialogueAudio();
return; // Don't advance yet, just stop the audio
}
// If typing, complete the typing
if (isTyping)
{
CompleteTyping();
return;
}
// Otherwise advance dialogue if possible
if (canAdvance && currentMessage != null && (currentMessage.replies == null || currentMessage.replies.Count == 0))
{
AdvanceDialogue();
}
}
}
public void StartDialogue(DialogueSequence sequence)
{
......@@ -122,7 +176,6 @@ namespace AL_Arcade.DialogueSystem.Scripts
ShowDialogueUI(true);
DisplayMessage(sequence.firstMessage);
FreeUseDialogue.gameObject.SetActive(false);
OnDialogueStartForGame?.Invoke();
}
public void StartDialogue(DialogueMessageBase firstMessage)
......@@ -136,7 +189,6 @@ namespace AL_Arcade.DialogueSystem.Scripts
ShowDialogueUI(true);
DisplayMessage(firstMessage);
FreeUseDialogue.gameObject.SetActive(false);
OnDialogueStartForGame?.Invoke();
}
private void DisplayMessage(DialogueMessageBase message)
......@@ -147,6 +199,22 @@ namespace AL_Arcade.DialogueSystem.Scripts
return;
}
// Stop any currently playing audio before starting new message
StopCurrentDialogueAudio();
currentMessage = message;
OnMessageDisplay?.Invoke(message);
// Report to GameContextBuilder
if (GameContextBuilder.Instance != null && message != null)
{
string contextEntry = $"NPC [{message.characterName}]: {message.messageText}";
GameContextBuilder.Instance.AddPlayerAction(contextEntry);
}
// Stop any currently playing audio before starting new message
StopCurrentDialogueAudio();
currentMessage = message;
OnMessageDisplay?.Invoke(message);
......@@ -181,17 +249,17 @@ namespace AL_Arcade.DialogueSystem.Scripts
UpdateReplyPanel(message);
}
private IEnumerator TypeText(ArabicTextMeshProUGUI textComponent, string fullText)
private IEnumerator TypeText(TextMeshProUGUI textComponent, string fullText)
{
isTyping = true;
canAdvance = false;
textComponent.arabicText = "";
textComponent.text = "";
ArabicTextMeshProUGUI arText;
arText = textComponent.gameObject.GetComponent<ArabicTextMeshProUGUI>() != null ? textComponent.gameObject.GetComponent<ArabicTextMeshProUGUI>() : null;
foreach (char c in fullText)
{
if (arText != null) arText.arabicText += c;
else textComponent.arabicText += c;
else textComponent.text += c;
yield return new WaitForSecondsRealtime(textSpeed);
}
......@@ -212,7 +280,7 @@ namespace AL_Arcade.DialogueSystem.Scripts
DialogueUI dialogueUI = currentDialogueUI.GetComponent<DialogueUI>();
if (dialogueUI != null && currentMessage != null)
{
dialogueUI.messageText.arabicText = currentMessage.messageText;
dialogueUI.messageText.text = currentMessage.messageText;
}
}
......@@ -272,10 +340,11 @@ namespace AL_Arcade.DialogueSystem.Scripts
OnReplySelected?.Invoke(reply);
// Play reply audio if exists
if (reply.replyAudioClip != null && sfxAudioSource != null)
// Report player's reply to GameContextBuilder
if (GameContextBuilder.Instance != null && reply != null)
{
sfxAudioSource.PlayOneShot(reply.replyAudioClip);
string contextEntry = $"Player Reply: {reply.replyText}";
GameContextBuilder.Instance.AddPlayerAction(contextEntry);
}
// Hide reply panel
......@@ -313,7 +382,6 @@ namespace AL_Arcade.DialogueSystem.Scripts
OnDialogueEnd?.Invoke();
FreeUseDialogue.gameObject.SetActive(true);
OnDialogueEndForGame?.Invoke();
}
private void ShowDialogueUI(bool show)
......
......@@ -12,9 +12,25 @@ namespace AL_Arcade.DialogueSystem.Scripts
public class DialogueUI : MonoBehaviour
{
[Header("UI Elements")] public Image characterSprite;
public ArabicTextMeshProUGUI characterName;
public ArabicTextMeshProUGUI messageText;
public TextMeshProUGUI characterName;
public TextMeshProUGUI messageText;
public void OnNextButtonClicked()
{
if (DialogueManager.Instance != null)
{
// If audio is playing, stop it
if (DialogueManager.Instance.IsDialogueAudioPlaying())
{
DialogueManager.Instance.StopCurrentDialogueAudio();
}
else
{
// Otherwise try to advance dialogue
DialogueManager.Instance.SkipCurrentDialogue(true);
}
}
}
// Simplified setup - no layout modifications needed
public void Setup(DialogueMessageBase message, bool isRTL)
{
......@@ -33,7 +49,7 @@ namespace AL_Arcade.DialogueSystem.Scripts
characterName.GetComponent<ArabicTextMeshProUGUI>().arabicText = message.characterName;
else
{
characterName.arabicText = message.characterName;
characterName.text = message.characterName;
}
}
......@@ -44,7 +60,7 @@ namespace AL_Arcade.DialogueSystem.Scripts
if (messageText.GetComponent<ArabicTextMeshProUGUI>() != null)
messageText.GetComponent<ArabicTextMeshProUGUI>().arabicText = " ";
// The actual text will be filled by the typing animation in DialogueManager
messageText.arabicText = "";
messageText.text = "";
}
}
......@@ -57,7 +73,7 @@ namespace AL_Arcade.DialogueSystem.Scripts
characterName.GetComponent<ArabicTextMeshProUGUI>().arabicText = text;
else
{
characterName.arabicText = text;
characterName.text = text;
}
}
}
......
......@@ -38,10 +38,6 @@ namespace AL_Arcade.DialogueSystem.Scripts
[SerializeField] private Sprite recordingSprite;
[SerializeField] private Sprite idleSprite;
[SerializeField] private Image recordButtonImage;
[SerializeField] private Sprite ananIdle;
[SerializeField] private Sprite ananThinking;
[SerializeField] private Sprite ananListening;
[SerializeField] private Image ananImage;
#endregion
......@@ -311,6 +307,12 @@ namespace AL_Arcade.DialogueSystem.Scripts
{
Debug.Log("[InGameAIChatPanel] Starting recording...");
// Stop any currently playing dialogue audio
if (DialogueManager.Instance != null)
{
DialogueManager.Instance.StopCurrentDialogueAudio();
}
// Clean up previous recording
if (recordedClip != null)
{
......@@ -327,7 +329,6 @@ namespace AL_Arcade.DialogueSystem.Scripts
if (recordButtonImage != null && recordingSprite != null)
{
recordButtonImage.sprite = recordingSprite;
ananImage.sprite = ananListening;
}
Debug.Log("[InGameAIChatPanel] Recording started");
......@@ -353,7 +354,6 @@ namespace AL_Arcade.DialogueSystem.Scripts
if (recordButtonImage != null && idleSprite != null)
{
recordButtonImage.sprite = idleSprite;
ananImage.sprite = ananThinking;
}
// Trim the audio clip to actual recorded length
......@@ -421,7 +421,6 @@ namespace AL_Arcade.DialogueSystem.Scripts
if (recordButtonImage != null && idleSprite != null)
{
recordButtonImage.sprite = idleSprite;
ananImage.sprite = ananIdle;
}
}
......@@ -553,6 +552,13 @@ namespace AL_Arcade.DialogueSystem.Scripts
aiText.arabicText = responseText;
}
// Report to GameContextBuilder
if (GameContextBuilder.Instance != null && !string.IsNullOrEmpty(responseText))
{
string contextEntry = $"AI Assistant (Free Chat): {responseText}";
GameContextBuilder.Instance.AddPlayerAction(contextEntry);
}
// Slide in AI text panel
SlideInAITextPanel();
}
......
......@@ -205,6 +205,12 @@ namespace AL_Arcade.DialogueSystem.Scripts
return;
}
// Stop any currently playing dialogue audio
if (DialogueManager.Instance != null)
{
DialogueManager.Instance.StopCurrentDialogueAudio();
}
Debug.Log("[VoiceMessageUI] Starting recording...");
// Clean up previous recording
......
......@@ -503,6 +503,44 @@ namespace AL_Arcade.DialogueSystem.Scripts
{
}
#region Audio Skip Functionality
/// <summary>
/// Stops any currently playing dialogue audio
/// </summary>
public void StopCurrentDialogueAudio()
{
if (voiceAudioSource != null && voiceAudioSource.isPlaying)
{
voiceAudioSource.Stop();
Debug.Log("[DialogueManager] Stopped current dialogue audio");
}
}
/// <summary>
/// Skips current dialogue audio and optionally advances to next message
/// </summary>
public void SkipCurrentDialogue(bool advanceToNext = false)
{
StopCurrentDialogueAudio();
if (advanceToNext && canAdvance && !isTyping)
{
if (currentMessage != null && (currentMessage.replies == null || currentMessage.replies.Count == 0))
{
AdvanceDialogue();
}
}
}
/// <summary>
/// Checks if dialogue audio is currently playing
/// </summary>
public bool IsDialogueAudioPlaying()
{
return voiceAudioSource != null && voiceAudioSource.isPlaying;
}
#endregion
void Update()
{
......@@ -520,7 +558,30 @@ namespace AL_Arcade.DialogueSystem.Scripts
{
CompleteTyping();
}
if (Input.GetKeyDown(advanceKey))
{
// If audio is playing, stop it first
if (IsDialogueAudioPlaying())
{
StopCurrentDialogueAudio();
return; // Don't advance yet, just stop the audio
}
// If typing, complete the typing
if (isTyping)
{
CompleteTyping();
return;
}
// Otherwise advance dialogue if possible
if (canAdvance && currentMessage != null && (currentMessage.replies == null || currentMessage.replies.Count == 0))
{
AdvanceDialogue();
}
}
}
public void StartDialogue(DialogueSequence sequence)
{
......@@ -561,6 +622,9 @@ namespace AL_Arcade.DialogueSystem.Scripts
return;
}
// Stop any currently playing audio before starting new message
StopCurrentDialogueAudio();
currentMessage = message;
OnMessageDisplay?.Invoke(message);
......@@ -876,6 +940,22 @@ namespace AL_Arcade.DialogueSystem.Scripts
public TextMeshProUGUI characterName;
public TextMeshProUGUI messageText;
public void OnNextButtonClicked()
{
if (DialogueManager.Instance != null)
{
// If audio is playing, stop it
if (DialogueManager.Instance.IsDialogueAudioPlaying())
{
DialogueManager.Instance.StopCurrentDialogueAudio();
}
else
{
// Otherwise try to advance dialogue
DialogueManager.Instance.SkipCurrentDialogue(true);
}
}
}
// Simplified setup - no layout modifications needed
public void Setup(DialogueMessageBase message, bool isRTL)
{
......@@ -1528,6 +1608,12 @@ namespace AL_Arcade.DialogueSystem.Scripts
{
Debug.Log("[InGameAIChatPanel] Starting recording...");
// Stop any currently playing dialogue audio
if (DialogueManager.Instance != null)
{
DialogueManager.Instance.StopCurrentDialogueAudio();
}
// Clean up previous recording
if (recordedClip != null)
{
......@@ -2125,6 +2211,12 @@ namespace AL_Arcade.DialogueSystem.Scripts
return;
}
// Stop any currently playing dialogue audio
if (DialogueManager.Instance != null)
{
DialogueManager.Instance.StopCurrentDialogueAudio();
}
Debug.Log("[VoiceMessageUI] Starting recording...");
// Clean up previous recording
......
This diff is collapsed.
......@@ -17,6 +17,6 @@ MonoBehaviour:
messageText: "\u0647\u0627\u062A \u0643\u0648\u0628\u0627\u064A\u0629 \u0632\u062C\u0627\u062C
\u0643\u0628\u064A\u0631\u0629 \u0633\u0639\u062A\u0647\u0627 \u062D\u0648\u0627\u0644\u064A
005 \u0645\u0644."
voiceClip: {fileID: 8300000, guid: 5170ab8a301377549aa1bdbd2cbcb885, type: 3}
voiceClip: {fileID: 8300000, guid: cde36926bdcb1cd459490c704042afcc, type: 3}
replies: []
nextMessage: {fileID: 0}
......@@ -17,6 +17,6 @@ MonoBehaviour:
messageText: "\u062D\u064F\u0637 \u0634\u0631\u064A\u062D\u0629 \u0627\u0644\u0646\u062D\u0627\u0633
\u062C\u0648\u0647 \u0645\u062D\u0644\u0648\u0644 \u0643\u0628\u0631\u064A\u062A\u0627\u062A
\u0627\u0644\u0646\u062D\u0627\u0633."
voiceClip: {fileID: 8300000, guid: d62e038aaf2fca14ca39098b3afd3e57, type: 3}
voiceClip: {fileID: 8300000, guid: 2b651e0cce500bf44916f8b909fb4476, type: 3}
replies: []
nextMessage: {fileID: 0}
......@@ -16,6 +16,6 @@ MonoBehaviour:
characterName: "\u0639\u0646\u0627\u0646"
messageText: "\u0648\u0635\u0644 \u0627\u0644\u062C\u0633\u0631 \u0627\u0644\u0645\u0644\u062D\u064A
\u0628\u064A\u0646 \u0627\u0644\u0643\u0648\u0628\u0627\u064A\u062A\u064A\u0646."
voiceClip: {fileID: 8300000, guid: 497bfab0d8f7a0e4ab3c4b64611c49a9, type: 3}
voiceClip: {fileID: 8300000, guid: bbb5d031b9f6227459f123a9ecaae502, type: 3}
replies: []
nextMessage: {fileID: 0}
......@@ -19,6 +19,6 @@ MonoBehaviour:
\u0639\u0644\u0649 \u0627\u0644\u062C\u0633\u0631 \u0627\u0644\u0645\u0644\u062D\u064A
\u0639\u0644\u0634\u0627\u0646 \u062A\u063A\u0630\u064A\u0647 \u0628\u0627\u0644\u0645\u062D\u0644\u0648\u0644
\u0648\u062A\u0633\u0647\u0651\u0644 \u062D\u0631\u0643\u0629 \u0627\u0644\u0623\u064A\u0648\u0646\u0627\u062A."
voiceClip: {fileID: 8300000, guid: be0a8dba228eeb64090814bdad46f41a, type: 3}
voiceClip: {fileID: 8300000, guid: 0c2cb96f0a3125d46a0116e6b4b498df, type: 3}
replies: []
nextMessage: {fileID: 0}
......@@ -15,6 +15,6 @@ MonoBehaviour:
characterSprite: {fileID: 21300000, guid: 9076cdee3a80e4dba8f49f99957d5da9, type: 3}
characterName: "\u0639\u0646\u0627\u0646"
messageText: "\u0647\u0627\u062A \u062C\u0647\u0627\u0632 \u0627\u0644\u0641\u0648\u0644\u062A\u0645\u064A\u062A\u0631."
voiceClip: {fileID: 8300000, guid: 4b1daaa8454bc6a40955209a89fc33f1, type: 3}
voiceClip: {fileID: 8300000, guid: c84b41206e3e2624e80d1294e5124c3d, type: 3}
replies: []
nextMessage: {fileID: 0}
......@@ -18,6 +18,6 @@ MonoBehaviour:
\u0628\u0627\u0644\u0637\u0631\u0641 \u0627\u0644\u0633\u0627\u0644\u0628 \u0644\u0644\u0641\u0648\u0644\u062A\u0645\u064A\u062A\u0631
\u0628\u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u0627\u0644\u0633\u0644\u0643
\u0627\u0644\u0623\u0633\u0648\u062F."
voiceClip: {fileID: 8300000, guid: 6acc4553222d860478ed85d58653c155, type: 3}
voiceClip: {fileID: 8300000, guid: 06f37731c188fc141b239ace7a3a5e61, type: 3}
replies: []
nextMessage: {fileID: 0}
......@@ -18,6 +18,6 @@ MonoBehaviour:
\u0628\u0627\u0644\u0637\u0631\u0641 \u0627\u0644\u0645\u0648\u062C\u0628 \u0644\u0644\u0641\u0648\u0644\u062A\u0645\u064A\u062A\u0631
\u0628\u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u0627\u0644\u0633\u0644\u0643
\u0627\u0644\u0623\u062D\u0645\u0631."
voiceClip: {fileID: 8300000, guid: 229708828d7008a4db31b9043534b801, type: 3}
voiceClip: {fileID: 8300000, guid: e38a96158cae1974e81a13859aae62ed, type: 3}
replies: []
nextMessage: {fileID: 0}
......@@ -22,6 +22,6 @@ MonoBehaviour:
\u0628\u064A\u0643\u0648\u0646 \u0645\u0646 \u0627\u0644\u0646\u062D\u0627\u0633
\u0644\u0644\u062E\u0627\u0631\u0635\u064A\u0646 \u0641\u064A \u0627\u0644\u062F\u0627\u0626\u0631\u0629
\u0627\u0644\u062E\u0627\u0631\u062C\u064A\u0629."
voiceClip: {fileID: 0}
voiceClip: {fileID: 8300000, guid: 71ed7dcf0028edc4f9098f87ceff6c9f, type: 3}
replies: []
nextMessage: {fileID: 0}
......@@ -17,6 +17,6 @@ MonoBehaviour:
messageText: "\u0627\u0644\u062E\u0637\u0648\u0629 2: \u0627\u0645\u0644\u0623
\u0627\u0644\u0643\u0648\u0628\u0627\u064A\u0629 \u0628\u062D\u0648\u0627\u0644\u064A
003 \u0645\u0644 \u0645\u064A\u0629.\n"
voiceClip: {fileID: 8300000, guid: de10090e3cd0fe4489bd65232e835ca7, type: 3}
voiceClip: {fileID: 8300000, guid: b4e0a125acdd8da44a121893acbb35a2, type: 3}
replies: []
nextMessage: {fileID: 0}
......@@ -19,6 +19,6 @@ MonoBehaviour:
\u0643\u0628\u0631\u064A\u062A\u0627\u062A \u062E\u0627\u0631\u0635\u064A\u0646
\u0648\u0636\u064A\u0641\u0647\u0645 \u0639\u0644\u0649 \u0627\u0644\u0645\u064A\u0629
\u0627\u0644\u0644\u064A \u0641\u064A \u0627\u0644\u0643\u0648\u0628\u0627\u064A\u0629."
voiceClip: {fileID: 8300000, guid: 64796bbd2dfa8b7429516c4286b48cb3, type: 3}
voiceClip: {fileID: 8300000, guid: 5383eec33a3c5d1499aaec49f44f34df, type: 3}
replies: []
nextMessage: {fileID: 0}
......@@ -19,6 +19,6 @@ MonoBehaviour:
\u0627\u0644\u0645\u062D\u0644\u0648\u0644 \u0643\u0648\u064A\u0633 \u0644\u062D\u062F
\u0645\u0627 \u0643\u0628\u0631\u064A\u062A\u0627\u062A \u0627\u0644\u062E\u0627\u0631\u0635\u064A\u0646
\u062A\u0630\u0648\u0628 \u062A\u0645\u0627\u0645\u064B\u0627"
voiceClip: {fileID: 8300000, guid: 1ae1464b954559549b9e10dbc4d2cffa, type: 3}
voiceClip: {fileID: 8300000, guid: 7eda89e2d5be08747bfe0c15f4734a89, type: 3}
replies: []
nextMessage: {fileID: 0}
......@@ -17,6 +17,6 @@ MonoBehaviour:
messageText: "\u062D\u064F\u0637 \u0634\u0631\u064A\u062D\u0629 \u0627\u0644\u062E\u0627\u0631\u0635\u064A\u0646
\u062C\u0648\u0647 \u0645\u062D\u0644\u0648\u0644 \u0643\u0628\u0631\u064A\u062A\u0627\u062A
\u0627\u0644\u062E\u0627\u0631\u0635\u064A\u0646."
voiceClip: {fileID: 8300000, guid: 2f1ff94a36dd8974aa4be757f60bce1a, type: 3}
voiceClip: {fileID: 8300000, guid: a172752aee2ada64fac727c84110f5a7, type: 3}
replies: []
nextMessage: {fileID: 0}
......@@ -17,6 +17,6 @@ MonoBehaviour:
messageText: "\u0647\u0627\u062A \u0643\u0648\u0628\u0627\u064A\u0629 \u0632\u062C\u0627\u062C
\u062A\u0627\u0646\u064A\u0629 \u0633\u0639\u062A\u0647\u0627 \u0628\u0631\u0636\u0648
005 \u0645\u0644."
voiceClip: {fileID: 8300000, guid: 1b7a1bfb01b9ea649a90470cc4fc52d7, type: 3}
voiceClip: {fileID: 8300000, guid: 0a34d7f9954010241b55c13bcb53eef1, type: 3}
replies: []
nextMessage: {fileID: 0}
......@@ -17,6 +17,6 @@ MonoBehaviour:
messageText: "\u0627\u0645\u0644\u0623 \u0627\u0644\u0643\u0648\u0628\u0627\u064A\u0629
\u0627\u0644\u062A\u0627\u0646\u064A\u0629 \u0628\u062D\u0648\u0627\u0644\u064A
003 \u0645\u0644 \u0645\u064A\u0629."
voiceClip: {fileID: 8300000, guid: 085bef00d90dd944e88ab357bf5a4b43, type: 3}
voiceClip: {fileID: 8300000, guid: 01a8f1f3ac29b5741acc91787d0d284e, type: 3}
replies: []
nextMessage: {fileID: 0}
......@@ -19,6 +19,6 @@ MonoBehaviour:
\u0643\u0628\u0631\u064A\u062A\u0627\u062A \u0646\u062D\u0627\u0633 \u0648\u0636\u064A\u0641\u0647\u0645
\u0639\u0644\u0649 \u0627\u0644\u0645\u064A\u0629 \u0641\u064A \u0627\u0644\u0643\u0648\u0628\u0627\u064A\u0629
\u0627\u0644\u062A\u0627\u0646\u064A\u0629."
voiceClip: {fileID: 8300000, guid: 64cc958fc72ea6247a438c88267e675a, type: 3}
voiceClip: {fileID: 8300000, guid: 6d9dca22d5ba02a49919a290b79703ec, type: 3}
replies: []
nextMessage: {fileID: 0}
......@@ -18,6 +18,6 @@ MonoBehaviour:
\u0627\u0644\u0632\u062C\u0627\u062C\u064A\u0629 \u0648\u0642\u0644\u0651\u0628
\u0627\u0644\u0645\u062D\u0644\u0648\u0644 \u0644\u062D\u062F \u0645\u0627 \u0643\u0628\u0631\u064A\u062A\u0627\u062A
\u0627\u0644\u0646\u062D\u0627\u0633 \u062A\u0630\u0648\u0628 \u062E\u0627\u0644\u0635."
voiceClip: {fileID: 8300000, guid: 4c923e562a8296a4da56acd9cb6b8144, type: 3}
voiceClip: {fileID: 8300000, guid: ef3fa5034825f574e8f924fec4661dca, type: 3}
replies: []
nextMessage: {fileID: 0}
fileFormatVersion: 2
guid: 7b70abcc5a531ce409fed2bf8ee1cfa3
MonoImporter:
guid: 62a5a52e89e78fd4a8384ba319385f7c
folderAsset: yes
DefaultImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: cde36926bdcb1cd459490c704042afcc
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 2b651e0cce500bf44916f8b909fb4476
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: bbb5d031b9f6227459f123a9ecaae502
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 0c2cb96f0a3125d46a0116e6b4b498df
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: c84b41206e3e2624e80d1294e5124c3d
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 06f37731c188fc141b239ace7a3a5e61
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: e38a96158cae1974e81a13859aae62ed
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 71ed7dcf0028edc4f9098f87ceff6c9f
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: b4e0a125acdd8da44a121893acbb35a2
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 5383eec33a3c5d1499aaec49f44f34df
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 7eda89e2d5be08747bfe0c15f4734a89
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: a172752aee2ada64fac727c84110f5a7
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 0a34d7f9954010241b55c13bcb53eef1
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 01a8f1f3ac29b5741acc91787d0d284e
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 6d9dca22d5ba02a49919a290b79703ec
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: ef3fa5034825f574e8f924fec4661dca
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2 1
m_Shader: {fileID: 4800000, guid: bee44b4a58655ee4cbff107302a3e131, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords:
- DR_CEL_EXTRA_ON
- DR_SPECULAR_ON
- _DETAILMAPBLENDINGMODE_MULTIPLY
- _GRADIENTSPACE_WORLD
- _OUTLINESPACE_SCREEN
- _TEXTUREBLENDINGMODE_MULTIPLY
m_InvalidKeywords:
- _CELPRIMARYMODE_NONE
- _FLAT_SHADOWS_ENABLED
- _FLAT_SPECULAR_ENABLED
- _UNITYSHADOWMODE_NONE
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 2000
stringTagMap:
RenderType: Opaque
disabledShaderPasses:
- SRPDEFAULTUNLIT
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _CelCurveTexture:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _CelStepTexture:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AlphaClip: 0
- _BaseMapPremultiply: 0
- _Blend: 0
- _BumpScale: 1
- _CameraDistanceImpact: 0
- _CelExtraEnabled: 1
- _CelNumSteps: 3
- _CelPrimaryEnabled: 0
- _CelPrimaryMode: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailMapBlendingMode: 0
- _DetailMapImpact: 0
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _FlatRimAmount: 0.5
- _FlatRimEdgeSmoothness: 0.031
- _FlatRimEnabled: 1
- _FlatRimLightAlign: 0
- _FlatRimSize: 0.148
- _FlatShadowsEnabled: 1
- _FlatSmoothness: 0.362
- _FlatSpecularEdgeSmoothness: 0.947
- _FlatSpecularEnabled: 1
- _FlatSpecularSize: 0.337
- _FlatSpecularSmoothness: 0.5
- _Flatness: 0.301
- _FlatnessExtra: 0.143
- _FlatnessSecondary: 1
- _GlossMapScale: 1
- _Glossiness: 0
- _GlossyReflections: 1
- _GradientAngle: 180
- _GradientCenterX: 0
- _GradientCenterY: 0
- _GradientEnabled: 0
- _GradientEnd: 0.55
- _GradientSize: 9.51
- _GradientSpace: 0
- _GradientStart: 1.17
- _LightContribution: 0.5
- _LightFalloffSize: 0.0001
- _LightmapDirectionPitch: 0
- _LightmapDirectionYaw: 0
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _OutlineDepthOffset: 0
- _OutlineEnabled: 0
- _OutlineScale: 1
- _OutlineSpace: 0
- _OutlineWidth: 0.5
- _OverrideLightmapDir: 0
- _OverrideShadows: 1
- _OverrideShadowsEnabled: 1
- _Parallax: 0.02
- _QueueOffset: 0
- _RimEnabled: 0
- _SecondaryColor: 1
- _SecondaryColorEnabled: 1
- _SelfShadingSize: 0
- _SelfShadingSizeExtra: 0.083
- _ShadowEdgeSize: 0
- _ShadowEdgeSizeExtra: 0.05
- _ShadowEdgeSmoothness: 0.071
- _ShadowFalloff: 0.01
- _SmoothnessTextureChannel: 0
- _SpecularEnabled: 1
- _SpecularHighlights: 1
- _SrcBlend: 1
- _Surface: 0
- _TextureBlendingMode: 0
- _TextureImpact: 1
- _UVSec: 0
- _UnityShadowMode: 0
- _UnityShadowOcclusion: 0
- _UnityShadowPower: 0
- _UnityShadowSharpness: 1
- _VertexColorsEnabled: 0
- _VertexExtrusionSmoothNormals: 0
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.3132075, g: 0.13713449, b: 0.09159838, a: 1}
- _Color: {r: 0.2951673, g: 0.5189514, b: 0.6320754, a: 1}
- _ColorCelShadow: {r: 0.49056602, g: 0.34478462, b: 0.4476891, a: 1}
- _ColorDim: {r: 0.2528302, g: 0.23414622, b: 0.14072624, a: 0.85}
- _ColorDimCurve: {r: 0.85, g: 0.85, b: 0.85, a: 0.85}
- _ColorDimExtra: {r: 0, g: 0, b: 0, a: 0.85}
- _ColorDimSteps: {r: 0.85, g: 0.85, b: 0.85, a: 0.85}
- _ColorGradient: {r: 0.2905661, g: 0.2905661, b: 0.2905661, a: 1}
- _ColorSecondary: {r: 1, g: 0.55879205, b: 0, a: 1}
- _ColorShadow: {r: 0.5, g: 0.5, b: 0.5, a: 1}
- _ColorShadows: {r: 0.5471698, g: 0.37346402, b: 0.26584196, a: 1}
- _DetailMapColor: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 4.9245777, g: 0, b: 0, a: 1}
- _FlatRimColor: {r: 0, g: 0, b: 0, a: 1}
- _FlatSpecularColor: {r: 1, g: 1, b: 1, a: 1}
- _LightmapDirection: {r: 0, g: 1, b: 0, a: 0}
- _OutlineColor: {r: 0, g: 0, b: 0, a: 1}
- _UnityShadowColor: {r: 0.65, g: 0.65, b: 0.65, a: 1}
m_BuildTextureStacks: []
fileFormatVersion: 2
guid: e6831b2735032774a86c8f000a9e8ecc
guid: 7bc6e735e9a1d324a9a158454feccce8
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
......
......@@ -135,8 +135,8 @@ Material:
- _XRMotionVectorsPass: 1
- _ZWrite: 0
m_Colors:
- _BaseColor: {r: 0, g: 1, b: 0.12079046, a: 0.064701416}
- _Color: {r: 0, g: 1, b: 0.12079383, a: 0.029518094}
- _BaseColor: {r: 0, g: 1, b: 0.111112274, a: 0.22323233}
- _Color: {r: 0, g: 1, b: 0.11120277, a: 0.06290124}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
......@@ -7,12 +7,13 @@ Material:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Copper Strip
m_Name: Zinc Strip 1
m_Shader: {fileID: 4800000, guid: bee44b4a58655ee4cbff107302a3e131, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords:
- DR_CEL_EXTRA_ON
- DR_OUTLINE_ON
- DR_SPECULAR_ON
- _DETAILMAPBLENDINGMODE_MULTIPLY
- _GRADIENTSPACE_WORLD
......@@ -26,8 +27,9 @@ Material:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
m_CustomRenderQueue: 2000
stringTagMap:
RenderType: Opaque
disabledShaderPasses:
- SRPDEFAULTUNLIT
m_LockedProperties:
......@@ -136,7 +138,7 @@ Material:
- _Mode: 0
- _OcclusionStrength: 1
- _OutlineDepthOffset: 0
- _OutlineEnabled: 0
- _OutlineEnabled: 1
- _OutlineScale: 1
- _OutlineSpace: 0
- _OutlineWidth: 1.5
......@@ -170,7 +172,7 @@ Material:
- _VertexExtrusionSmoothNormals: 0
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.32156864, g: 0.1764706, b: 0.07058824, a: 1}
- _BaseColor: {r: 0.381132, g: 0.14212056, b: 0, a: 1}
- _Color: {r: 0.2951673, g: 0.5189514, b: 0.6320754, a: 1}
- _ColorCelShadow: {r: 0.49056602, g: 0.34478462, b: 0.4476891, a: 1}
- _ColorDim: {r: 0.2528302, g: 0.23414622, b: 0.14072624, a: 0.85}
......@@ -184,7 +186,7 @@ Material:
- _DetailMapColor: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 4.9245777, g: 0, b: 0, a: 1}
- _FlatRimColor: {r: 0, g: 0, b: 0, a: 1}
- _FlatSpecularColor: {r: 0.2679245, g: 0.13496947, b: 0, a: 1}
- _FlatSpecularColor: {r: 0.4037736, g: 0.4037736, b: 0.4037736, a: 1}
- _LightmapDirection: {r: 0, g: 1, b: 0, a: 0}
- _OutlineColor: {r: 0, g: 0, b: 0, a: 1}
- _UnityShadowColor: {r: 0.65, g: 0.65, b: 0.65, a: 1}
......
fileFormatVersion: 2
guid: 480c3c725a656c54399589be827b76a8
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
using AL_Arcade.DialogueSystem.Scripts;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerAction : MonoBehaviour
public class AddPlayerAction : MonoBehaviour
{
// Start is called before the first frame update
void Start()
public void SetCurrentObjective(string action)
{
GameContextBuilder.Instance.SetCurrentObjective(action);
}
// Update is called once per frame
void Update()
public void SetPlayerAction(string action)
{
GameContextBuilder.Instance.AddPlayerAction(action);
}
}
fileFormatVersion: 2
guid: 8686cefddb7eea344918e71d9f24effb
guid: 7b70abcc5a531ce409fed2bf8ee1cfa3
MonoImporter:
externalObjects: {}
serializedVersion: 2
......
......@@ -29,7 +29,7 @@ public class ExperimentManager : MonoBehaviour
{
if (Items.All(home => home.doneWithAction))
{
Arrow.DORotate(new Vector3(0, 0, -30f), SpeedArrow).SetLoops(-1, LoopType.Yoyo).SetEase(Ease.Linear);
Arrow.DORotate(new Vector3(0, 0, -30f), SpeedArrow);
}
else
{
......
......@@ -5,12 +5,13 @@ public class FadeAnimation : MonoBehaviour
{
[SerializeField] Material Material;
[SerializeField] float FadeSpeed = .5f;
[SerializeField] float TargetAlpha = .35f;
private void OnEnable()
{
Color c = Material.color;
c.a = 0f;
Material.color = c;
Material.DOFade(.35f, FadeSpeed).SetLoops(-1, LoopType.Yoyo).SetEase(Ease.Linear);
Material.DOFade(TargetAlpha, FadeSpeed).SetLoops(-1, LoopType.Yoyo).SetEase(Ease.Linear);
}
private void OnDisable()
{
......
......@@ -6,6 +6,7 @@ using System;
public class ItemPosition : MonoBehaviour
{
[SerializeField] Transform StartPos;
[SerializeField] UnityEvent EventEnter;
[SerializeField] UnityEvent EventExit;
[SerializeField] GameObject HomeHighlights;
......@@ -25,15 +26,25 @@ public class ItemPosition : MonoBehaviour
[SerializeField] bool inHomePosition;
private void Start()
private void OnEnable()
{
inHome = false;
StartPosition = transform.position;
StartRotation = transform.rotation;
StartScale = transform.localScale;
if(StartPos != null)
{
StartPosition = StartPos.position;
StartRotation = StartPos.rotation;
StartScale = StartPos.localScale;
}
else {
if(StartPosition == Vector3.zero)
{
StartPosition = transform.position;
StartRotation = transform.rotation;
StartScale = transform.localScale;
}
}
}
private void OnTriggerEnter(Collider other)
{
if (other.TryGetComponent<HomeName>(out HomeName HomeHighlights))
......@@ -118,4 +129,8 @@ public class ItemPosition : MonoBehaviour
inHome = false;
EventExit?.Invoke();
}
public void SetTarget (Transform Target)
{
StartPos = Target;
}
}
......@@ -17,11 +17,11 @@ public class LasenersmSpoon : MonoBehaviour, ItemAction
[SerializeField] Vector3 MaxRotateToScoopPowder;
[Header("Step 4")] // move to the Beaker
[SerializeField] Vector3 BeakerPosition;
//[SerializeField] GameObject CopperLasenersmSpoon;
[Header("Step 5")] // place powder in Beaker
[SerializeField] Vector3 RotateToBeaker;
[Header("Step 6")] // move powder to Beaker
[SerializeField] Vector3 MovePowderPosition;
[SerializeField] GameObject CopperLasenersmSpoon;
//[Header("Step 1 scooping some powder")]
//[SerializeField] Vector3 MaxRotateToScoopPowder;
......@@ -49,41 +49,26 @@ public class LasenersmSpoon : MonoBehaviour, ItemAction
sequence.Append(transform.DORotate(MaxRotateToScoopPowder, AnimationDuraction));
//////////////////////////////////////////// Step 4
sequence.Append(transform.DOMove(BeakerPosition, AnimationDuraction));
sequence.Join(BottleHead.DOMove(startPos, AnimationDuraction));
sequence.Join(BottleHead.transform.DORotateQuaternion(startRot, AnimationDuraction));
sequence.AppendCallback(() =>
{
Powder.transform.parent = null;
Powder.GetComponent<MeshRenderer>().material.renderQueue = 3002;
});
//////////////////////////////////////////// Step 5
sequence.Append(transform.DORotate(RotateToBeaker, AnimationDuraction));
/////////////////////////////////////////// Step 6
sequence.Join(Powder.transform.DOMove(MovePowderPosition, MovePowderPositionDuraction));
/////////////////////////////////////////// Final Step
sequence.AppendCallback(() =>
{
GetComponent<ItemPosition>().enabled = true;
Powder.transform.DOScale(Vector3.zero, .5f).OnComplete(()=> Powder.SetActive(false));
GetComponent<ItemPosition>().ReturnToHome();
});
/////////////////////////////////////////// Final Step
//sequence.AppendCallback(() =>
//{
// Powder.SetActive(true);
// GetComponent<ItemPosition>().enabled = false;
//});
//sequence.Append(transform.DOMove(MoveBeakerPosition, AnimationDuraction));
//sequence.Append(transform.DORotate(RotateToPlacePowderInBeaker, AnimationDuraction));
//sequence.JoinCallback(() =>
//{
// Powder.transform.position = new Vector3(Powder.transform.position.x, Powder.transform.position.y, -0.966f);
// Powder.transform.DOMove(MovePowderPosition, MovePowderPositionDuraction);
//}).OnComplete(() =>Powder.SetActive(false));
//sequence.AppendInterval(.1f);
//sequence.AppendCallback(() =>
//{
// GetComponent<ItemPosition>().enabled = true;
// GetComponent<ItemPosition>().ReturnToHome();
//});
}
public void ChangerLasenersmSpoon()
{
......@@ -93,11 +78,7 @@ public class LasenersmSpoon : MonoBehaviour, ItemAction
{
yield return new WaitForSeconds(1.5f);
this.gameObject.SetActive(false);
//CopperLasenersmSpoon.SetActive(true);
}
private void Update()
{
CopperLasenersmSpoon.SetActive(true);
}
public void StopAction()
{
......
using AL_Arcade.DialogueSystem.Scripts;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class AddPlayerAction : MonoBehaviour
{
public void SetCurrentObjective(string action)
{
GameContextBuilder.Instance.SetCurrentObjective(action);
}
public void SetPlayerAction(string action)
{
GameContextBuilder.Instance.AddPlayerAction(action);
}
}
......@@ -56,7 +56,7 @@ public class RayCast : MonoBehaviour
else
{
SetCursor(DefultMouse);
OnRayCast?.Invoke("");
OnRayCast?.Invoke(" ");
}
if (Input.GetMouseButtonUp(0))
......
......@@ -8,14 +8,14 @@ public class Spoon : MonoBehaviour, ItemAction
{
[SerializeField] float AnimationDuraction;
[SerializeField] int MaxLoops;
[SerializeField] float Maxrotation;
[SerializeField] Vector3 Maxrotation;
[SerializeField] LoopType LoopType;
[SerializeField] GameObject AnotherSpoon;
[SerializeField] LiquidVolume liquidVolume;
public void StartAction()
{
TweenLiquidVolume(.2f);
transform.DORotate(new Vector3(-12.59f, Maxrotation, 90), AnimationDuraction)
transform.DORotate(Maxrotation, AnimationDuraction, RotateMode.FastBeyond360)
.SetLoops(MaxLoops).OnComplete( () =>{ GetComponent<ItemPosition>().ReturnToHome(); ChangerSpoon(); });
}
public void ChangerSpoon()
......
......@@ -10,13 +10,13 @@ public class Water : MonoBehaviour, ItemAction
[SerializeField] LiquidVolume LiquidVolume;
[SerializeField] GameObject AnotherWater;
[Header("Effect")]
[SerializeField] float maxRotate;
[SerializeField] Vector3 maxRotate;
[SerializeField] float ToLiquidVolume;
[SerializeField] float timeToLiquidVolume;
public void StartAction()
{
transform.DORotate(new Vector3(2.035555e-13f, 180f, maxRotate), AnimationDuration);
transform.DORotate(maxRotate, AnimationDuration);
LiquidVolume ThisLiquidVolume = GetComponentInChildren<LiquidVolume>();
DOTween.To(() => ThisLiquidVolume.level, x => ThisLiquidVolume.level = x, ToLiquidVolume, timeToLiquidVolume);
GetComponent<SoundEffect>().PlaySound();
......@@ -34,7 +34,8 @@ public class Water : MonoBehaviour, ItemAction
public void ChangerWater()
{
StartCoroutine(Enable());
if(AnotherWater!=null)
StartCoroutine(Enable());
}
IEnumerator Enable()
{
......
......@@ -28,8 +28,8 @@ Material:
m_InvalidKeywords:
- _SURFACE_TYPE_TRANSPARENT
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 1
m_CustomRenderQueue: 4000
stringTagMap: {}
disabledShaderPasses:
......
......@@ -96,13 +96,12 @@ Material:
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.5
......@@ -111,13 +110,12 @@ Material:
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _UVSec: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.654902, g: 0.6666667, b: 0.6862745, a: 1}
- _Color: {r: 0.654902, g: 0.6666667, b: 0.68627447, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 0}
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
--- !u!114 &2897192714301887273
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment