Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Artery Runner
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abdulrahman Mohammed
Artery Runner
Commits
bb3fa8f0
Commit
bb3fa8f0
authored
Jan 21, 2026
by
Abdulrahman Mohammed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix player cannot increase after increased
parent
f6219ff7
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
274 additions
and
59 deletions
+274
-59
URP-Balanced.asset
Assets/Settings/URP-Balanced.asset
+49
-4
URP-HighFidelity.asset
Assets/Settings/URP-HighFidelity.asset
+24
-24
URP-Performant.asset
Assets/Settings/URP-Performant.asset
+49
-4
Game.unity
Assets/_project/Scenes/Game.unity
+102
-4
MainMenu.unity
Assets/_project/Scenes/MainMenu.unity
+2
-2
NPCsEffects.cs
Assets/_project/Scripts/Systems/NPCs/NPCsEffects.cs
+3
-0
Obstacles.cs
Assets/_project/Scripts/Systems/Obstacles/Obstacles.cs
+1
-1
Answer.cs
Assets/_project/Scripts/Systems/Questions/Answer.cs
+1
-0
SpwanManager.cs
Assets/_project/Scripts/Systems/Spwan/SpwanManager.cs
+28
-15
EffectsManager.cs
Assets/_project/Scripts/Systems/VFX/EffectsManager.cs
+4
-1
BurstAotSettings_StandaloneWindows.json
ProjectSettings/BurstAotSettings_StandaloneWindows.json
+5
-3
CommonBurstAotSettings.json
ProjectSettings/CommonBurstAotSettings.json
+1
-1
Settings.json
ProjectSettings/Packages/com.unity.probuilder/Settings.json
+5
-0
No files found.
Assets/Settings/URP-Balanced.asset
View file @
bb3fa8f0
...
...
@@ -12,8 +12,8 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
bf2edee5c58d82540a51f03df9d42094
,
type
:
3
}
m_Name
:
URP-Balanced
m_EditorClassIdentifier
:
k_AssetVersion
:
9
k_AssetPreviousVersion
:
9
k_AssetVersion
:
11
k_AssetPreviousVersion
:
11
m_RendererType
:
1
m_RendererData
:
{
fileID
:
0
}
m_RendererDataList
:
...
...
@@ -23,10 +23,16 @@ MonoBehaviour:
m_RequireOpaqueTexture
:
0
m_OpaqueDownsampling
:
1
m_SupportsTerrainHoles
:
1
m_StoreActionsOptimization
:
0
m_SupportsHDR
:
1
m_HDRColorBufferPrecision
:
0
m_MSAA
:
1
m_RenderScale
:
1
m_UpscalingFilter
:
0
m_FsrOverrideSharpness
:
0
m_FsrSharpness
:
0.92
m_EnableLODCrossFade
:
1
m_LODCrossFadeDitheringType
:
1
m_ShEvalMode
:
0
m_MainLightRenderingMode
:
1
m_MainLightShadowsSupported
:
1
m_MainLightShadowmapResolution
:
1024
...
...
@@ -47,23 +53,62 @@ MonoBehaviour:
m_CascadeBorder
:
0.1
m_ShadowDepthBias
:
1
m_ShadowNormalBias
:
1
m_AnyShadowsSupported
:
1
m_SoftShadowsSupported
:
1
m_ConservativeEnclosingSphere
:
0
m_NumIterationsEnclosingSphere
:
64
m_SoftShadowQuality
:
2
m_AdditionalLightsCookieResolution
:
512
m_AdditionalLightsCookieFormat
:
1
m_UseSRPBatcher
:
1
m_SupportsDynamicBatching
:
0
m_MixedLightingSupported
:
1
m_SupportsLightCookies
:
1
m_SupportsLightLayers
:
0
m_DebugLevel
:
0
m_StoreActionsOptimization
:
0
m_EnableRenderGraph
:
0
m_UseAdaptivePerformance
:
1
m_ColorGradingMode
:
0
m_ColorGradingLutSize
:
32
m_UseFastSRGBLinearConversion
:
0
m_SupportDataDrivenLensFlare
:
1
m_ShadowType
:
1
m_LocalShadowsSupported
:
0
m_LocalShadowsAtlasResolution
:
256
m_MaxPixelLights
:
0
m_ShadowAtlasResolution
:
256
m_ShaderVariantLogLevel
:
0
m_VolumeFrameworkUpdateMode
:
0
m_Textures
:
blueNoise64LTex
:
{
fileID
:
2800000
,
guid
:
e3d24661c1e055f45a7560c033dbb837
,
type
:
3
}
bayerMatrixTex
:
{
fileID
:
2800000
,
guid
:
f9ee4ed84c1d10c49aabb9b210b0fc44
,
type
:
3
}
m_PrefilteringModeMainLightShadows
:
3
m_PrefilteringModeAdditionalLight
:
3
m_PrefilteringModeAdditionalLightShadows
:
0
m_PrefilterXRKeywords
:
1
m_PrefilteringModeForwardPlus
:
0
m_PrefilteringModeDeferredRendering
:
0
m_PrefilteringModeScreenSpaceOcclusion
:
2
m_PrefilterDebugKeywords
:
1
m_PrefilterWriteRenderingLayers
:
1
m_PrefilterHDROutput
:
1
m_PrefilterSSAODepthNormals
:
1
m_PrefilterSSAOSourceDepthLow
:
0
m_PrefilterSSAOSourceDepthMedium
:
1
m_PrefilterSSAOSourceDepthHigh
:
1
m_PrefilterSSAOInterleaved
:
0
m_PrefilterSSAOBlueNoise
:
1
m_PrefilterSSAOSampleCountLow
:
0
m_PrefilterSSAOSampleCountMedium
:
1
m_PrefilterSSAOSampleCountHigh
:
1
m_PrefilterDBufferMRT1
:
1
m_PrefilterDBufferMRT2
:
1
m_PrefilterDBufferMRT3
:
1
m_PrefilterSoftShadowsQualityLow
:
1
m_PrefilterSoftShadowsQualityMedium
:
1
m_PrefilterSoftShadowsQualityHigh
:
1
m_PrefilterSoftShadows
:
0
m_PrefilterScreenCoord
:
1
m_PrefilterNativeRenderPass
:
1
m_ShaderVariantLogLevel
:
0
m_ShadowCascades
:
0
Assets/Settings/URP-HighFidelity.asset
View file @
bb3fa8f0
...
...
@@ -82,33 +82,33 @@ MonoBehaviour:
m_Textures
:
blueNoise64LTex
:
{
fileID
:
2800000
,
guid
:
e3d24661c1e055f45a7560c033dbb837
,
type
:
3
}
bayerMatrixTex
:
{
fileID
:
2800000
,
guid
:
f9ee4ed84c1d10c49aabb9b210b0fc44
,
type
:
3
}
m_PrefilteringModeMainLightShadows
:
1
m_PrefilteringModeAdditionalLight
:
4
m_PrefilteringModeAdditionalLightShadows
:
1
m_PrefilterXRKeywords
:
0
m_PrefilteringModeForwardPlus
:
1
m_PrefilteringModeDeferredRendering
:
1
m_PrefilteringModeScreenSpaceOcclusion
:
1
m_PrefilterDebugKeywords
:
0
m_PrefilterWriteRenderingLayers
:
0
m_PrefilterHDROutput
:
0
m_PrefilteringModeMainLightShadows
:
3
m_PrefilteringModeAdditionalLight
:
3
m_PrefilteringModeAdditionalLightShadows
:
2
m_PrefilterXRKeywords
:
1
m_PrefilteringModeForwardPlus
:
0
m_PrefilteringModeDeferredRendering
:
0
m_PrefilteringModeScreenSpaceOcclusion
:
2
m_PrefilterDebugKeywords
:
1
m_PrefilterWriteRenderingLayers
:
1
m_PrefilterHDROutput
:
1
m_PrefilterSSAODepthNormals
:
0
m_PrefilterSSAOSourceDepthLow
:
0
m_PrefilterSSAOSourceDepthMedium
:
0
m_PrefilterSSAOSourceDepthHigh
:
0
m_PrefilterSSAOSourceDepthLow
:
1
m_PrefilterSSAOSourceDepthMedium
:
1
m_PrefilterSSAOSourceDepthHigh
:
1
m_PrefilterSSAOInterleaved
:
0
m_PrefilterSSAOBlueNoise
:
0
m_PrefilterSSAOSampleCountLow
:
0
m_PrefilterSSAOSampleCountMedium
:
0
m_PrefilterSSAOBlueNoise
:
1
m_PrefilterSSAOSampleCountLow
:
1
m_PrefilterSSAOSampleCountMedium
:
1
m_PrefilterSSAOSampleCountHigh
:
0
m_PrefilterDBufferMRT1
:
0
m_PrefilterDBufferMRT2
:
0
m_PrefilterDBufferMRT3
:
0
m_PrefilterSoftShadowsQualityLow
:
0
m_PrefilterSoftShadowsQualityMedium
:
0
m_PrefilterSoftShadowsQualityHigh
:
0
m_PrefilterDBufferMRT1
:
1
m_PrefilterDBufferMRT2
:
1
m_PrefilterDBufferMRT3
:
1
m_PrefilterSoftShadowsQualityLow
:
1
m_PrefilterSoftShadowsQualityMedium
:
1
m_PrefilterSoftShadowsQualityHigh
:
1
m_PrefilterSoftShadows
:
0
m_PrefilterScreenCoord
:
0
m_PrefilterNativeRenderPass
:
0
m_PrefilterScreenCoord
:
1
m_PrefilterNativeRenderPass
:
1
m_ShaderVariantLogLevel
:
0
m_ShadowCascades
:
1
Assets/Settings/URP-Performant.asset
View file @
bb3fa8f0
...
...
@@ -12,8 +12,8 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
bf2edee5c58d82540a51f03df9d42094
,
type
:
3
}
m_Name
:
URP-Performant
m_EditorClassIdentifier
:
k_AssetVersion
:
9
k_AssetPreviousVersion
:
9
k_AssetVersion
:
11
k_AssetPreviousVersion
:
11
m_RendererType
:
1
m_RendererData
:
{
fileID
:
0
}
m_RendererDataList
:
...
...
@@ -23,10 +23,16 @@ MonoBehaviour:
m_RequireOpaqueTexture
:
0
m_OpaqueDownsampling
:
1
m_SupportsTerrainHoles
:
1
m_StoreActionsOptimization
:
0
m_SupportsHDR
:
0
m_HDRColorBufferPrecision
:
0
m_MSAA
:
1
m_RenderScale
:
1
m_UpscalingFilter
:
0
m_FsrOverrideSharpness
:
0
m_FsrSharpness
:
0.92
m_EnableLODCrossFade
:
1
m_LODCrossFadeDitheringType
:
1
m_ShEvalMode
:
0
m_MainLightRenderingMode
:
1
m_MainLightShadowsSupported
:
0
m_MainLightShadowmapResolution
:
1024
...
...
@@ -47,23 +53,62 @@ MonoBehaviour:
m_CascadeBorder
:
0.1
m_ShadowDepthBias
:
1
m_ShadowNormalBias
:
1
m_AnyShadowsSupported
:
1
m_SoftShadowsSupported
:
0
m_ConservativeEnclosingSphere
:
0
m_NumIterationsEnclosingSphere
:
64
m_SoftShadowQuality
:
2
m_AdditionalLightsCookieResolution
:
2048
m_AdditionalLightsCookieFormat
:
3
m_UseSRPBatcher
:
1
m_SupportsDynamicBatching
:
0
m_MixedLightingSupported
:
1
m_SupportsLightCookies
:
1
m_SupportsLightLayers
:
0
m_DebugLevel
:
0
m_StoreActionsOptimization
:
0
m_EnableRenderGraph
:
0
m_UseAdaptivePerformance
:
1
m_ColorGradingMode
:
0
m_ColorGradingLutSize
:
16
m_UseFastSRGBLinearConversion
:
0
m_SupportDataDrivenLensFlare
:
1
m_ShadowType
:
1
m_LocalShadowsSupported
:
0
m_LocalShadowsAtlasResolution
:
256
m_MaxPixelLights
:
0
m_ShadowAtlasResolution
:
256
m_ShaderVariantLogLevel
:
0
m_VolumeFrameworkUpdateMode
:
0
m_Textures
:
blueNoise64LTex
:
{
fileID
:
2800000
,
guid
:
e3d24661c1e055f45a7560c033dbb837
,
type
:
3
}
bayerMatrixTex
:
{
fileID
:
2800000
,
guid
:
f9ee4ed84c1d10c49aabb9b210b0fc44
,
type
:
3
}
m_PrefilteringModeMainLightShadows
:
0
m_PrefilteringModeAdditionalLight
:
0
m_PrefilteringModeAdditionalLightShadows
:
0
m_PrefilterXRKeywords
:
1
m_PrefilteringModeForwardPlus
:
0
m_PrefilteringModeDeferredRendering
:
0
m_PrefilteringModeScreenSpaceOcclusion
:
0
m_PrefilterDebugKeywords
:
1
m_PrefilterWriteRenderingLayers
:
1
m_PrefilterHDROutput
:
1
m_PrefilterSSAODepthNormals
:
1
m_PrefilterSSAOSourceDepthLow
:
1
m_PrefilterSSAOSourceDepthMedium
:
1
m_PrefilterSSAOSourceDepthHigh
:
1
m_PrefilterSSAOInterleaved
:
1
m_PrefilterSSAOBlueNoise
:
1
m_PrefilterSSAOSampleCountLow
:
1
m_PrefilterSSAOSampleCountMedium
:
1
m_PrefilterSSAOSampleCountHigh
:
1
m_PrefilterDBufferMRT1
:
1
m_PrefilterDBufferMRT2
:
1
m_PrefilterDBufferMRT3
:
1
m_PrefilterSoftShadowsQualityLow
:
1
m_PrefilterSoftShadowsQualityMedium
:
1
m_PrefilterSoftShadowsQualityHigh
:
1
m_PrefilterSoftShadows
:
0
m_PrefilterScreenCoord
:
1
m_PrefilterNativeRenderPass
:
1
m_ShaderVariantLogLevel
:
0
m_ShadowCascades
:
0
Assets/_project/Scenes/Game.unity
View file @
bb3fa8f0
...
...
@@ -695,7 +695,7 @@ AudioSource:
type
:
2
}
m_audioClip
:
{
fileID
:
0
}
m_PlayOnAwake
:
1
m_Volume
:
1
m_Volume
:
0.5
m_Pitch
:
1
Loop
:
0
Mute
:
0
...
...
@@ -9972,6 +9972,7 @@ GameObject:
m_Component
:
-
component
:
{
fileID
:
1180898617
}
-
component
:
{
fileID
:
1180898618
}
-
component
:
{
fileID
:
1180898619
}
m_Layer
:
0
m_Name
:
_AudioManager
m_TagString
:
Untagged
...
...
@@ -10008,6 +10009,103 @@ MonoBehaviour:
m_EditorClassIdentifier
:
audioMixer
:
{
fileID
:
24100000
,
guid
:
5a4ab7a92d37e3649b9839994fbe2bc2
,
type
:
2
}
audioSlider
:
{
fileID
:
257008788
}
---
!u!82
&1180898619
AudioSource
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1180898616
}
m_Enabled
:
1
serializedVersion
:
4
OutputAudioMixerGroup
:
{
fileID
:
24300002
,
guid
:
5a4ab7a92d37e3649b9839994fbe2bc2
,
type
:
2
}
m_audioClip
:
{
fileID
:
8300000
,
guid
:
02e145ab306cfd8418d9bdf0318dc240
,
type
:
3
}
m_PlayOnAwake
:
1
m_Volume
:
0.8
m_Pitch
:
1
Loop
:
0
Mute
:
0
Spatialize
:
0
SpatializePostEffects
:
0
Priority
:
128
DopplerLevel
:
1
MinDistance
:
1
MaxDistance
:
500
Pan2D
:
0
rolloffMode
:
0
BypassEffects
:
0
BypassListenerEffects
:
0
BypassReverbZones
:
0
rolloffCustomCurve
:
serializedVersion
:
2
m_Curve
:
-
serializedVersion
:
3
time
:
0
value
:
1
inSlope
:
0
outSlope
:
0
tangentMode
:
0
weightedMode
:
0
inWeight
:
0.33333334
outWeight
:
0.33333334
-
serializedVersion
:
3
time
:
1
value
:
0
inSlope
:
0
outSlope
:
0
tangentMode
:
0
weightedMode
:
0
inWeight
:
0.33333334
outWeight
:
0.33333334
m_PreInfinity
:
2
m_PostInfinity
:
2
m_RotationOrder
:
4
panLevelCustomCurve
:
serializedVersion
:
2
m_Curve
:
-
serializedVersion
:
3
time
:
0
value
:
0
inSlope
:
0
outSlope
:
0
tangentMode
:
0
weightedMode
:
0
inWeight
:
0.33333334
outWeight
:
0.33333334
m_PreInfinity
:
2
m_PostInfinity
:
2
m_RotationOrder
:
4
spreadCustomCurve
:
serializedVersion
:
2
m_Curve
:
-
serializedVersion
:
3
time
:
0
value
:
0
inSlope
:
0
outSlope
:
0
tangentMode
:
0
weightedMode
:
0
inWeight
:
0.33333334
outWeight
:
0.33333334
m_PreInfinity
:
2
m_PostInfinity
:
2
m_RotationOrder
:
4
reverbZoneMixCustomCurve
:
serializedVersion
:
2
m_Curve
:
-
serializedVersion
:
3
time
:
0
value
:
1
inSlope
:
0
outSlope
:
0
tangentMode
:
0
weightedMode
:
0
inWeight
:
0.33333334
outWeight
:
0.33333334
m_PreInfinity
:
2
m_PostInfinity
:
2
m_RotationOrder
:
4
---
!u!1
&1187643322
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -10410,7 +10508,6 @@ Transform:
m_Children
:
-
{
fileID
:
1097604481
}
-
{
fileID
:
244896241
}
-
{
fileID
:
1401912531
}
m_Father
:
{
fileID
:
470308987
}
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!1001
&1334271830
...
...
@@ -10753,7 +10850,7 @@ Transform:
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_ConstrainProportionsScale
:
0
m_Children
:
[]
m_Father
:
{
fileID
:
1
292347942
}
m_Father
:
{
fileID
:
1
431839677
}
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!114
&1401912532
MonoBehaviour
:
...
...
@@ -10814,6 +10911,7 @@ Transform:
m_ConstrainProportionsScale
:
0
m_Children
:
-
{
fileID
:
981698940
}
-
{
fileID
:
1401912531
}
m_Father
:
{
fileID
:
470308987
}
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!1
&1433242856
...
...
@@ -12654,7 +12752,7 @@ AudioSource:
serializedVersion
:
4
OutputAudioMixerGroup
:
{
fileID
:
24300002
,
guid
:
5a4ab7a92d37e3649b9839994fbe2bc2
,
type
:
2
}
m_audioClip
:
{
fileID
:
8300000
,
guid
:
02e145ab306cfd8418d9bdf0318dc240
,
type
:
3
}
m_audioClip
:
{
fileID
:
0
}
m_PlayOnAwake
:
1
m_Volume
:
1
m_Pitch
:
1
...
...
Assets/_project/Scenes/MainMenu.unity
View file @
bb3fa8f0
...
...
@@ -769,7 +769,7 @@ MonoBehaviour:
m_OnCullStateChanged
:
m_PersistentCalls
:
m_Calls
:
[]
m_text
:
"
\u
0627\uFE91\uFEAA\u0623
"
m_text
:
"
\u
FEA7\uFEAE\u0648\u062C
"
m_isRightToLeft
:
1
m_fontAsset
:
{
fileID
:
11400000
,
guid
:
195f51441c36d334cbdef3cedc5b756d
,
type
:
2
}
m_sharedMaterial
:
{
fileID
:
6706907063635417430
,
guid
:
195f51441c36d334cbdef3cedc5b756d
,
...
...
@@ -839,7 +839,7 @@ MonoBehaviour:
m_hasFontAssetChanged
:
0
m_baseMaterial
:
{
fileID
:
0
}
m_maskOffset
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
0
}
m_ArabicText
:
"
\u062
7\u0628\u062F\u0623
"
m_ArabicText
:
"
\u062
E\u0631\u0648\u062C
"
m_ShowTashkeel
:
1
m_PreserveNumbers
:
1
m_FixTags
:
1
...
...
Assets/_project/Scripts/Systems/NPCs/NPCsEffects.cs
View file @
bb3fa8f0
...
...
@@ -25,8 +25,11 @@ public class NPCsEffects : MonoBehaviour
OnDisableEffect
.
Play
();
}
if
(
_cam
!=
null
&&
_cam
.
isActiveAndEnabled
)
{
_cam
.
pitch
=
Random
.
Range
(
0.5f
,
2f
);
_cam
.
PlayOneShot
(
destroyAudioClip
);
}
}
private
void
OnEnable
()
{
if
(!
EffectsManager
.
_playersAndNPCsMeshRenderer
.
Contains
(
GetComponentInChildren
<
MeshRenderer
>()))
...
...
Assets/_project/Scripts/Systems/Obstacles/Obstacles.cs
View file @
bb3fa8f0
...
...
@@ -8,7 +8,7 @@ public class Obstacles : MonoBehaviour
if
(
other
.
CompareTag
(
"NPC"
))
{
other
.
gameObject
.
SetActive
(
false
);
SpwanManager
.
Instance
.
ChangeCurrentNPCsInGame
(
-
1
);
SpwanManager
.
Instance
.
ChangeCurrentNPCsInGame
();
}
}
}
Assets/_project/Scripts/Systems/Questions/Answer.cs
View file @
bb3fa8f0
...
...
@@ -12,6 +12,7 @@ public class Answer : MonoBehaviour
if
(
other
.
CompareTag
(
"Player"
))
{
OnPlayerHit
?.
Invoke
(
index
);
GetComponent
<
Collider
>().
enabled
=
false
;
}
}
public
void
rotateParent
(
int
degrees
)
...
...
Assets/_project/Scripts/Systems/Spwan/SpwanManager.cs
View file @
bb3fa8f0
...
...
@@ -22,10 +22,9 @@ public class SpwanManager : MonoBehaviour
int
_increasePerSpawn
;
int
_decreasePerSpawn
;
public
static
int
_currentNPCsInGame
{
get
;
private
set
;
}
private
void
Awake
()
{
if
(
Instance
==
null
)
if
(
Instance
==
null
)
Instance
=
this
;
else
Destroy
(
gameObject
);
...
...
@@ -38,6 +37,7 @@ public class SpwanManager : MonoBehaviour
GameObject
tmp
=
Instantiate
(
NPCsPrefab
,
NPCsSpawnParent
.
position
,
Quaternion
.
identity
,
NPCsSpawnParent
);
tmp
.
gameObject
.
SetActive
(
false
);
}
ChangeCurrentNPCsInGame
();
}
void
ChangeNumberOfSpawn
()
{
...
...
@@ -66,14 +66,22 @@ public class SpwanManager : MonoBehaviour
}
void
IncreaseNPCs
(
int
increaseAmount
)
{
int
howManyAvailableInNPCsParent
=
maxNPCsInGame
-
_currentNPCsInGame
;
int
spawnCount
=
Mathf
.
Min
(
increaseAmount
,
howManyAvailableInNPCsParent
);
int
increaseCount
=
0
;
for
(
int
i
=
0
;
i
<
increaseAm
ount
;
i
++)
for
(
int
i
=
0
;
i
<
NPCsSpawnParent
.
childCount
&&
increaseCount
<
spawnC
ount
;
i
++)
{
Transform
npcToActivate
=
NPCsSpawnParent
.
GetChild
(
i
);
if
(!
npcToActivate
.
gameObject
.
activeSelf
)
{
npcToActivate
.
gameObject
.
SetActive
(
true
);
increaseCount
++;
}
ChangeCurrentNPCsInGame
(
increaseAmount
);
}
ChangeCurrentNPCsInGame
();
RePositionNPCs
();
//int howManyAvailableInNPCsParent = maxNPCsInGame - NPCsSpawnParent.childCount;
//int spawnCount = Mathf.Min(increaseAmount, howManyAvailableInNPCsParent);
...
...
@@ -82,19 +90,25 @@ public class SpwanManager : MonoBehaviour
//{
// Instantiate(NPCsPrefab, NPCsSpawnParent.position, Quaternion.identity, NPCsSpawnParent);
//}
RePositionNPCs
();
}
void
DecreaseNPCs
(
int
decreaseAmount
)
{
for
(
int
i
=
0
;
i
<
decreaseAmount
;
i
++)
int
decreasedCount
=
0
;
for
(
int
i
=
0
;
i
<
NPCsSpawnParent
.
childCount
&&
decreasedCount
<
decreaseAmount
;
i
++)
{
Transform
npcToActivate
=
NPCsSpawnParent
.
GetChild
(
i
);
npcToActivate
.
gameObject
.
SetActive
(
false
);
Transform
npc
=
NPCsSpawnParent
.
GetChild
(
i
);
if
(
npc
.
gameObject
.
activeSelf
)
{
npc
.
gameObject
.
SetActive
(
false
);
decreasedCount
++;
}
ChangeCurrentNPCsInGame
(-
decreaseAmount
);
}
ChangeCurrentNPCsInGame
();
RePositionNPCs
();
//int removeCount = Mathf.Min(decreaseAmount, NPCsSpawnParent.childCount);
...
...
@@ -105,9 +119,8 @@ public class SpwanManager : MonoBehaviour
// npcToRemove.SetParent(null);
// Destroy(npcToRemove.gameObject);
//}
RePositionNPCs
();
}
public
void
ChangeCurrentNPCsInGame
(
int
newAmount
)
public
void
ChangeCurrentNPCsInGame
()
{
//_currentNPCsInGame += newAmount;
//_currentNPCsInGame = Mathf.Clamp(_currentNPCsInGame, 0, maxNPCsInGame);
...
...
Assets/_project/Scripts/Systems/VFX/EffectsManager.cs
View file @
bb3fa8f0
...
...
@@ -50,14 +50,15 @@ public class EffectsManager : MonoBehaviour
if
(
status
)
{
RandomAudioPitch
();
correctAnswerVFX
.
transform
.
position
=
player
.
position
;
correctAnswerVFX
.
Play
();
_audioSource
.
PlayOneShot
(
correctAnswerSFX
);
fadeColor
(
Color
.
green
);
}
else
{
RandomAudioPitch
();
incorrectAnswerVFX
.
transform
.
position
=
player
.
position
;
incorrectAnswerVFX
.
Play
();
_audioSource
.
PlayOneShot
(
incorrectAnswerSFX
);
...
...
@@ -67,6 +68,8 @@ public class EffectsManager : MonoBehaviour
}
player
.
DOBlendableMoveBy
(
Vector3
.
forward
*
dashAmount
,
0.2f
).
SetEase
(
Ease
.
OutQuad
);
}
void
RandomAudioPitch
()
=>
_audioSource
.
pitch
=
Random
.
Range
(
0.8f
,
1.2f
);
void
fadeColor
(
Color
color
)
{
for
(
int
i
=
0
;
i
<
_playersAndNPCsMeshRenderer
.
Count
;
i
++)
...
...
ProjectSettings/BurstAotSettings_StandaloneWindows.json
View file @
bb3fa8f0
{
"MonoBehaviour"
:
{
"Version"
:
3
,
"Version"
:
5
,
"EnableBurstCompilation"
:
true
,
"EnableOptimisations"
:
true
,
"EnableSafetyChecks"
:
false
,
"EnableDebugInAllBuilds"
:
false
,
"UsePlatformSDKLinker"
:
false
,
"DebugDataKind"
:
0
,
"EnableArmv9SecurityFeatures"
:
false
,
"CpuMinTargetX32"
:
0
,
"CpuMaxTargetX32"
:
0
,
"CpuMinTargetX64"
:
0
,
"CpuMaxTargetX64"
:
0
,
"CpuTargetsX32"
:
6
,
"CpuTargetsX64"
:
72
"CpuTargetsX64"
:
72
,
"OptimizeFor"
:
0
}
}
ProjectSettings/CommonBurstAotSettings.json
View file @
bb3fa8f0
{
"MonoBehaviour"
:
{
"Version"
:
3
,
"Version"
:
5
,
"DisabledWarnings"
:
""
}
}
ProjectSettings/Packages/com.unity.probuilder/Settings.json
View file @
bb3fa8f0
...
...
@@ -116,6 +116,11 @@
"key"
:
"editor.extrudeEdgesAsGroup"
,
"value"
:
"{
\"
m_Value
\"
:true}"
},
{
"type"
:
"System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
,
"key"
:
"editor.stripProBuilderScriptsOnBuild"
,
"value"
:
"{
\"
m_Value
\"
:true}"
},
{
"type"
:
"UnityEngine.Rendering.ShadowCastingMode, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"
,
"key"
:
"mesh.shadowCastingMode"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment