Commit 70812d7e authored by saad's avatar saad

fix the timer bugs and adjust the distance between gates

parent 27d95db0
......@@ -28,7 +28,7 @@ Material:
- _ALPHATEST_ON
m_InvalidKeywords: []
m_LightmapFlags: 0
m_EnableInstancingVariants: 0
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
m_CustomRenderQueue: 2450
stringTagMap:
......
......@@ -19,7 +19,7 @@ Material:
m_InvalidKeywords:
- _FLIPBOOKBLENDING_OFF
m_LightmapFlags: 6
m_EnableInstancingVariants: 0
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 1
m_CustomRenderQueue: 3000
stringTagMap:
......
......@@ -15,7 +15,7 @@ Material:
m_InvalidKeywords:
- _EMISSION
m_LightmapFlags: 2
m_EnableInstancingVariants: 0
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
......@@ -118,6 +118,7 @@ Material:
- _TransShadow: 0.44
- _Translucency: 23
- _UVSec: 0
- _XRMotionVectorsPass: 1
- _ZWrite: 1
- __dirty: 0
m_Colors:
......
......@@ -30,7 +30,7 @@ Material:
- _FADING_ON
- _SOFTPARTICLES_ON
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 1
m_CustomRenderQueue: -1
stringTagMap: {}
......@@ -136,6 +136,7 @@ Material:
- _SrcBlend: 5
- _Surface: 1
- _UVSec: 0
- _XRMotionVectorsPass: 1
- _ZWrite: 0
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
......
......@@ -29,7 +29,7 @@ Material:
m_InvalidKeywords:
- _FLIPBOOKBLENDING_OFF
m_LightmapFlags: 0
m_EnableInstancingVariants: 0
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
m_CustomRenderQueue: 2450
stringTagMap:
......
......@@ -20,7 +20,7 @@ Material:
m_InvalidKeywords:
- _UNITYSHADOWMODE_NONE
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
......
......@@ -34,7 +34,7 @@ Material:
m_InvalidKeywords:
- _UNITYSHADOWMODE_NONE
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
......
......@@ -21,7 +21,7 @@ Material:
m_InvalidKeywords:
- _UNITYSHADOWMODE_NONE
m_LightmapFlags: 2
m_EnableInstancingVariants: 0
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
......
......@@ -35,7 +35,7 @@ Material:
- _SURFACE_TYPE_TRANSPARENT
- _UNITYSHADOWMODE_NONE
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
......
......@@ -670,7 +670,7 @@ MonoBehaviour:
m_EditorClassIdentifier: Assembly-CSharp::com.al_arcade.mcq.McqPrefabBuilder
trackTilePrefab: {fileID: 92133367119283456, guid: f028ebb9845fb0345b1a2b7c07bb6950, type: 3}
tileLength: 8
visibleTileCount: 15
visibleTileCount: 20
cameraOffset: {x: 0, y: 5, z: -8}
cameraLookOffset: {x: 0, y: 1.5, z: 12}
cameraSmoothSpeed: 6
......@@ -707,9 +707,9 @@ MonoBehaviour:
classCode:
runSpeed: 8
lives: 5
startTime: 50
correctAnswerBonusTime: 3
wrongAnswerPenaltyTime: 2
startTime: 60
correctAnswerBonusTime: 10
wrongAnswerPenaltyTime: 10
useOfflineTestData: 0
--- !u!1001 &2052974453
PrefabInstance:
......
......@@ -20,7 +20,7 @@ namespace com.al_arcade.mcq
public static McqGameManager Instance { get; private set; }
[Header("MCQ Settings")]
[SerializeField] private float gateSpawnDistance = 50f;
[SerializeField] private float gateSpawnDistance = 120f;
[SerializeField] private float questionDisplayTime = 1.5f;
[SerializeField] private float feedbackDisplayTime = 2f;
[SerializeField] private float playerRunSpeed = 12f;
......@@ -435,8 +435,7 @@ namespace com.al_arcade.mcq
private void AdjustTimer(float delta)
{
UpdateTimerBy(delta);
_timeLeft = Mathf.Clamp(_timeLeft, 0, McqPrefabBuilder.Instance.startTime);
_timeLeft = Mathf.Clamp(_timeLeft + delta, 0f, McqPrefabBuilder.Instance.startTime);
if (_timeLeft < 4f && !_isTicking)
{ _isTicking = true; SSAudioManager.Instance?.Tick(true); }
......@@ -444,6 +443,7 @@ namespace com.al_arcade.mcq
{ _isTicking = false; SSAudioManager.Instance?.Tick(false); }
uiManager?.UpdateTimer(_timeLeft, delta > 0);
Debug.Log(_timeLeft);
}
private void StopPlayerAndCompetitor()
......
......@@ -319,7 +319,7 @@ namespace com.al_arcade.mcq
var cam = Camera.main;
if (cam == null) return;
cam.farClipPlane = 75f;
cam.farClipPlane = 150f;
cam.allowHDR = false;
cam.allowMSAA = false;
......
......@@ -65,21 +65,11 @@ MonoBehaviour:
- rid: 2049716466680857564
- rid: 2049716466680857565
- rid: 2049716466680857566
- rid: 3240137961803874407
- rid: 3240137961803874408
m_RuntimeSettings:
m_List:
- rid: 2049716466680857537
- rid: 2049716466680857538
- rid: 2049716466680857539
- rid: 2049716466680857543
- rid: 2049716466680857545
- rid: 2049716466680857548
- rid: 2049716466680857549
- rid: 2049716466680857555
- rid: 2049716466680857556
- rid: 2049716466680857557
- rid: 2049716466680857560
- rid: 2049716466680857561
m_AssetVersion: 9
m_List: []
m_AssetVersion: 10
m_ObsoleteDefaultVolumeProfile: {fileID: 0}
m_RenderingLayerNames:
- Default
......@@ -139,9 +129,9 @@ MonoBehaviour:
m_CoreBlitPS: {fileID: 4800000, guid: 93446b5c5339d4f00b85c159e1159b7c, type: 3}
m_CoreBlitColorAndDepthPS: {fileID: 4800000, guid: d104b2fc1ca6445babb8e90b0758136b, type: 3}
m_SamplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3}
m_TerrainDetailLit: {fileID: 4800000, guid: f6783ab646d374f94b199774402a5144, type: 3}
m_TerrainDetailGrassBillboard: {fileID: 4800000, guid: 29868e73b638e48ca99a19ea58c48d90, type: 3}
m_TerrainDetailGrass: {fileID: 4800000, guid: e507fdfead5ca47e8b9a768b51c291a1, type: 3}
m_TerrainDetailLit: {fileID: 0}
m_TerrainDetailGrassBillboard: {fileID: 0}
m_TerrainDetailGrass: {fileID: 0}
- rid: 2049716466680857538
type: {class: URPDefaultVolumeProfileSettings, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
data:
......@@ -390,3 +380,15 @@ MonoBehaviour:
m_setupCS: {fileID: 7200000, guid: 33be2e9a5506b2843bdb2bdff9cad5e1, type: 3}
m_preTaaCS: {fileID: 7200000, guid: a679dba8ec4d9ce45884a270b0e22dda, type: 3}
m_taaCS: {fileID: 7200000, guid: 3923900e2b41b5e47bc25bfdcbcdc9e6, type: 3}
- rid: 3240137961803874407
type: {class: URPTerrainShaderSetting, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
data:
m_Version: 0
m_IncludeTerrainShaders: 1
- rid: 3240137961803874408
type: {class: UniversalRenderPipelineRuntimeTerrainShaders, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
data:
m_Version: 0
m_TerrainDetailLit: {fileID: 4800000, guid: f6783ab646d374f94b199774402a5144, type: 3}
m_TerrainDetailGrassBillboard: {fileID: 4800000, guid: 29868e73b638e48ca99a19ea58c48d90, type: 3}
m_TerrainDetailGrass: {fileID: 4800000, guid: e507fdfead5ca47e8b9a768b51c291a1, type: 3}
......@@ -39,7 +39,7 @@
"url": "https://packages.unity.com"
},
"com.unity.burst": {
"version": "1.8.27",
"version": "1.8.28",
"depth": 1,
"source": "registry",
"dependencies": {
......
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