Commit 452a9fc6 authored by Yousef Sameh's avatar Yousef Sameh

Tutorial

parent cbf5e5fb
......@@ -5,7 +5,6 @@ using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
using static UnityEngine.Windows.WebCam.VideoCapture;
namespace AL_Arcade.DialogueSystem.Scripts
{
......
using System;
using System.Collections;
using System.IO;
using UnityEngine;
using UnityEngine.UI;
using TMPro;
using ALArcade.ArabicTMP;
using UnityEngine;
namespace AL_Arcade.DialogueSystem.Scripts
{
......
fileFormatVersion: 2
guid: 3a1518ae4d222110c817c9a6112ceb44
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
......@@ -13,26 +13,18 @@ MonoBehaviour:
m_Name: Vignette
m_EditorClassIdentifier:
active: 1
m_AdvancedMode: 0
color:
m_OverrideState: 1
m_Value: {r: 0, g: 0, b: 0, a: 1}
hdr: 0
showAlpha: 0
showEyeDropper: 1
center:
m_OverrideState: 0
m_Value: {x: 0.5, y: 0.5}
intensity:
m_OverrideState: 1
m_Value: 0.312
min: 0
max: 1
smoothness:
m_OverrideState: 1
m_Value: 0.365
min: 0.01
max: 1
rounded:
m_OverrideState: 0
m_Value: 0
......@@ -49,40 +41,40 @@ MonoBehaviour:
m_Name: Bloom
m_EditorClassIdentifier:
active: 1
m_AdvancedMode: 0
skipIterations:
m_OverrideState: 0
m_Value: 1
threshold:
m_OverrideState: 1
m_Value: 0.9
min: 0
intensity:
m_OverrideState: 1
m_Value: 0.5
min: 0
scatter:
m_OverrideState: 0
m_Value: 0
min: 0
max: 1
clamp:
m_OverrideState: 0
m_Value: 65472
min: 0
tint:
m_OverrideState: 0
m_Value: {r: 1, g: 1, b: 1, a: 1}
hdr: 0
showAlpha: 0
showEyeDropper: 1
highQualityFiltering:
m_OverrideState: 0
m_Value: 0
downscale:
m_OverrideState: 0
m_Value: 0
maxIterations:
m_OverrideState: 0
m_Value: 6
dirtTexture:
m_OverrideState: 0
m_Value: {fileID: 0}
dimension: 1
dirtIntensity:
m_OverrideState: 0
m_Value: 0
min: 0
--- !u!114 &-7333466258214690650
MonoBehaviour:
m_ObjectHideFlags: 3
......@@ -96,31 +88,21 @@ MonoBehaviour:
m_Name: ColorAdjustments
m_EditorClassIdentifier:
active: 1
m_AdvancedMode: 0
postExposure:
m_OverrideState: 1
m_Value: 0.5
contrast:
m_OverrideState: 1
m_Value: 10
min: -100
max: 100
colorFilter:
m_OverrideState: 0
m_Value: {r: 1, g: 1, b: 1, a: 1}
hdr: 1
showAlpha: 0
showEyeDropper: 1
hueShift:
m_OverrideState: 0
m_Value: 0
min: -180
max: 180
saturation:
m_OverrideState: 1
m_Value: 10
min: -100
max: 100
--- !u!114 &-5049855111148452411
MonoBehaviour:
m_ObjectHideFlags: 3
......@@ -134,12 +116,9 @@ MonoBehaviour:
m_Name: ChromaticAberration
m_EditorClassIdentifier:
active: 1
m_AdvancedMode: 0
intensity:
m_OverrideState: 1
m_Value: 0.7
min: 0
max: 1
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -157,3 +136,44 @@ MonoBehaviour:
- {fileID: -9082520654620400615}
- {fileID: -7333466258214690650}
- {fileID: -5049855111148452411}
- {fileID: 2150327561888915515}
--- !u!114 &2150327561888915515
MonoBehaviour:
m_ObjectHideFlags: 3
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: cdfbdbb87d3286943a057f7791b43141, type: 3}
m_Name: ChannelMixer
m_EditorClassIdentifier:
active: 1
redOutRedIn:
m_OverrideState: 0
m_Value: 100
redOutGreenIn:
m_OverrideState: 0
m_Value: 0
redOutBlueIn:
m_OverrideState: 0
m_Value: 0
greenOutRedIn:
m_OverrideState: 0
m_Value: 0
greenOutGreenIn:
m_OverrideState: 0
m_Value: 100
greenOutBlueIn:
m_OverrideState: 0
m_Value: 0
blueOutRedIn:
m_OverrideState: 0
m_Value: 0
blueOutGreenIn:
m_OverrideState: 0
m_Value: 0
blueOutBlueIn:
m_OverrideState: 0
m_Value: 100
%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: 1fe79f9353655bc45970064f25aac3e0, type: 3}
m_Name: Answers
m_EditorClassIdentifier:
fillColor: {r: 0.122840874, g: 0.692496, b: 0.9169811, a: 1}
outlineColor: {r: 0.99607843, g: 0.5686275, b: 0, a: 1}
dialogueTextColor: {r: 0, g: 0, b: 0, a: 1}
fileFormatVersion: 2
guid: a1fada176e578c6818fc86972e77f414
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 047ae84553eb9a4a0bda54498ce71694
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:
fileFormatVersion: 2
guid: 6b40214b59ebe5bac9badb98a7db280d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
fileFormatVersion: 2
guid: cb20e4de8e903e3229ce29532a6e9a61
guid: 376c8c07926bb6cb480f5420cdbea835
PrefabImporter:
externalObjects: {}
userData:
......
This diff is collapsed.
fileFormatVersion: 2
guid: b00fb23c67597415ca01d20fe7b94b07
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
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
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
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
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
......@@ -374,6 +374,16 @@ PrefabInstance:
propertyPath: m_AnchoredPosition.y
value: -219.27
objectReference: {fileID: 0}
- target: {fileID: 5806820450286757094, guid: f91e9e31ab0157f32aefe5ccfc6cb36c,
type: 3}
propertyPath: m_Url
value: file:///home/p0wer/Downloads/2026-02-03 13-19-52.mp4
objectReference: {fileID: 0}
- target: {fileID: 5806820450286757094, guid: f91e9e31ab0157f32aefe5ccfc6cb36c,
type: 3}
propertyPath: m_DataSource
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5878538657546902898, guid: f91e9e31ab0157f32aefe5ccfc6cb36c,
type: 3}
propertyPath: m_AnchorMax.y
......@@ -530,6 +540,11 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6864670749710197110, guid: f91e9e31ab0157f32aefe5ccfc6cb36c,
type: 3}
propertyPath: videoName
value: 2026-02-03 13-19-52.mp4
objectReference: {fileID: 0}
- target: {fileID: 7292667948471104389, guid: f91e9e31ab0157f32aefe5ccfc6cb36c,
type: 3}
propertyPath: m_AnchorMax.y
......@@ -560,6 +575,11 @@ PrefabInstance:
propertyPath: m_ArabicText
value: "\u0644\u0639\u0628\u0629 \u0627\u0644\u0634\u0631\u0627\u064A\u064A\u0646"
objectReference: {fileID: 0}
- target: {fileID: 8322661009036812910, guid: f91e9e31ab0157f32aefe5ccfc6cb36c,
type: 3}
propertyPath: m_Texture
value:
objectReference: {fileID: 2800000, guid: b00fb23c67597415ca01d20fe7b94b07, type: 3}
m_RemovedComponents: []
m_RemovedGameObjects:
- {fileID: 671000979292584426, guid: f91e9e31ab0157f32aefe5ccfc6cb36c, type: 3}
......@@ -589,6 +609,10 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
transitionSettings: {fileID: 11400000, guid: 06fa0ad2bc756f44ab258bc74947381d, type: 2}
levelName:
description:
mechanics:
gameObjective:
--- !u!1 &1668059001
GameObject:
m_ObjectHideFlags: 0
......
using UnityEngine;
using EasyTransition;
using AL_Arcade.DialogueSystem.Scripts;
public class GameManager : MonoBehaviour
{
[SerializeField] TransitionSettings transitionSettings;
bool showMouseCursor = true;
[SerializeField] private string levelName;
[SerializeField] private string description;
[SerializeField] private string mechanics;
[SerializeField] private string gameObjective;
void Start()
{
Application.targetFrameRate = 60;
Time.timeScale = 1.3f;
GameContextBuilder.Instance.InitializeGame(levelName, description, mechanics);
GameContextBuilder.Instance.SetCurrentObjective(gameObjective);
}
public void LoadScene(int sceneIndex)
{
......@@ -24,7 +34,7 @@ public class GameManager : MonoBehaviour
}
private void Update()
{
if(Input.GetKeyDown(KeyCode.Space))
if (Input.GetKeyDown(KeyCode.Space))
{
showMouseCursor = !showMouseCursor;
if (showMouseCursor)
......
......@@ -26,8 +26,8 @@ public class CovidForwardBehaviour : MonoBehaviour
hasMoved = true;
// Shake in place
transform.DOScale(24f, 0.2f).SetLoops(2, LoopType.Yoyo);
transform.DOShakePosition(0.65f, new Vector3(0.1f, 0.1f, 0), 10, 90, false, true).OnComplete(() =>
transform.DOScale(25f, 0.65f).SetEase(Ease.InOutFlash).SetLoops(2, LoopType.Yoyo);
transform.DOShakePosition(0.65f, new Vector3(0.15f, 0.15f, 0.15f), 10, 90, false, true).OnComplete(() =>
{
transform.DOMoveZ(transform.position.z - moveDistance, moveDuration).SetEase(Ease.OutCubic);
});
......
......@@ -6,6 +6,8 @@ using UnityEngine;
public class QuestionArea : MonoBehaviour
{
public Question Question { get; private set; }
public static event Action<string[]> OnPlayerTriggerTheAnswers;
public static event Action<bool> OnQuestionIsAnswer;
public static event Action<string> OnPlayerTriggerTheQuestion;
......@@ -27,6 +29,8 @@ public class QuestionArea : MonoBehaviour
{
if (other.CompareTag("Player"))
{
OnPlayerTriggerTheAnswers?.Invoke(Question.answers);
RotateAnswer(0);
DisplayText(Question.answers);
......
......@@ -5,23 +5,45 @@ using UnityEngine;
public class QuestionText : MonoBehaviour
{
[SerializeField] RectTransform questionTextParent;
[SerializeField] RectTransform answerTextParent;
[SerializeField] RectTransform spawnText;
[SerializeField] ArabicTextMeshProUGUI questionText;
[SerializeField] ArabicTextMeshProUGUI[] answersText;
[SerializeField] float animationDuration;
[SerializeField] float MaxY;
[SerializeField] float MinY;
[SerializeField] float MaxYAnswer;
[SerializeField] float MinYAnswer;
void OnEnable()
{
QuestionArea.OnPlayerTriggerTheAnswers += ChangeAnswers;
QuestionArea.OnPlayerTriggerTheQuestion += ChangeText;
QuestionArea.OnQuestionIsAnswer += HideText;
}
void OnDisable()
{
QuestionArea.OnPlayerTriggerTheAnswers -= ChangeAnswers;
QuestionArea.OnPlayerTriggerTheQuestion -= ChangeText;
QuestionArea.OnQuestionIsAnswer -= HideText;
}
private void ChangeAnswers(string[] answers)
{
answerTextParent.DOAnchorPosY(MinYAnswer, animationDuration).SetEase(Ease.OutBack);
answerTextParent.DOScale(1, animationDuration / 2).SetLoops(2, LoopType.Yoyo);
for (int i = 0; i < answersText.Length; i++)
{
answersText[i].arabicText = answers[i];
}
}
private void ChangeText(string question)
{
questionTextParent.DOAnchorPosY(MaxY, animationDuration).SetEase(Ease.OutBack);
......@@ -31,6 +53,8 @@ public class QuestionText : MonoBehaviour
}
private void HideText(bool question)
{
answerTextParent.DOAnchorPosY(MaxYAnswer, animationDuration).SetEase(Ease.InBack);
questionTextParent.DOAnchorPosY(-MinY, animationDuration).SetEase(Ease.InBack);
spawnText.DOAnchorPosY(MinY, animationDuration).SetEase(Ease.InBack);
}
......
......@@ -27,7 +27,7 @@ public class EffectsManager : MonoBehaviour
[Header("Curved World Effect")]
[SerializeField] Volume postProPostProcessEffect;
[SerializeField] float maxChannelBlueValue;
ChannelMixer _channelMixer;
// ChannelMixer _channelMixer;
AudioSource _audioSource;
Camera _cam;
......@@ -35,7 +35,7 @@ public class EffectsManager : MonoBehaviour
private void Awake()
{
if(Instance == null)
if (Instance == null)
Instance = this;
else
Destroy(this);
......@@ -49,7 +49,7 @@ public class EffectsManager : MonoBehaviour
curvedDefaultBendHorizontalSize = curved.bendHorizontalSize;
postProPostProcessEffect.profile.TryGet(out _channelMixer);
// postProPostProcessEffect.profile.TryGet(out _channelMixer);
}
private void OnEnable()
......@@ -77,11 +77,11 @@ public class EffectsManager : MonoBehaviour
}).SetEase(Ease.InOutSine).SetLink(gameObject);
DOVirtual.Float(maxChannelBlueValue, Random.Range(-maxChannelBlueValue, maxChannelBlueValue), durationCurved * .5f, value =>
{
_channelMixer.blueOutRedIn.value = value;
}).SetEase(Ease.InOutSine).SetLink(gameObject);
// DOVirtual.Float(maxChannelBlueValue, Random.Range(-maxChannelBlueValue, maxChannelBlueValue), durationCurved * .5f, value =>
// {
// _channelMixer.blueOutRedIn.value = value;
//
// }).SetEase(Ease.InOutSine).SetLink(gameObject);
//_channelMixer.blueOutRedIn.value = Random.Range(-maxChannelBlueValue, maxChannelBlueValue);
......
fileFormatVersion: 2
guid: 08280abcabc5740b2803f38e9182ce32
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 1f41a8bf6755beec3b40aa8593988ef6
VideoClipImporter:
externalObjects: {}
serializedVersion: 2
frameRange: 0
startFrame: -1
endFrame: -1
colorSpace: 0
deinterlace: 0
encodeAlpha: 0
flipVertical: 0
flipHorizontal: 0
importAudio: 1
targetSettings: {}
userData:
assetBundleName:
assetBundleVariant:
{
"dependencies": {
"com.bnco.unity-webgl-microphone": "http://github.com/bnco-dev/unity-webgl-microphone.git",
"com.unity.2d.sprite": "1.0.0",
"com.unity.cinemachine": "2.10.5",
"com.unity.collab-proxy": "2.11.2",
......
......@@ -7,6 +7,13 @@
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.bnco.unity-webgl-microphone": {
"version": "http://github.com/bnco-dev/unity-webgl-microphone.git",
"depth": 0,
"source": "git",
"dependencies": {},
"hash": "bad36244303305fcbdfcb764c30d5bc9be480676"
},
"com.unity.2d.sprite": {
"version": "1.0.0",
"depth": 0,
......
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