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
738b438a
Commit
738b438a
authored
Jan 22, 2026
by
Abdulrahman Mohammed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Generate Random Levels
parent
bb3fa8f0
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
360 additions
and
3926 deletions
+360
-3926
Empty.prefab
Assets/_project/Prefabs/Questions Area/Empty.prefab
+4
-4
Empty.prefab.meta
Assets/_project/Prefabs/Questions Area/Empty.prefab.meta
+0
-0
Enemy Area.prefab
Assets/_project/Prefabs/Questions Area/Enemy Area.prefab
+14
-52
Question Area.prefab
Assets/_project/Prefabs/Questions Area/Question Area.prefab
+4
-4
covid19.prefab
Assets/_project/Prefabs/covid19.prefab
+7
-3
Game.unity
Assets/_project/Scenes/Game.unity
+156
-3792
MainMenu.unity
Assets/_project/Scenes/MainMenu.unity
+1
-1
ContainerManager.cs
Assets/_project/Scripts/Core/Manager/ContainerManager.cs
+18
-0
ContainerManager.cs.meta
...ts/_project/Scripts/Core/Manager/ContainerManager.cs.meta
+1
-1
CameraMovement.cs
Assets/_project/Scripts/Systems/Camera/CameraMovement.cs
+4
-2
EnemyArea.cs
Assets/_project/Scripts/Systems/Enemy/EnemyArea.cs
+12
-2
EnemyScript.cs
Assets/_project/Scripts/Systems/Enemy/EnemyScript.cs
+3
-2
PlayerMovement.cs
Assets/_project/Scripts/Systems/Player/PlayerMovement.cs
+5
-11
RotateBlood.cs
Assets/_project/Scripts/Systems/Player/RotateBlood.cs
+29
-0
Answer.cs
Assets/_project/Scripts/Systems/Questions/Answer.cs
+2
-1
QuestionArea.cs
Assets/_project/Scripts/Systems/Questions/QuestionArea.cs
+9
-6
QuestionManager.cs
Assets/_project/Scripts/Systems/Questions/QuestionManager.cs
+0
-23
SpawnQuestion.cs
Assets/_project/Scripts/Systems/Spwan/SpawnQuestion.cs
+80
-0
SpawnQuestion.cs.meta
Assets/_project/Scripts/Systems/Spwan/SpawnQuestion.cs.meta
+11
-0
SpwanManager.cs
Assets/_project/Scripts/Systems/Spwan/SpwanManager.cs
+0
-22
No files found.
Assets/_project/Prefabs/Questions Area/
Start
.prefab
→
Assets/_project/Prefabs/Questions Area/
Empty
.prefab
View file @
738b438a
...
@@ -225,7 +225,7 @@ GameObject:
...
@@ -225,7 +225,7 @@ GameObject:
-
component
:
{
fileID
:
2998999329351238821
}
-
component
:
{
fileID
:
2998999329351238821
}
-
component
:
{
fileID
:
2681292289843926559
}
-
component
:
{
fileID
:
2681292289843926559
}
m_Layer
:
0
m_Layer
:
0
m_Name
:
Start
m_Name
:
Empty
m_TagString
:
Untagged
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_NavMeshLayer
:
0
...
@@ -241,7 +241,7 @@ Transform:
...
@@ -241,7 +241,7 @@ Transform:
serializedVersion
:
2
serializedVersion
:
2
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
2.23
,
y
:
0
,
z
:
-30
}
m_LocalPosition
:
{
x
:
2.23
,
y
:
0
,
z
:
-30
}
m_LocalScale
:
{
x
:
1.15
,
y
:
1
,
z
:
1
}
m_LocalScale
:
{
x
:
1.15
,
y
:
1
,
z
:
1
.5
}
m_ConstrainProportionsScale
:
0
m_ConstrainProportionsScale
:
0
m_Children
:
m_Children
:
-
{
fileID
:
4251326578671272785
}
-
{
fileID
:
4251326578671272785
}
...
@@ -312,7 +312,7 @@ MonoBehaviour:
...
@@ -312,7 +312,7 @@ MonoBehaviour:
m_PreserveMeshAssetOnDestroy
:
0
m_PreserveMeshAssetOnDestroy
:
0
assetGuid
:
assetGuid
:
m_Mesh
:
{
fileID
:
0
}
m_Mesh
:
{
fileID
:
0
}
m_VersionIndex
:
21
84
m_VersionIndex
:
21
90
m_IsSelectable
:
1
m_IsSelectable
:
1
m_SelectedFaces
:
m_SelectedFaces
:
m_SelectedEdges
:
[]
m_SelectedEdges
:
[]
...
@@ -4384,7 +4384,7 @@ MonoBehaviour:
...
@@ -4384,7 +4384,7 @@ MonoBehaviour:
m_PreserveMeshAssetOnDestroy
:
0
m_PreserveMeshAssetOnDestroy
:
0
assetGuid
:
assetGuid
:
m_Mesh
:
{
fileID
:
0
}
m_Mesh
:
{
fileID
:
0
}
m_VersionIndex
:
200
1
m_VersionIndex
:
200
7
m_IsSelectable
:
1
m_IsSelectable
:
1
m_SelectedFaces
:
m_SelectedFaces
:
m_SelectedEdges
:
[]
m_SelectedEdges
:
[]
...
...
Assets/_project/Prefabs/Questions Area/
Start
.prefab.meta
→
Assets/_project/Prefabs/Questions Area/
Empty
.prefab.meta
View file @
738b438a
File moved
Assets/_project/Prefabs/Questions Area/Enemy Area.prefab
View file @
738b438a
...
@@ -122,7 +122,7 @@ RectTransform:
...
@@ -122,7 +122,7 @@ RectTransform:
m_Father
:
{
fileID
:
9143448237922178203
}
m_Father
:
{
fileID
:
9143448237922178203
}
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
}
m_AnchorMax
:
{
x
:
0
,
y
:
0
}
m_AnchorMax
:
{
x
:
1
,
y
:
1
}
m_AnchoredPosition
:
{
x
:
0
,
y
:
0
}
m_AnchoredPosition
:
{
x
:
0
,
y
:
0
}
m_SizeDelta
:
{
x
:
0
,
y
:
0
}
m_SizeDelta
:
{
x
:
0
,
y
:
0
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
...
@@ -416,7 +416,6 @@ Transform:
...
@@ -416,7 +416,6 @@ Transform:
m_Children
:
m_Children
:
-
{
fileID
:
1014630243346878185
}
-
{
fileID
:
1014630243346878185
}
-
{
fileID
:
8705232317391820588
}
-
{
fileID
:
8705232317391820588
}
-
{
fileID
:
8724371554304158580
}
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!1
&2673343522929614604
---
!u!1
&2673343522929614604
...
@@ -434,7 +433,7 @@ GameObject:
...
@@ -434,7 +433,7 @@ GameObject:
-
component
:
{
fileID
:
3386078076239196088
}
-
component
:
{
fileID
:
3386078076239196088
}
-
component
:
{
fileID
:
3860284701908414044
}
-
component
:
{
fileID
:
3860284701908414044
}
m_Layer
:
0
m_Layer
:
0
m_Name
:
Cube
m_Name
:
Wall
m_TagString
:
Untagged
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_NavMeshLayer
:
0
...
@@ -449,11 +448,11 @@ Transform:
...
@@ -449,11 +448,11 @@ Transform:
m_GameObject
:
{
fileID
:
2673343522929614604
}
m_GameObject
:
{
fileID
:
2673343522929614604
}
serializedVersion
:
2
serializedVersion
:
2
m_LocalRotation
:
{
x
:
-0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalRotation
:
{
x
:
-0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalPosition
:
{
x
:
-
4
,
y
:
0
,
z
:
129
}
m_LocalPosition
:
{
x
:
-
5.4173913
,
y
:
0
,
z
:
19.992012
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_LocalScale
:
{
x
:
0.8695652
,
y
:
1
,
z
:
1
}
m_ConstrainProportionsScale
:
0
m_ConstrainProportionsScale
:
0
m_Children
:
[]
m_Children
:
[]
m_Father
:
{
fileID
:
8
29278184570618642
8
}
m_Father
:
{
fileID
:
8
70523231739182058
8
}
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!114
&2295769132377960148
---
!u!114
&2295769132377960148
MonoBehaviour
:
MonoBehaviour
:
...
@@ -910,8 +909,8 @@ BoxCollider:
...
@@ -910,8 +909,8 @@ BoxCollider:
m_ProvidesContacts
:
0
m_ProvidesContacts
:
0
m_Enabled
:
1
m_Enabled
:
1
serializedVersion
:
3
serializedVersion
:
3
m_Size
:
{
x
:
0.2
0713311
,
y
:
0.062318023
,
z
:
0.139857
8
}
m_Size
:
{
x
:
0.2
2093646
,
y
:
0.062318023
,
z
:
0.1591825
8
}
m_Center
:
{
x
:
0
,
y
:
0.013320
199
,
z
:
0.06801179
}
m_Center
:
{
x
:
0
,
y
:
0.013320
202
,
z
:
0.05834952
}
---
!u!114
&3632654124685458951
---
!u!114
&3632654124685458951
MonoBehaviour
:
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
@@ -928,7 +927,6 @@ MonoBehaviour:
...
@@ -928,7 +927,6 @@ MonoBehaviour:
health
:
80
health
:
80
healthSlider
:
{
fileID
:
7855868623801550860
}
healthSlider
:
{
fileID
:
7855868623801550860
}
hitClip
:
{
fileID
:
8300000
,
guid
:
a991034414d277544af7084dd6dc7a2b
,
type
:
3
}
hitClip
:
{
fileID
:
8300000
,
guid
:
a991034414d277544af7084dd6dc7a2b
,
type
:
3
}
shakeStrength
:
0.0075
---
!u!54
&8673915052375520288
---
!u!54
&8673915052375520288
Rigidbody
:
Rigidbody
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
@@ -965,7 +963,8 @@ AudioSource:
...
@@ -965,7 +963,8 @@ AudioSource:
m_GameObject
:
{
fileID
:
4099675634854172904
}
m_GameObject
:
{
fileID
:
4099675634854172904
}
m_Enabled
:
1
m_Enabled
:
1
serializedVersion
:
4
serializedVersion
:
4
OutputAudioMixerGroup
:
{
fileID
:
0
}
OutputAudioMixerGroup
:
{
fileID
:
24300002
,
guid
:
5a4ab7a92d37e3649b9839994fbe2bc2
,
type
:
2
}
m_audioClip
:
{
fileID
:
8300000
,
guid
:
6e631738d40a5da4198bbf9cf0b59bb6
,
type
:
3
}
m_audioClip
:
{
fileID
:
8300000
,
guid
:
6e631738d40a5da4198bbf9cf0b59bb6
,
type
:
3
}
m_PlayOnAwake
:
1
m_PlayOnAwake
:
1
m_Volume
:
1
m_Volume
:
1
...
@@ -5214,8 +5213,8 @@ Transform:
...
@@ -5214,8 +5213,8 @@ Transform:
m_PrefabAsset
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
5639176411216372903
}
m_GameObject
:
{
fileID
:
5639176411216372903
}
serializedVersion
:
2
serializedVersion
:
2
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
:
-2.23
,
y
:
0
,
z
:
-109.00799
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_ConstrainProportionsScale
:
0
m_ConstrainProportionsScale
:
0
m_Children
:
m_Children
:
...
@@ -5253,13 +5252,14 @@ Transform:
...
@@ -5253,13 +5252,14 @@ Transform:
m_GameObject
:
{
fileID
:
5978578856613855189
}
m_GameObject
:
{
fileID
:
5978578856613855189
}
serializedVersion
:
2
serializedVersion
:
2
m_LocalRotation
:
{
x
:
-0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalRotation
:
{
x
:
-0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalPosition
:
{
x
:
2.23
,
y
:
0
,
z
:
109.00799
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_LocalScale
:
{
x
:
1.15
,
y
:
1
,
z
:
1
}
m_LocalScale
:
{
x
:
1.15
,
y
:
1
,
z
:
1
}
m_ConstrainProportionsScale
:
0
m_ConstrainProportionsScale
:
0
m_Children
:
m_Children
:
-
{
fileID
:
834189057126252906
}
-
{
fileID
:
834189057126252906
}
-
{
fileID
:
6674855103497809671
}
-
{
fileID
:
6674855103497809671
}
-
{
fileID
:
6667120662435470534
}
-
{
fileID
:
6667120662435470534
}
-
{
fileID
:
8724371554304158580
}
m_Father
:
{
fileID
:
8292781845706186428
}
m_Father
:
{
fileID
:
8292781845706186428
}
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!114
&1073588711995899552
---
!u!114
&1073588711995899552
...
@@ -5441,45 +5441,7 @@ MonoBehaviour:
...
@@ -5441,45 +5441,7 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
981ddc12ab1298541a79492bf95afd3f
,
type
:
3
}
m_Script
:
{
fileID
:
11500000
,
guid
:
981ddc12ab1298541a79492bf95afd3f
,
type
:
3
}
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
wakeUpEnemy
:
virus
:
{
fileID
:
4099675634854172904
}
m_PersistentCalls
:
m_Calls
:
-
m_Target
:
{
fileID
:
4099675634854172904
}
m_TargetAssemblyTypeName
:
UnityEngine.GameObject, UnityEngine
m_MethodName
:
SetActive
m_Mode
:
6
m_Arguments
:
m_ObjectArgument
:
{
fileID
:
0
}
m_ObjectArgumentAssemblyTypeName
:
UnityEngine.Object, UnityEngine
m_IntArgument
:
0
m_FloatArgument
:
0
m_StringArgument
:
m_BoolArgument
:
1
m_CallState
:
2
-
m_Target
:
{
fileID
:
0
}
m_TargetAssemblyTypeName
:
PlayerMovement, Assembly-CSharp
m_MethodName
:
SetSpeed
m_Mode
:
3
m_Arguments
:
m_ObjectArgument
:
{
fileID
:
0
}
m_ObjectArgumentAssemblyTypeName
:
UnityEngine.Object, UnityEngine
m_IntArgument
:
1
m_FloatArgument
:
0
m_StringArgument
:
m_BoolArgument
:
0
m_CallState
:
2
-
m_Target
:
{
fileID
:
0
}
m_TargetAssemblyTypeName
:
CameraMovement, Assembly-CSharp
m_MethodName
:
SetSpeed
m_Mode
:
4
m_Arguments
:
m_ObjectArgument
:
{
fileID
:
0
}
m_ObjectArgumentAssemblyTypeName
:
UnityEngine.Object, UnityEngine
m_IntArgument
:
1
m_FloatArgument
:
0.25
m_StringArgument
:
m_BoolArgument
:
0
m_CallState
:
2
---
!u!1
&7655358461642858228
---
!u!1
&7655358461642858228
GameObject
:
GameObject
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
...
Assets/_project/Prefabs/Questions Area/Question Area.prefab
View file @
738b438a
...
@@ -152,7 +152,6 @@ MonoBehaviour:
...
@@ -152,7 +152,6 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
0bd912bb11f767e45b3d040f71b0aaa7
,
type
:
3
}
m_Script
:
{
fileID
:
11500000
,
guid
:
0bd912bb11f767e45b3d040f71b0aaa7
,
type
:
3
}
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
<index>k__BackingField
:
0
---
!u!1
&932225745288769094
---
!u!1
&932225745288769094
GameObject
:
GameObject
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
@@ -483,7 +482,6 @@ MonoBehaviour:
...
@@ -483,7 +482,6 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
0bd912bb11f767e45b3d040f71b0aaa7
,
type
:
3
}
m_Script
:
{
fileID
:
11500000
,
guid
:
0bd912bb11f767e45b3d040f71b0aaa7
,
type
:
3
}
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
<index>k__BackingField
:
2
---
!u!1
&1762389888842252517
---
!u!1
&1762389888842252517
GameObject
:
GameObject
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
@@ -738,6 +736,7 @@ MonoBehaviour:
...
@@ -738,6 +736,7 @@ MonoBehaviour:
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
fadeDuration
:
0.75
fadeDuration
:
0.75
fadeOnStart
:
0
---
!u!1
&2662198505241990919
---
!u!1
&2662198505241990919
GameObject
:
GameObject
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
@@ -909,6 +908,7 @@ MonoBehaviour:
...
@@ -909,6 +908,7 @@ MonoBehaviour:
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
fadeDuration
:
0.75
fadeDuration
:
0.75
fadeOnStart
:
0
---
!u!1
&2719780919841259492
---
!u!1
&2719780919841259492
GameObject
:
GameObject
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
@@ -1220,6 +1220,7 @@ MonoBehaviour:
...
@@ -1220,6 +1220,7 @@ MonoBehaviour:
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
fadeDuration
:
0.75
fadeDuration
:
0.75
fadeOnStart
:
0
---
!u!1
&4538400059142529437
---
!u!1
&4538400059142529437
GameObject
:
GameObject
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
@@ -1252,7 +1253,7 @@ Transform:
...
@@ -1252,7 +1253,7 @@ Transform:
serializedVersion
:
2
serializedVersion
:
2
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
2.23
,
y
:
0
,
z
:
-10
}
m_LocalPosition
:
{
x
:
2.23
,
y
:
0
,
z
:
-10
}
m_LocalScale
:
{
x
:
1.15
,
y
:
1
,
z
:
1.
4876
}
m_LocalScale
:
{
x
:
1.15
,
y
:
1
,
z
:
1.
5
}
m_ConstrainProportionsScale
:
0
m_ConstrainProportionsScale
:
0
m_Children
:
m_Children
:
-
{
fileID
:
8259959051626121911
}
-
{
fileID
:
8259959051626121911
}
...
@@ -1715,7 +1716,6 @@ MonoBehaviour:
...
@@ -1715,7 +1716,6 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
0bd912bb11f767e45b3d040f71b0aaa7
,
type
:
3
}
m_Script
:
{
fileID
:
11500000
,
guid
:
0bd912bb11f767e45b3d040f71b0aaa7
,
type
:
3
}
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
<index>k__BackingField
:
1
---
!u!1
&6681320055666666270
---
!u!1
&6681320055666666270
GameObject
:
GameObject
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
...
Assets/_project/Prefabs/covid19.prefab
View file @
738b438a
...
@@ -107,7 +107,7 @@ BoxCollider:
...
@@ -107,7 +107,7 @@ BoxCollider:
m_ProvidesContacts
:
0
m_ProvidesContacts
:
0
m_Enabled
:
1
m_Enabled
:
1
serializedVersion
:
3
serializedVersion
:
3
m_Size
:
{
x
:
0.02
573255
,
y
:
0.26380414
,
z
:
0.03183084
}
m_Size
:
{
x
:
0.02
6069043
,
y
:
0.2672538
,
z
:
0.026132142
}
m_Center
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_Center
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!114
&6261498682272946386
---
!u!114
&6261498682272946386
MonoBehaviour
:
MonoBehaviour
:
...
@@ -134,15 +134,19 @@ MonoBehaviour:
...
@@ -134,15 +134,19 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
46c085c8075e92e47964f4d92e29d15d
,
type
:
3
}
m_Script
:
{
fileID
:
11500000
,
guid
:
46c085c8075e92e47964f4d92e29d15d
,
type
:
3
}
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
isObstacle
:
1
idleObstacle
:
0
rotate
:
1
rotate
:
1
reverse
:
0
reverse
:
0
rotateDuration
:
5
rotateDuration
:
5
upAndDown
:
1
upAndDown
:
1
EnableRandomUpAndDown
:
0
upAndDownAmount
:
3
upAndDownAmount
:
3
upAndDownDuration
:
1
upAndDownDuration
:
1
moveLeftAndRight
:
0
moveLeftAndRight
:
0
moveLeftAndRightAmount
:
0
moveLeftAndRightAmount
:
3
moveLeftAndRightDuration
:
0
moveLeftAndRightDuration
:
2
moveLocalLeftAndRightAndRandom
:
0
---
!u!54
&2016084165090486392
---
!u!54
&2016084165090486392
Rigidbody
:
Rigidbody
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
...
Assets/_project/Scenes/Game.unity
View file @
738b438a
This source diff could not be displayed because it is too large. You can
view the blob
instead.
Assets/_project/Scenes/MainMenu.unity
View file @
738b438a
...
@@ -805,7 +805,7 @@ MonoBehaviour:
...
@@ -805,7 +805,7 @@ MonoBehaviour:
m_fontSizeMax
:
72
m_fontSizeMax
:
72
m_fontStyle
:
0
m_fontStyle
:
0
m_HorizontalAlignment
:
2
m_HorizontalAlignment
:
2
m_VerticalAlignment
:
1024
m_VerticalAlignment
:
512
m_textAlignment
:
65535
m_textAlignment
:
65535
m_characterSpacing
:
0
m_characterSpacing
:
0
m_wordSpacing
:
0
m_wordSpacing
:
0
...
...
Assets/_project/Scripts/Core/Manager/ContainerManager.cs
0 → 100644
View file @
738b438a
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
ContainerManager
:
MonoBehaviour
{
public
static
ContainerManager
Instance
{
get
;
private
set
;
}
[
field
:
SerializeField
]
public
GameObject
Player
{
get
;
private
set
;
}
[
field
:
SerializeField
]
public
GameObject
Camera
{
get
;
private
set
;
}
private
void
Awake
()
{
if
(
Instance
==
null
)
Instance
=
this
;
else
Destroy
(
gameObject
);
}
}
Assets/_project/Scripts/
Systems/Questions/Question
Manager.cs.meta
→
Assets/_project/Scripts/
Core/Manager/Container
Manager.cs.meta
View file @
738b438a
fileFormatVersion: 2
fileFormatVersion: 2
guid:
9703e8899d7c635469f1820520e3180f
guid:
3a664e0e26c55554d8711b1041ff2200
MonoImporter:
MonoImporter:
externalObjects: {}
externalObjects: {}
serializedVersion: 2
serializedVersion: 2
...
...
Assets/_project/Scripts/Systems/Camera/CameraMovement.cs
View file @
738b438a
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
using
UnityEngine
;
public
class
CameraMovement
:
MonoBehaviour
public
class
CameraMovement
:
MonoBehaviour
...
@@ -10,6 +8,10 @@ public class CameraMovement : MonoBehaviour
...
@@ -10,6 +8,10 @@ public class CameraMovement : MonoBehaviour
void
Start
()
void
Start
()
{
{
// defult value
transform
.
position
=
new
Vector3
(-
2.30999994f
,
2.25f
,
11.92f
);
transform
.
rotation
=
Quaternion
.
Euler
(
20
,
0
,
0
);
_offset
=
transform
.
position
-
player
.
position
;
_offset
=
transform
.
position
-
player
.
position
;
}
}
void
LateUpdate
()
void
LateUpdate
()
...
...
Assets/_project/Scripts/Systems/Enemy/EnemyArea.cs
View file @
738b438a
...
@@ -3,12 +3,22 @@ using UnityEngine.Events;
...
@@ -3,12 +3,22 @@ using UnityEngine.Events;
public
class
EnemyArea
:
MonoBehaviour
public
class
EnemyArea
:
MonoBehaviour
{
{
[
SerializeField
]
UnityEvent
wakeUpEnemy
;
[
SerializeField
]
GameObject
virus
;
PlayerMovement
playerMovement
;
CameraMovement
cameraMovement
;
private
void
Start
()
{
playerMovement
=
ContainerManager
.
Instance
.
Player
.
GetComponent
<
PlayerMovement
>();
cameraMovement
=
ContainerManager
.
Instance
.
Camera
.
GetComponent
<
CameraMovement
>();
}
void
OnTriggerEnter
(
Collider
other
)
void
OnTriggerEnter
(
Collider
other
)
{
{
if
(
other
.
CompareTag
(
"Player"
))
if
(
other
.
CompareTag
(
"Player"
))
{
{
wakeUpEnemy
?.
Invoke
();
virus
.
SetActive
(
true
);
playerMovement
.
SetSpeed
(
1
);
cameraMovement
.
SetSpeed
(.
25f
);
}
}
}
}
}
}
Assets/_project/Scripts/Systems/Enemy/EnemyScript.cs
View file @
738b438a
using
DG.Tweening
;
using
DG.Tweening
;
using
System
;
using
System
;
using
System.Collections
;
using
System.Collections
;
using
Unity.Mathematics
;
using
UnityEngine
;
using
UnityEngine
;
using
UnityEngine.UI
;
using
UnityEngine.UI
;
...
@@ -16,7 +17,6 @@ public class EnemyScript : MonoBehaviour
...
@@ -16,7 +17,6 @@ public class EnemyScript : MonoBehaviour
int
hitsNumber
;
int
hitsNumber
;
AudioSource
_audioSource
;
AudioSource
_audioSource
;
SkinnedMeshRenderer
_meshRenderer
;
SkinnedMeshRenderer
_meshRenderer
;
[
SerializeField
]
float
shakeStrength
;
private
void
Start
()
private
void
Start
()
{
{
_audioSource
=
GetComponent
<
AudioSource
>();
_audioSource
=
GetComponent
<
AudioSource
>();
...
@@ -38,7 +38,7 @@ public class EnemyScript : MonoBehaviour
...
@@ -38,7 +38,7 @@ public class EnemyScript : MonoBehaviour
}
}
if
(
other
.
CompareTag
(
"Player"
))
if
(
other
.
CompareTag
(
"Player"
))
{
{
transform
.
parent
.
DOShakeScale
(
6
,
shakeStrength
);
transform
.
parent
.
DOShakeScale
(
6
,
0.0075f
);
_meshRenderer
.
material
.
DOColor
(
Color
.
red
,
fadeColorDuration
).
SetEase
(
Ease
.
Linear
).
SetLoops
(
24
,
LoopType
.
Yoyo
).
OnComplete
(()
=>
_meshRenderer
.
material
.
DOColor
(
Color
.
red
,
fadeColorDuration
).
SetEase
(
Ease
.
Linear
).
SetLoops
(
24
,
LoopType
.
Yoyo
).
OnComplete
(()
=>
{
{
_meshRenderer
.
material
.
color
=
Color
.
white
;
_meshRenderer
.
material
.
color
=
Color
.
white
;
...
@@ -53,6 +53,7 @@ public class EnemyScript : MonoBehaviour
...
@@ -53,6 +53,7 @@ public class EnemyScript : MonoBehaviour
health
--;
health
--;
hitsNumber
++;
hitsNumber
++;
healthSlider
.
value
=
health
;
healthSlider
.
value
=
health
;
_audioSource
.
pitch
=
UnityEngine
.
Random
.
Range
(
0.6f
,
1.6f
);
_audioSource
.
PlayOneShot
(
hitClip
);
_audioSource
.
PlayOneShot
(
hitClip
);
if
(
health
<=
0
)
if
(
health
<=
0
)
{
{
...
...
Assets/_project/Scripts/Systems/Player/PlayerMovement.cs
View file @
738b438a
...
@@ -3,31 +3,25 @@ using UnityEngine;
...
@@ -3,31 +3,25 @@ using UnityEngine;
public
class
PlayerMovement
:
MonoBehaviour
public
class
PlayerMovement
:
MonoBehaviour
{
{
[
SerializeField
]
float
distanceBetweenLanes
;
[
SerializeField
]
float
moveForwardSpeed
;
[
SerializeField
]
float
moveForwardSpeed
;
[
SerializeField
]
float
swapeSpeed
;
[
SerializeField
]
float
swapeSpeed
;
[
SerializeField
]
float
maxLeft
;
int
_currentLane
;
[
SerializeField
]
float
maxRight
;
float
targetX
;
float
targetX
;
void
Start
()
{
_currentLane
=
0
;
}
void
Update
()
void
Update
()
{
{
transform
.
position
+=
Vector3
.
forward
*
moveForwardSpeed
*
Time
.
deltaTime
;
transform
.
position
+=
Vector3
.
forward
*
moveForwardSpeed
*
Time
.
deltaTime
;
// -1 = left + 0 = center + 1 = right
if
(
Input
.
GetKey
(
KeyCode
.
A
))
if
(
Input
.
GetKey
(
KeyCode
.
A
))
MovePlayer
(
-
1
);
MovePlayer
(
0
);
else
if
(
Input
.
GetKey
(
KeyCode
.
D
))
else
if
(
Input
.
GetKey
(
KeyCode
.
D
))
MovePlayer
(
1
);
MovePlayer
(
1
);
}
}
public
void
MovePlayer
(
float
moveX
)
// public to call from kinect
public
void
MovePlayer
(
float
moveX
)
// public to call from kinect
{
{
float
targetX
=
Mathf
.
MoveTowards
(
transform
.
position
.
x
,
moveX
*
distanceBetweenLanes
,
Time
.
deltaTime
*
swapeSpeed
);
float
lerp
=
Mathf
.
Lerp
(
maxLeft
,
maxRight
,
moveX
);
float
targetX
=
Mathf
.
MoveTowards
(
transform
.
position
.
x
,
lerp
,
Time
.
deltaTime
*
swapeSpeed
);
transform
.
position
=
new
Vector3
(
targetX
,
transform
.
position
.
y
,
transform
.
position
.
z
);
transform
.
position
=
new
Vector3
(
targetX
,
transform
.
position
.
y
,
transform
.
position
.
z
);
}
}
public
void
SetSpeed
(
int
speed
)
public
void
SetSpeed
(
int
speed
)
...
...
Assets/_project/Scripts/Systems/Player/RotateBlood.cs
View file @
738b438a
...
@@ -4,6 +4,8 @@ using UnityEngine;
...
@@ -4,6 +4,8 @@ using UnityEngine;
using
DG.Tweening
;
using
DG.Tweening
;
public
class
RotateBlood
:
MonoBehaviour
public
class
RotateBlood
:
MonoBehaviour
{
{
[
SerializeField
]
bool
isObstacle
;
[
SerializeField
]
bool
idleObstacle
;
[
SerializeField
]
bool
rotate
;
[
SerializeField
]
bool
rotate
;
[
SerializeField
]
bool
reverse
;
[
SerializeField
]
bool
reverse
;
[
SerializeField
]
float
rotateDuration
;
[
SerializeField
]
float
rotateDuration
;
...
@@ -15,8 +17,35 @@ public class RotateBlood : MonoBehaviour
...
@@ -15,8 +17,35 @@ public class RotateBlood : MonoBehaviour
[
SerializeField
]
float
moveLeftAndRightAmount
;
[
SerializeField
]
float
moveLeftAndRightAmount
;
[
SerializeField
]
float
moveLeftAndRightDuration
;
[
SerializeField
]
float
moveLeftAndRightDuration
;
[
SerializeField
]
bool
moveLocalLeftAndRightAndRandom
;
[
SerializeField
]
bool
moveLocalLeftAndRightAndRandom
;
//[Header("Obstacle Setting")]
void
Start
()
void
Start
()
{
{
if
(
isObstacle
)
{
float
randomPos
=
Random
.
value
;
if
(
randomPos
<
.
5f
)
{
float
xPos
=
-.
5f
;
moveLeftAndRightAmount
*=
-
1
;
transform
.
position
=
new
Vector3
(
xPos
,
1
,
transform
.
position
.
z
);
}
else
{
float
xPos
=
-
4f
;
moveLeftAndRightAmount
*=
1
;
transform
.
position
=
new
Vector3
(
xPos
,
1
,
transform
.
position
.
z
);
}
idleObstacle
=
Random
.
value
>
.
5f
?
true
:
false
;
if
(
idleObstacle
)
{
moveLeftAndRight
=
false
;
transform
.
position
=
new
Vector3
(
Random
.
Range
(-.
5f
,
-
4f
),
1
,
transform
.
position
.
z
);
}
else
moveLeftAndRight
=
true
;
}
if
(
rotate
)
if
(
rotate
)
{
{
int
angle
=
reverse
?
-
360
:
360
;
int
angle
=
reverse
?
-
360
:
360
;
...
...
Assets/_project/Scripts/Systems/Questions/Answer.cs
View file @
738b438a
...
@@ -4,7 +4,7 @@ using UnityEngine;
...
@@ -4,7 +4,7 @@ using UnityEngine;
public
class
Answer
:
MonoBehaviour
public
class
Answer
:
MonoBehaviour
{
{
[
field
:
SerializeField
]
public
int
index
{
get
;
private
set
;
}
public
int
index
{
get
;
private
set
;
}
public
event
Action
<
int
>
OnPlayerHit
;
public
event
Action
<
int
>
OnPlayerHit
;
void
OnTriggerEnter
(
Collider
other
)
void
OnTriggerEnter
(
Collider
other
)
...
@@ -23,4 +23,5 @@ public class Answer : MonoBehaviour
...
@@ -23,4 +23,5 @@ public class Answer : MonoBehaviour
{
{
DOTween
.
Kill
(
transform
.
parent
);
DOTween
.
Kill
(
transform
.
parent
);
}
}
public
void
SetIndex
(
int
index
)
=>
this
.
index
=
index
;
}
}
Assets/_project/Scripts/Systems/Questions/QuestionArea.cs
View file @
738b438a
...
@@ -5,7 +5,7 @@ using UnityEngine;
...
@@ -5,7 +5,7 @@ using UnityEngine;
public
class
QuestionArea
:
MonoBehaviour
public
class
QuestionArea
:
MonoBehaviour
{
{
public
Question
question
;
public
Question
Question
{
get
;
private
set
;
}
public
static
event
Action
<
bool
>
OnQuestionIsAnswer
;
public
static
event
Action
<
bool
>
OnQuestionIsAnswer
;
public
static
event
Action
<
string
>
OnPlayerTriggerTheQuestion
;
public
static
event
Action
<
string
>
OnPlayerTriggerTheQuestion
;
...
@@ -14,7 +14,7 @@ public class QuestionArea : MonoBehaviour
...
@@ -14,7 +14,7 @@ public class QuestionArea : MonoBehaviour
[
SerializeField
]
List
<
Answer
>
answers
=
new
List
<
Answer
>();
[
SerializeField
]
List
<
Answer
>
answers
=
new
List
<
Answer
>();
void
Start
()
void
Start
()
{
{
if
(
q
uestion
==
null
)
if
(
Q
uestion
==
null
)
GetComponent
<
Collider
>().
enabled
=
false
;
GetComponent
<
Collider
>().
enabled
=
false
;
DisplayText
(
null
);
DisplayText
(
null
);
...
@@ -29,14 +29,14 @@ public class QuestionArea : MonoBehaviour
...
@@ -29,14 +29,14 @@ public class QuestionArea : MonoBehaviour
{
{
RotateAnswer
(
0
);
RotateAnswer
(
0
);
DisplayText
(
q
uestion
.
answers
);
DisplayText
(
Q
uestion
.
answers
);
}
}
}
}
void
DisplayText
(
string
[]
allText
)
void
DisplayText
(
string
[]
allText
)
{
{
if
(
allText
!=
null
)
if
(
allText
!=
null
)
{
{
OnPlayerTriggerTheQuestion
?.
Invoke
(
q
uestion
.
questionText
);
OnPlayerTriggerTheQuestion
?.
Invoke
(
Q
uestion
.
questionText
);
for
(
int
i
=
0
;
i
<
answersText
.
Length
;
i
++)
for
(
int
i
=
0
;
i
<
answersText
.
Length
;
i
++)
{
{
...
@@ -59,6 +59,8 @@ public class QuestionArea : MonoBehaviour
...
@@ -59,6 +59,8 @@ public class QuestionArea : MonoBehaviour
foreach
(
Answer
child
in
GetComponentsInChildren
<
Answer
>())
foreach
(
Answer
child
in
GetComponentsInChildren
<
Answer
>())
{
{
answers
.
Add
(
child
);
answers
.
Add
(
child
);
child
.
SetIndex
(
answers
.
IndexOf
(
child
));
if
(
status
)
if
(
status
)
child
.
OnPlayerHit
+=
playerHitAnswer
;
child
.
OnPlayerHit
+=
playerHitAnswer
;
else
else
...
@@ -67,10 +69,10 @@ public class QuestionArea : MonoBehaviour
...
@@ -67,10 +69,10 @@ public class QuestionArea : MonoBehaviour
}
}
private
void
playerHitAnswer
(
int
answerIndex
)
private
void
playerHitAnswer
(
int
answerIndex
)
{
{
if
(
q
uestion
==
null
)
if
(
Q
uestion
==
null
)
return
;
return
;
if
(
answerIndex
==
q
uestion
.
correctAnswerIndex
)
if
(
answerIndex
==
Q
uestion
.
correctAnswerIndex
)
{
{
OnQuestionIsAnswer
?.
Invoke
(
true
);
OnQuestionIsAnswer
?.
Invoke
(
true
);
foreach
(
Answer
child
in
answers
)
foreach
(
Answer
child
in
answers
)
...
@@ -94,4 +96,5 @@ public class QuestionArea : MonoBehaviour
...
@@ -94,4 +96,5 @@ public class QuestionArea : MonoBehaviour
child
.
rotateParent
(
deg
);
child
.
rotateParent
(
deg
);
}
}
}
}
public
void
SetQuestions
(
Question
question
)
=>
Question
=
question
;
}
}
\ No newline at end of file
Assets/_project/Scripts/Systems/Questions/QuestionManager.cs
deleted
100644 → 0
View file @
bb3fa8f0
using
UnityEngine
;
public
class
QuestionManager
:
MonoBehaviour
{
[
SerializeField
]
QuestionArea
[]
questionAreas
;
[
SerializeField
]
Question
[]
Question
;
void
Start
()
{
if
(
questionAreas
.
Length
==
Question
.
Length
)
{
for
(
int
i
=
0
;
i
<
questionAreas
.
Length
;
i
++)
{
questionAreas
[
i
].
question
=
Question
[
i
];
}
}
else
{
Debug
.
LogError
(
"QuestionAreas and Questions arrays must have the same length"
);
}
}
}
Assets/_project/Scripts/Systems/Spwan/SpawnQuestion.cs
0 → 100644
View file @
738b438a
using
System.Collections.Generic
;
using
System.Linq
;
using
UnityEngine
;
public
class
SpawnQuestion
:
MonoBehaviour
{
[
SerializeField
]
bool
randomQuestionEveryRound
;
[
SerializeField
]
float
areaLength
;
// defult: 30
[
Header
(
"Question Settings"
)]
[
SerializeField
]
Transform
QuestionParent
;
[
SerializeField
]
GameObject
questionAreaPrefab
;
[
SerializeField
]
GameObject
emptyAreaPrefab
;
[
SerializeField
]
GameObject
enemyAreaPrefab
;
[
SerializeField
]
Question
[]
questionScriptableObjects
;
[
Header
(
"Obstacle Settings"
)]
[
SerializeField
]
Transform
obstacleParent
;
[
SerializeField
]
GameObject
obstaclePrefab
;
[
SerializeField
]
int
NumberOfObstaclePerArea
;
float
currentLenght
;
private
void
Start
()
{
SpawnQuestionAreas
();
}
//[ContextMenu("Spawn")]
void
SpawnQuestionAreas
()
{
DestroyChild
();
currentLenght
=
0
;
if
(
randomQuestionEveryRound
)
{
//questionScriptableObjects = questionScriptableObjects.OrderBy(x => Random.value).ToArray();
ShuffleArray
(
questionScriptableObjects
);
}
for
(
int
i
=
0
;
i
<
questionScriptableObjects
.
Length
;
i
++)
{
if
(
questionScriptableObjects
[
i
]
==
null
)
Instantiate
(
emptyAreaPrefab
,
new
Vector3
(
0
,
0
,
currentLenght
),
Quaternion
.
identity
,
QuestionParent
);
else
{
GameObject
questionArea
=
Instantiate
(
questionAreaPrefab
,
new
Vector3
(
0
,
0
,
currentLenght
),
Quaternion
.
identity
,
QuestionParent
);
questionArea
.
GetComponent
<
QuestionArea
>().
SetQuestions
(
questionScriptableObjects
[
i
]);
}
if
(
i
>
0
&&
i
<
questionScriptableObjects
.
Length
-
1
)
for
(
int
j
=
0
;
j
<
NumberOfObstaclePerArea
;
j
++)
Instantiate
(
obstaclePrefab
,
new
Vector3
(
0
,
1
,
Random
.
Range
(
currentLenght
,
currentLenght
+
areaLength
)),
Quaternion
.
identity
,
obstacleParent
);
currentLenght
+=
areaLength
;
}
Instantiate
(
enemyAreaPrefab
,
new
Vector3
(
0
,
0
,
currentLenght
),
Quaternion
.
identity
,
QuestionParent
);
}
void
ShuffleArray
(
Question
[]
array
)
{
for
(
int
i
=
array
.
Length
-
1
;
i
>
0
;
i
--)
{
int
randomIndex
=
Random
.
Range
(
1
,
i
+
1
);
Question
temp
=
array
[
i
];
array
[
i
]
=
array
[
randomIndex
];
array
[
randomIndex
]
=
temp
;
}
}
private
void
DestroyChild
()
{
foreach
(
Transform
Question
in
QuestionParent
)
{
DestroyImmediate
(
Question
.
gameObject
);
}
foreach
(
Transform
obstacle
in
obstacleParent
)
{
DestroyImmediate
(
obstacle
.
gameObject
);
}
}
}
Assets/_project/Scripts/Systems/Spwan/SpawnQuestion.cs.meta
0 → 100644
View file @
738b438a
fileFormatVersion: 2
guid: 90d407e88a00e3747a2a730f56ab8436
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/_project/Scripts/Systems/Spwan/SpwanManager.cs
View file @
738b438a
...
@@ -5,8 +5,6 @@ public class SpwanManager : MonoBehaviour
...
@@ -5,8 +5,6 @@ public class SpwanManager : MonoBehaviour
{
{
public
static
SpwanManager
Instance
;
public
static
SpwanManager
Instance
;
[
SerializeField
]
Transform
questionsParent
;
[
Header
(
"NPC Spawn Settings"
)]
[
Header
(
"NPC Spawn Settings"
)]
[
SerializeField
]
int
maxNPCsInGame
;
[
SerializeField
]
int
maxNPCsInGame
;
[
SerializeField
]
int
maxIncreasePerSpawn
;
[
SerializeField
]
int
maxIncreasePerSpawn
;
...
@@ -82,14 +80,6 @@ public class SpwanManager : MonoBehaviour
...
@@ -82,14 +80,6 @@ public class SpwanManager : MonoBehaviour
}
}
ChangeCurrentNPCsInGame
();
ChangeCurrentNPCsInGame
();
RePositionNPCs
();
RePositionNPCs
();
//int howManyAvailableInNPCsParent = maxNPCsInGame - NPCsSpawnParent.childCount;
//int spawnCount = Mathf.Min(increaseAmount, howManyAvailableInNPCsParent);
//for (int i = 0; i < spawnCount; i++)
//{
// Instantiate(NPCsPrefab, NPCsSpawnParent.position, Quaternion.identity, NPCsSpawnParent);
//}
}
}
void
DecreaseNPCs
(
int
decreaseAmount
)
void
DecreaseNPCs
(
int
decreaseAmount
)
...
@@ -109,21 +99,9 @@ public class SpwanManager : MonoBehaviour
...
@@ -109,21 +99,9 @@ public class SpwanManager : MonoBehaviour
ChangeCurrentNPCsInGame
();
ChangeCurrentNPCsInGame
();
RePositionNPCs
();
RePositionNPCs
();
//int removeCount = Mathf.Min(decreaseAmount, NPCsSpawnParent.childCount);
//for (int i = 0; i < removeCount; i++)
//{
// Transform npcToRemove = NPCsSpawnParent.GetChild(NPCsSpawnParent.childCount - 1);
// npcToRemove.SetParent(null);
// Destroy(npcToRemove.gameObject);
//}
}
}
public
void
ChangeCurrentNPCsInGame
()
public
void
ChangeCurrentNPCsInGame
()
{
{
//_currentNPCsInGame += newAmount;
//_currentNPCsInGame = Mathf.Clamp(_currentNPCsInGame, 0, maxNPCsInGame);
_currentNPCsInGame
=
0
;
_currentNPCsInGame
=
0
;
foreach
(
Transform
child
in
NPCsSpawnParent
)
foreach
(
Transform
child
in
NPCsSpawnParent
)
{
{
...
...
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