Commit b06b2bdf authored by Abdulrahman Mohammed's avatar Abdulrahman Mohammed

Fix some erros and improve Digestive System 3D game

parent 9ccf3b5a
...@@ -19,7 +19,8 @@ namespace AL_Arcade.DialogueSystem.Scripts ...@@ -19,7 +19,8 @@ namespace AL_Arcade.DialogueSystem.Scripts
[SerializeField] Sprite SpeakIcon; [SerializeField] Sprite SpeakIcon;
[SerializeField] Sprite DefultIcon; [SerializeField] Sprite DefultIcon;
[SerializeField] Color DefultColor; [SerializeField] Color DefultColor;
[SerializeField] Transform SkipButton; public Transform SkipButton;
public bool AiIsSpeaking;
#region Singleton #region Singleton
private static AIVoiceHandler instance; private static AIVoiceHandler instance;
public static AIVoiceHandler Instance public static AIVoiceHandler Instance
...@@ -177,6 +178,7 @@ namespace AL_Arcade.DialogueSystem.Scripts ...@@ -177,6 +178,7 @@ namespace AL_Arcade.DialogueSystem.Scripts
private void EndProcessing() private void EndProcessing()
{ {
isProcessing = false; isProcessing = false;
OnProcessingComplete?.Invoke(); OnProcessingComplete?.Invoke();
Debug.Log("[AIVoiceHandler] Processing complete"); Debug.Log("[AIVoiceHandler] Processing complete");
} }
...@@ -324,6 +326,7 @@ namespace AL_Arcade.DialogueSystem.Scripts ...@@ -324,6 +326,7 @@ namespace AL_Arcade.DialogueSystem.Scripts
Fail("Failed to create valid AudioClip"); Fail("Failed to create valid AudioClip");
yield break; yield break;
} }
AiIsSpeaking = true;
// Play the audio clip on the cached AudioSource // Play the audio clip on the cached AudioSource
PlayAudioClip(audioClip); PlayAudioClip(audioClip);
...@@ -356,7 +359,6 @@ namespace AL_Arcade.DialogueSystem.Scripts ...@@ -356,7 +359,6 @@ namespace AL_Arcade.DialogueSystem.Scripts
// Assign and play the new clip // Assign and play the new clip
targetAudioSource.clip = clip; targetAudioSource.clip = clip;
targetAudioSource.Play(); targetAudioSource.Play();
Debug.Log($"[AIVoiceHandler] Playing audio response on AudioSource"); Debug.Log($"[AIVoiceHandler] Playing audio response on AudioSource");
Debug.Log($" Clip: {clip.name}"); Debug.Log($" Clip: {clip.name}");
Debug.Log($" Duration: {clip.length:F2} seconds"); Debug.Log($" Duration: {clip.length:F2} seconds");
......
...@@ -87,6 +87,11 @@ namespace AL_Arcade.DialogueSystem.Scripts ...@@ -87,6 +87,11 @@ namespace AL_Arcade.DialogueSystem.Scripts
if (voiceAudioSource != null && voiceAudioSource.isPlaying) if (voiceAudioSource != null && voiceAudioSource.isPlaying)
{ {
voiceAudioSource.Stop(); voiceAudioSource.Stop();
if (!AIVoiceHandler.Instance.AiIsSpeaking)
{
InGameAIChatPanel.Instance.SlideOutAITextPanel();
AIVoiceHandler.Instance.SkipButton.GetComponent<Button>().onClick?.Invoke();
}
Debug.Log("[DialogueManager] Stopped current dialogue audio"); Debug.Log("[DialogueManager] Stopped current dialogue audio");
if (currentDialogueUI != null) LayoutRebuilder.ForceRebuildLayoutImmediate(currentDialogueUI.GetComponent<RectTransform>()); if (currentDialogueUI != null) LayoutRebuilder.ForceRebuildLayoutImmediate(currentDialogueUI.GetComponent<RectTransform>());
...@@ -122,25 +127,27 @@ namespace AL_Arcade.DialogueSystem.Scripts ...@@ -122,25 +127,27 @@ namespace AL_Arcade.DialogueSystem.Scripts
bool isAudioPlay; bool isAudioPlay;
void Update() void Update()
{ {
if (IsDialogueAudioPlaying()) if (!AIVoiceHandler.Instance.AiIsSpeaking)
{ {
if (!isAudioPlay) if (IsDialogueAudioPlaying())
{ {
currentMessageForEvent.StartEventWhenAudioPlay?.Invoke(); if (!isAudioPlay)
if (currentMessageForEvent.ObjectActive != null) {
currentMessageForEvent.ObjectActive.SetActive(false); currentMessageForEvent.StartEventWhenAudioPlay?.Invoke();
isAudioPlay = true; if (currentMessageForEvent.ObjectActive != null)
currentMessageForEvent.ObjectActive.SetActive(false);
isAudioPlay = true;
}
} }
} else
else
{
if (isAudioPlay)
{ {
currentMessageForEvent.StartEventWhenAudioStop?.Invoke(); if (isAudioPlay)
if (currentMessageForEvent.ObjectActive != null) {
currentMessageForEvent.ObjectActive.SetActive(true); currentMessageForEvent.StartEventWhenAudioStop?.Invoke();
if (currentMessageForEvent.ObjectActive != null)
isAudioPlay = false; currentMessageForEvent.ObjectActive.SetActive(true);
isAudioPlay = false;
}
} }
} }
......
...@@ -9,6 +9,7 @@ namespace AL_Arcade.DialogueSystem.Scripts ...@@ -9,6 +9,7 @@ namespace AL_Arcade.DialogueSystem.Scripts
[RequireComponent(typeof(Button))] [RequireComponent(typeof(Button))]
public class DialogueSkipButton : MonoBehaviour public class DialogueSkipButton : MonoBehaviour
{ {
[SerializeField] bool HideAiPanelWhenSkip;
private Button button; private Button button;
void Awake() void Awake()
...@@ -27,13 +28,17 @@ namespace AL_Arcade.DialogueSystem.Scripts ...@@ -27,13 +28,17 @@ namespace AL_Arcade.DialogueSystem.Scripts
{ {
if (DialogueManager.Instance != null) if (DialogueManager.Instance != null)
{ {
if (DialogueManager.Instance.IsDialogueAudioPlaying()) if (HideAiPanelWhenSkip)
{ {
DialogueManager.Instance.StopCurrentDialogueAudio(); if (DialogueManager.Instance.IsDialogueAudioPlaying())
DialogueManager.Instance.StopCurrentDialogueAudio();
InGameAIChatPanel.Instance.SlideOutAITextPanel();
DialogueManager.Instance.SkipCurrentDialogue(true);
} }
else else
{ {
DialogueManager.Instance.SkipCurrentDialogue(true); if (DialogueManager.Instance.IsDialogueAudioPlaying())
DialogueManager.Instance.StopCurrentDialogueAudio();
} }
} }
} }
......
...@@ -17,6 +17,7 @@ namespace AL_Arcade.DialogueSystem.Scripts ...@@ -17,6 +17,7 @@ namespace AL_Arcade.DialogueSystem.Scripts
public class InGameAIChatPanel : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler public class InGameAIChatPanel : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
{ {
#region Inspector Fields #region Inspector Fields
public static InGameAIChatPanel Instance { get; private set; }
[Header("UI References")] [Header("UI References")]
[SerializeField] private RectTransform hoverArea; [SerializeField] private RectTransform hoverArea;
...@@ -74,6 +75,10 @@ namespace AL_Arcade.DialogueSystem.Scripts ...@@ -74,6 +75,10 @@ namespace AL_Arcade.DialogueSystem.Scripts
void Awake() void Awake()
{ {
if (Instance == null)
Instance = this;
else
Destroy(this);
ValidateReferences(); ValidateReferences();
InitializeMicrophone(); InitializeMicrophone();
} }
...@@ -244,6 +249,7 @@ namespace AL_Arcade.DialogueSystem.Scripts ...@@ -244,6 +249,7 @@ namespace AL_Arcade.DialogueSystem.Scripts
.OnComplete(() => .OnComplete(() =>
{ {
isCharAreaVisible = false; isCharAreaVisible = false;
Debug.Log("[InGameAIChatPanel] CharArea slide out complete"); Debug.Log("[InGameAIChatPanel] CharArea slide out complete");
}); });
} }
...@@ -270,9 +276,10 @@ namespace AL_Arcade.DialogueSystem.Scripts ...@@ -270,9 +276,10 @@ namespace AL_Arcade.DialogueSystem.Scripts
.SetEase(slideEaseType); .SetEase(slideEaseType);
DialogueManager.Instance.StopCurrentDialogueAudio(); DialogueManager.Instance.StopCurrentDialogueAudio();
} }
private void SlideOutAITextPanel() public void SlideOutAITextPanel()
{ {
if (!isAITextPanelVisible) return; if (!isAITextPanelVisible) return;
AIVoiceHandler.Instance.AiIsSpeaking = false;
Debug.Log("[InGameAIChatPanel] Sliding out AITextPanel"); Debug.Log("[InGameAIChatPanel] Sliding out AITextPanel");
...@@ -282,6 +289,7 @@ namespace AL_Arcade.DialogueSystem.Scripts ...@@ -282,6 +289,7 @@ namespace AL_Arcade.DialogueSystem.Scripts
.SetUpdate(true) .SetUpdate(true)
.OnComplete(() => .OnComplete(() =>
{ {
isAITextPanelVisible = false; isAITextPanelVisible = false;
recordButtonImage.GetComponent<Animator>().enabled = false; recordButtonImage.GetComponent<Animator>().enabled = false;
recordButtonImage.sprite = idleSprite; recordButtonImage.sprite = idleSprite;
......
fileFormatVersion: 2
guid: b3a6612c5d3f10d4f81823e8740bd481
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 0cf2c2c63b36e444aa438e21ac01449e
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:
...@@ -45,12 +45,13 @@ MonoBehaviour: ...@@ -45,12 +45,13 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: Assembly-CSharp::AL_Arcade.DialogueSystem.Scripts.DialogueTrigger m_EditorClassIdentifier: Assembly-CSharp::AL_Arcade.DialogueSystem.Scripts.DialogueTrigger
dialogueSequence: {fileID: 0} dialogueSequence: {fileID: 0}
singleMessage: {fileID: 11400000, guid: f7e62faae07dc3344850959895f07e21, type: 2} singleMessage: {fileID: 11400000, guid: cdb00078f3134c14aa3d7cd2a2c99b66, type: 2}
triggerOnStart: 1 triggerOnStart: 1
triggerOnCollision: 0 triggerOnCollision: 0
triggerOnInteract: 0 triggerOnInteract: 0
interactKey: 101 interactKey: 101
interactionPrompt: {fileID: 0} interactionPrompt: {fileID: 0}
ObjectActive: {fileID: 0}
StartEventWhenAudioPlay: StartEventWhenAudioPlay:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
......
This diff is collapsed.
%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: 9fa73e80dba941a3901cb680b6419c69, type: 3}
m_Name: DialogueMessage_AR
m_EditorClassIdentifier:
characterSprite: {fileID: 21300000, guid: 4e528919e91e3864bbf1f9554ae7522b, type: 3}
characterName:
messageText: "\u0627\u0647\u0644\u0627 \u0628\u064A\u0643 \u0627\u0646\u0627 \u0639\u0646\u0627\u0646"
voiceClip: {fileID: 8300000, guid: 0cf2c2c63b36e444aa438e21ac01449e, type: 3}
replies: []
nextMessage: {fileID: 0}
fileFormatVersion: 2
guid: cdb00078f3134c14aa3d7cd2a2c99b66
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CursorVisible : MonoBehaviour
{
[SerializeField] bool isCursorVisible;
private void Start()
{
if(isCursorVisible) return;
Cursor.lockState = CursorLockMode.Locked;
Cursor.visible = false;
}
void Update()
{
if (Input.GetKeyDown(KeyCode.Escape))
{
Cursor.lockState = Cursor.lockState == CursorLockMode.Locked ? CursorLockMode.None : CursorLockMode.Locked;
Cursor.visible = !Cursor.visible;
}
}
}
fileFormatVersion: 2
guid: c4bd99238b122624da1cf0612dc45d28
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
...@@ -2,21 +2,31 @@ ...@@ -2,21 +2,31 @@
%TAG !u! tag:unity3d.com,2011: %TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000 --- !u!21 &2100000
Material: Material:
serializedVersion: 6 serializedVersion: 8
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_Name: Car-Set1-Car1Lights3 m_Name: Car-Set1-Car1Lights3
m_Shader: {fileID: 4800000, guid: bee44b4a58655ee4cbff107302a3e131, type: 3} m_Shader: {fileID: 4800000, guid: bee44b4a58655ee4cbff107302a3e131, type: 3}
m_ShaderKeywords: DR_CEL_EXTRA_ON DR_CEL_PRIMARY_ON _FLAT_SHADOWS_ENABLED _FLAT_SPECULAR_ENABLED m_Parent: {fileID: 0}
_UNITYSHADOWMODE_MULTIPLY m_ModifiedSerializedProperties: 0
m_ValidKeywords:
- DR_CEL_EXTRA_ON
- _CELPRIMARYMODE_SINGLE
- _TEXTUREBLENDINGMODE_MULTIPLY
- _UNITYSHADOWMODE_MULTIPLY
m_InvalidKeywords:
- DR_CEL_PRIMARY_ON
- _FLAT_SHADOWS_ENABLED
- _FLAT_SPECULAR_ENABLED
m_LightmapFlags: 4 m_LightmapFlags: 4
m_EnableInstancingVariants: 1 m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0 m_DoubleSidedGI: 0
m_CustomRenderQueue: -1 m_CustomRenderQueue: -1
stringTagMap: {} stringTagMap: {}
disabledShaderPasses: [] disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties: m_SavedProperties:
serializedVersion: 3 serializedVersion: 3
m_TexEnvs: m_TexEnvs:
...@@ -64,12 +74,16 @@ Material: ...@@ -64,12 +74,16 @@ Material:
m_Texture: {fileID: 0} m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats: m_Floats:
- _AlphaClip: 0
- _Blend: 0
- _BumpScale: 1 - _BumpScale: 1
- _CelExtraEnabled: 1 - _CelExtraEnabled: 1
- _CelNumSteps: 3 - _CelNumSteps: 3
- _CelPrimaryEnabled: 1 - _CelPrimaryEnabled: 1
- _CelPrimaryMode: 1 - _CelPrimaryMode: 1
- _Cull: 2
- _Cutoff: 0.5 - _Cutoff: 0.5
- _DetailNormalMapScale: 1 - _DetailNormalMapScale: 1
- _DstBlend: 0 - _DstBlend: 0
...@@ -98,12 +112,16 @@ Material: ...@@ -98,12 +112,16 @@ Material:
- _GradientSize: 10 - _GradientSize: 10
- _GradientStart: 1.17 - _GradientStart: 1.17
- _LightContribution: 0.5 - _LightContribution: 0.5
- _LightmapDirectionPitch: 0
- _LightmapDirectionYaw: 0
- _Metallic: 0 - _Metallic: 0
- _Mode: 0 - _Mode: 0
- _OcclusionStrength: 1 - _OcclusionStrength: 1
- _OverrideLightmapDir: 0
- _OverrideShadows: 1 - _OverrideShadows: 1
- _OverrideShadowsEnabled: 1 - _OverrideShadowsEnabled: 1
- _Parallax: 0.02 - _Parallax: 0.02
- _QueueOffset: 0
- _RimEnabled: 0 - _RimEnabled: 0
- _SecondaryColor: 1 - _SecondaryColor: 1
- _SecondaryColorEnabled: 1 - _SecondaryColorEnabled: 1
...@@ -117,6 +135,8 @@ Material: ...@@ -117,6 +135,8 @@ Material:
- _SpecularEnabled: 0 - _SpecularEnabled: 0
- _SpecularHighlights: 1 - _SpecularHighlights: 1
- _SrcBlend: 1 - _SrcBlend: 1
- _Surface: 0
- _TextureBlendingMode: 0
- _TextureImpact: 1 - _TextureImpact: 1
- _UVSec: 0 - _UVSec: 0
- _UnityShadowMode: 1 - _UnityShadowMode: 1
...@@ -138,4 +158,6 @@ Material: ...@@ -138,4 +158,6 @@ Material:
- _EmissionColor: {r: 4.9245777, g: 0, b: 0, a: 1} - _EmissionColor: {r: 4.9245777, g: 0, b: 0, a: 1}
- _FlatRimColor: {r: 0.06274509, g: 0.3764706, b: 0.36200908, a: 1} - _FlatRimColor: {r: 0.06274509, g: 0.3764706, b: 0.36200908, a: 1}
- _FlatSpecularColor: {r: 0.3474101, g: 0.3490566, b: 0.348743, a: 1} - _FlatSpecularColor: {r: 0.3474101, g: 0.3490566, b: 0.348743, a: 1}
- _LightmapDirection: {r: 0, g: 1, b: 0, a: 0}
- _UnityShadowColor: {r: 0.65, g: 0.65, b: 0.65, a: 1} - _UnityShadowColor: {r: 0.65, g: 0.65, b: 0.65, a: 1}
m_BuildTextureStacks: []
...@@ -34,7 +34,7 @@ Material: ...@@ -34,7 +34,7 @@ Material:
- _MainTex: - _MainTex:
m_Texture: {fileID: 2800000, guid: 348fa4d278c53ad4dacd07df1e63a248, type: 3} m_Texture: {fileID: 2800000, guid: 348fa4d278c53ad4dacd07df1e63a248, type: 3}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
m_Offset: {x: 0.60922885, y: 0} m_Offset: {x: 19.045631, y: 0}
- _MainTex2: - _MainTex2:
m_Texture: {fileID: 2800000, guid: bef54341b6d21864c82d47f3bed4c7db, type: 3} m_Texture: {fileID: 2800000, guid: bef54341b6d21864c82d47f3bed4c7db, type: 3}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
......
This diff is collapsed.
...@@ -239,7 +239,7 @@ GameObject: ...@@ -239,7 +239,7 @@ GameObject:
- component: {fileID: 76858059} - component: {fileID: 76858059}
- component: {fileID: 76858058} - component: {fileID: 76858058}
m_Layer: 5 m_Layer: 5
m_Name: Skip m_Name: Sound Off
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
...@@ -262,9 +262,9 @@ RectTransform: ...@@ -262,9 +262,9 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0.5} m_AnchorMin: {x: 1, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5} m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: -87, y: -26.88} m_AnchoredPosition: {x: 0, y: -75}
m_SizeDelta: {x: 100, y: 100} m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 1, y: 0.5}
--- !u!114 &76858058 --- !u!114 &76858058
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -277,6 +277,7 @@ MonoBehaviour: ...@@ -277,6 +277,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 70c3dd5801d696f489925c37bb6ad2f6, type: 3} m_Script: {fileID: 11500000, guid: 70c3dd5801d696f489925c37bb6ad2f6, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
HideAiPanelWhenSkip: 0
--- !u!114 &76858059 --- !u!114 &76858059
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -1273,7 +1274,7 @@ MonoBehaviour: ...@@ -1273,7 +1274,7 @@ MonoBehaviour:
m_OnCullStateChanged: m_OnCullStateChanged:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_Sprite: {fileID: 21300000, guid: e630741edec6d486b8e4f0026c106e8e, type: 3} m_Sprite: {fileID: 21300000, guid: b3a6612c5d3f10d4f81823e8740bd481, type: 3}
m_Type: 0 m_Type: 0
m_PreserveAspect: 0 m_PreserveAspect: 0
m_FillCenter: 1 m_FillCenter: 1
...@@ -1413,7 +1414,7 @@ GameObject: ...@@ -1413,7 +1414,7 @@ GameObject:
- component: {fileID: 319621034} - component: {fileID: 319621034}
- component: {fileID: 319621033} - component: {fileID: 319621033}
m_Layer: 5 m_Layer: 5
m_Name: Button (1) m_Name: Sound Off
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
...@@ -1451,6 +1452,7 @@ MonoBehaviour: ...@@ -1451,6 +1452,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 70c3dd5801d696f489925c37bb6ad2f6, type: 3} m_Script: {fileID: 11500000, guid: 70c3dd5801d696f489925c37bb6ad2f6, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
HideAiPanelWhenSkip: 0
--- !u!114 &319621034 --- !u!114 &319621034
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -1675,6 +1677,7 @@ GameObject: ...@@ -1675,6 +1677,7 @@ GameObject:
- component: {fileID: 361320325} - component: {fileID: 361320325}
- component: {fileID: 361320323} - component: {fileID: 361320323}
- component: {fileID: 361320324} - component: {fileID: 361320324}
- component: {fileID: 361320326}
m_Layer: 5 m_Layer: 5
m_Name: Exit m_Name: Exit
m_TagString: Untagged m_TagString: Untagged
...@@ -1775,20 +1778,7 @@ MonoBehaviour: ...@@ -1775,20 +1778,7 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 361320323} m_TargetGraphic: {fileID: 361320323}
m_OnClick: m_OnClick:
m_PersistentCalls: m_PersistentCalls:
m_Calls: m_Calls: []
- m_Target: {fileID: 1986441879}
m_TargetAssemblyTypeName: AL_Arcade.DialogueSystem.Scripts.InGameAIChatPanel,
Assembly-CSharp
m_MethodName: SlideOutPanel
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!222 &361320325 --- !u!222 &361320325
CanvasRenderer: CanvasRenderer:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -1797,6 +1787,19 @@ CanvasRenderer: ...@@ -1797,6 +1787,19 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 361320321} m_GameObject: {fileID: 361320321}
m_CullTransparentMesh: 1 m_CullTransparentMesh: 1
--- !u!114 &361320326
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 361320321}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 70c3dd5801d696f489925c37bb6ad2f6, type: 3}
m_Name:
m_EditorClassIdentifier:
HideAiPanelWhenSkip: 1
--- !u!4 &420901144 stripped --- !u!4 &420901144 stripped
Transform: Transform:
m_CorrespondingSourceObject: {fileID: 5558236241046445408, guid: 4cdd0f536b998c141987f5362d20d263, type: 3} m_CorrespondingSourceObject: {fileID: 5558236241046445408, guid: 4cdd0f536b998c141987f5362d20d263, type: 3}
...@@ -2280,7 +2283,7 @@ AudioSource: ...@@ -2280,7 +2283,7 @@ AudioSource:
OutputAudioMixerGroup: {fileID: 0} OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 0} m_audioClip: {fileID: 0}
m_PlayOnAwake: 1 m_PlayOnAwake: 1
m_Volume: 1 m_Volume: 0.5
m_Pitch: 1 m_Pitch: 1
Loop: 0 Loop: 0
Mute: 0 Mute: 0
...@@ -5367,6 +5370,51 @@ MeshFilter: ...@@ -5367,6 +5370,51 @@ MeshFilter:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1065847359} m_GameObject: {fileID: 1065847359}
m_Mesh: {fileID: 7600554536398142898, guid: cd7f85ee741310c468d5a80ea1bcc6cc, type: 3} m_Mesh: {fileID: 7600554536398142898, guid: cd7f85ee741310c468d5a80ea1bcc6cc, type: 3}
--- !u!1 &1088359187
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1088359188}
- component: {fileID: 1088359189}
m_Layer: 0
m_Name: Cursor Visible
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1088359188
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1088359187}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1656506239}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1088359189
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1088359187}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c4bd99238b122624da1cf0612dc45d28, type: 3}
m_Name:
m_EditorClassIdentifier:
isCursorVisible: 1
--- !u!1 &1117050155 stripped --- !u!1 &1117050155 stripped
GameObject: GameObject:
m_CorrespondingSourceObject: {fileID: 8780654592860833253, guid: cd5c0226d9d4b554885c988834915042, type: 3} m_CorrespondingSourceObject: {fileID: 8780654592860833253, guid: cd5c0226d9d4b554885c988834915042, type: 3}
...@@ -5518,7 +5566,7 @@ GameObject: ...@@ -5518,7 +5566,7 @@ GameObject:
- component: {fileID: 1142051817} - component: {fileID: 1142051817}
- component: {fileID: 1142051816} - component: {fileID: 1142051816}
m_Layer: 5 m_Layer: 5
m_Name: wer m_Name: Icon
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
...@@ -5541,7 +5589,7 @@ RectTransform: ...@@ -5541,7 +5589,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100} m_SizeDelta: {x: 135, y: 135}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1142051816 --- !u!114 &1142051816
MonoBehaviour: MonoBehaviour:
...@@ -5563,7 +5611,7 @@ MonoBehaviour: ...@@ -5563,7 +5611,7 @@ MonoBehaviour:
m_OnCullStateChanged: m_OnCullStateChanged:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_Sprite: {fileID: 21300000, guid: e630741edec6d486b8e4f0026c106e8e, type: 3} m_Sprite: {fileID: 21300000, guid: b3a6612c5d3f10d4f81823e8740bd481, type: 3}
m_Type: 0 m_Type: 0
m_PreserveAspect: 0 m_PreserveAspect: 0
m_FillCenter: 1 m_FillCenter: 1
...@@ -6317,11 +6365,11 @@ RectTransform: ...@@ -6317,11 +6365,11 @@ RectTransform:
- {fileID: 319621032} - {fileID: 319621032}
m_Father: {fileID: 2101710789} m_Father: {fileID: 2101710789}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -40, y: -60} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 643.4009, y: 352.24402} m_SizeDelta: {x: 643.4009, y: 352.24402}
m_Pivot: {x: 1, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1393094591 --- !u!114 &1393094591
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -7338,7 +7386,7 @@ GameObject: ...@@ -7338,7 +7386,7 @@ GameObject:
- component: {fileID: 1550324933} - component: {fileID: 1550324933}
- component: {fileID: 1550324932} - component: {fileID: 1550324932}
m_Layer: 5 m_Layer: 5
m_Name: Button m_Name: Sound Off
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
...@@ -7376,6 +7424,7 @@ MonoBehaviour: ...@@ -7376,6 +7424,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 70c3dd5801d696f489925c37bb6ad2f6, type: 3} m_Script: {fileID: 11500000, guid: 70c3dd5801d696f489925c37bb6ad2f6, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
HideAiPanelWhenSkip: 0
--- !u!114 &1550324933 --- !u!114 &1550324933
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -7781,6 +7830,7 @@ Transform: ...@@ -7781,6 +7830,7 @@ Transform:
- {fileID: 1543356322} - {fileID: 1543356322}
- {fileID: 831656135} - {fileID: 831656135}
- {fileID: 1535376858} - {fileID: 1535376858}
- {fileID: 1088359188}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1657266304 --- !u!1001 &1657266304
...@@ -9541,7 +9591,7 @@ GameObject: ...@@ -9541,7 +9591,7 @@ GameObject:
- component: {fileID: 1950053472} - component: {fileID: 1950053472}
- component: {fileID: 1950053471} - component: {fileID: 1950053471}
m_Layer: 5 m_Layer: 5
m_Name: wer m_Name: Icon
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
...@@ -9586,7 +9636,7 @@ MonoBehaviour: ...@@ -9586,7 +9636,7 @@ MonoBehaviour:
m_OnCullStateChanged: m_OnCullStateChanged:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_Sprite: {fileID: 21300000, guid: e630741edec6d486b8e4f0026c106e8e, type: 3} m_Sprite: {fileID: 21300000, guid: b3a6612c5d3f10d4f81823e8740bd481, type: 3}
m_Type: 0 m_Type: 0
m_PreserveAspect: 0 m_PreserveAspect: 0
m_FillCenter: 1 m_FillCenter: 1
...@@ -9640,9 +9690,9 @@ RectTransform: ...@@ -9640,9 +9690,9 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0.5} m_AnchorMin: {x: 1, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5} m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: -87, y: 89} m_AnchoredPosition: {x: 0, y: 75}
m_SizeDelta: {x: 100, y: 100} m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 1, y: 0.5}
--- !u!114 &1963610780 --- !u!114 &1963610780
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -9751,7 +9801,7 @@ RectTransform: ...@@ -9751,7 +9801,7 @@ RectTransform:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1986441877} m_GameObject: {fileID: 1986441877}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
...@@ -9763,9 +9813,9 @@ RectTransform: ...@@ -9763,9 +9813,9 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0.5} m_AnchorMin: {x: 1, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5} m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: -363.583, y: 136} m_AnchoredPosition: {x: -40, y: 0}
m_SizeDelta: {x: 727.546, y: 496.67} m_SizeDelta: {x: 727.546, y: 496.67}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 1, y: 0.5}
--- !u!114 &1986441879 --- !u!114 &1986441879
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -9945,8 +9995,8 @@ RectTransform: ...@@ -9945,8 +9995,8 @@ RectTransform:
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 557563501} - {fileID: 557563501}
- {fileID: 1429443676}
- {fileID: 1550324931} - {fileID: 1550324931}
- {fileID: 1429443676}
- {fileID: 716999055} - {fileID: 716999055}
- {fileID: 924052766} - {fileID: 924052766}
- {fileID: 1920447151} - {fileID: 1920447151}
...@@ -10948,9 +10998,9 @@ RectTransform: ...@@ -10948,9 +10998,9 @@ RectTransform:
m_Children: m_Children:
- {fileID: 1044829372} - {fileID: 1044829372}
- {fileID: 1393094590} - {fileID: 1393094590}
- {fileID: 1986441878}
- {fileID: 659123384} - {fileID: 659123384}
- {fileID: 1505125135} - {fileID: 1505125135}
- {fileID: 1986441878}
m_Father: {fileID: 2055064553} m_Father: {fileID: 2055064553}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
...@@ -10979,6 +11029,7 @@ MonoBehaviour: ...@@ -10979,6 +11029,7 @@ MonoBehaviour:
DefultIcon: {fileID: 21300000, guid: cbe4da29d68394474941f05fed2476ce, type: 3} DefultIcon: {fileID: 21300000, guid: cbe4da29d68394474941f05fed2476ce, type: 3}
DefultColor: {r: 0.9921569, g: 0.5647059, b: 0, a: 1} DefultColor: {r: 0.9921569, g: 0.5647059, b: 0, a: 1}
SkipButton: {fileID: 76858057} SkipButton: {fileID: 76858057}
AiIsSpeaking: 0
--- !u!114 &2101710791 --- !u!114 &2101710791
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
......
...@@ -11,6 +11,22 @@ public class BioAtomEffect : MonoBehaviour ...@@ -11,6 +11,22 @@ public class BioAtomEffect : MonoBehaviour
[SerializeField] float FadeDuration; [SerializeField] float FadeDuration;
[SerializeField] float MaxValue; [SerializeField] float MaxValue;
[SerializeField] SplineAnimate[] FoodsToMove; [SerializeField] SplineAnimate[] FoodsToMove;
[SerializeField] Transform Atom;
[SerializeField] Vector3 MoveFrom;
[SerializeField] float Duration;
[SerializeField] Transform GlowEffect;
private void Start()
{
Atom.DOMove(MoveFrom, Duration).From().OnComplete(() =>
{
GlowEffect.gameObject.SetActive(true);
Camera.main.GetComponent<OrbitCamera>().enabled = true;
AtomSoundEffect.Instance.IsStartClip();
});
}
public void FadeScreenBlack() public void FadeScreenBlack()
{ {
SpriteRenderer.DOFade(MaxValue, FadeDuration).SetLoops(-1, LoopType.Yoyo).SetEase(Ease.Linear); SpriteRenderer.DOFade(MaxValue, FadeDuration).SetLoops(-1, LoopType.Yoyo).SetEase(Ease.Linear);
......
...@@ -12,21 +12,10 @@ public class OrbitCamera : MonoBehaviour ...@@ -12,21 +12,10 @@ public class OrbitCamera : MonoBehaviour
float _rotationX; float _rotationX;
float _rotationY; float _rotationY;
float _currentDistance; float _currentDistance;
private void Start()
{
Cursor.lockState = CursorLockMode.Locked;
Cursor.visible = false;
}
void LateUpdate() void LateUpdate()
{ {
if (Input.GetKeyDown(KeyCode.Escape))
{
Cursor.lockState = Cursor.lockState == CursorLockMode.Locked ? CursorLockMode.None : CursorLockMode.Locked;
Cursor.visible = !Cursor.visible;
}
float mouseX = Input.GetAxis("Mouse X") * Sensitivity * Time.deltaTime; float mouseX = Input.GetAxis("Mouse X") * Sensitivity * Time.deltaTime;
float mouseY = Input.GetAxis("Mouse Y") * Sensitivity * Time.deltaTime; float mouseY = Input.GetAxis("Mouse Y") * Sensitivity * Time.deltaTime;
......
...@@ -8,16 +8,26 @@ public class PlayerMinimap : MonoBehaviour ...@@ -8,16 +8,26 @@ public class PlayerMinimap : MonoBehaviour
[SerializeField] RectTransform[] Points; [SerializeField] RectTransform[] Points;
[SerializeField] HumanMinimap playerProgress; [SerializeField] HumanMinimap playerProgress;
[SerializeField] RectTransform PlayerInMinimap; [SerializeField] RectTransform PlayerInMinimap;
[SerializeField] float PlayerInMinimapSpeed;
[SerializeField] int decreasePoints;
private void Update() private void Update()
{ {
float PlayerInMinimapProgress = (Points.Length - 1) * playerProgress.progress; float PlayerInMinimapProgress = (Points.Length - decreasePoints) * playerProgress.progress;
int SegmentIndex = Mathf.FloorToInt(PlayerInMinimapProgress); int SegmentIndex = Mathf.FloorToInt(PlayerInMinimapProgress);
float t = PlayerInMinimapProgress - SegmentIndex; float t = PlayerInMinimapProgress - SegmentIndex;
if (SegmentIndex >= Points.Length - 1) if (SegmentIndex >= Points.Length - decreasePoints)
PlayerInMinimap.position = Points[Points.Length - 1].position; PlayerInMinimap.position = Points[Points.Length - decreasePoints].position;
else else
PlayerInMinimap.position = Vector3.Lerp(Points[SegmentIndex].position, Points[SegmentIndex + 1].position, t); {
Vector3 targetPos = Vector3.Lerp(Points[SegmentIndex].position, Points[SegmentIndex + 1].position, t);
PlayerInMinimap.position = Vector3.Lerp(PlayerInMinimap.position, targetPos, Time.deltaTime * PlayerInMinimapSpeed);
}
}
public void DecreasePoints(int value)
{
decreasePoints = value;
} }
} }
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