Merge remote-tracking branch 'origin/dev' into jason

# Conflicts:
#	Assets/Prefabs/UI Canvas.prefab
#	Assets/Scripts/Arena Stats.asset
#	Assets/Scripts/GameFlowManager.cs
This commit is contained in:
Jason Durand 01 2022-04-02 17:54:42 -04:00
commit dd3d1fb57c
18 changed files with 6538 additions and 24 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 78e4227a7fbb82040b8d8138dad79b1d
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -78,6 +78,7 @@ GameObject:
- component: {fileID: 8365024801038495440} - component: {fileID: 8365024801038495440}
- component: {fileID: 8365024801038495454} - component: {fileID: 8365024801038495454}
- component: {fileID: 8365024801038495455} - component: {fileID: 8365024801038495455}
- component: {fileID: 1531181312}
m_Layer: 0 m_Layer: 0
m_Name: cm m_Name: cm
m_TagString: Untagged m_TagString: Untagged
@ -154,6 +155,23 @@ MonoBehaviour:
m_MaximumFOV: 60 m_MaximumFOV: 60
m_MinimumOrthoSize: 1 m_MinimumOrthoSize: 1
m_MaximumOrthoSize: 5000 m_MaximumOrthoSize: 5000
--- !u!114 &1531181312
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8365024801038495441}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 68bb026fafb42b14791938953eaace77, type: 3}
m_Name:
m_EditorClassIdentifier:
m_NoiseProfile: {fileID: 11400000, guid: 46965f9cbaf525742a6da4c2172a99cd, type: 2}
m_PivotOffset: {x: 0, y: 0, z: 0}
m_AmplitudeGain: 0
m_FrequencyGain: 0
mNoiseOffsets: {x: 0, y: 0, z: 0}
--- !u!1 &8365024801073869719 --- !u!1 &8365024801073869719
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -164,6 +182,7 @@ GameObject:
m_Component: m_Component:
- component: {fileID: 8365024801073869717} - component: {fileID: 8365024801073869717}
- component: {fileID: 8365024801073869718} - component: {fileID: 8365024801073869718}
- component: {fileID: 2035066971}
m_Layer: 0 m_Layer: 0
m_Name: VCam Vampire m_Name: VCam Vampire
m_TagString: Untagged m_TagString: Untagged
@ -208,7 +227,7 @@ MonoBehaviour:
m_Follow: {fileID: 0} m_Follow: {fileID: 0}
m_Lens: m_Lens:
FieldOfView: 60 FieldOfView: 60
OrthographicSize: 10 OrthographicSize: 7
NearClipPlane: 0.3 NearClipPlane: 0.3
FarClipPlane: 1000 FarClipPlane: 1000
Dutch: 0 Dutch: 0
@ -221,6 +240,18 @@ MonoBehaviour:
m_Calls: [] m_Calls: []
m_LegacyBlendHint: 0 m_LegacyBlendHint: 0
m_ComponentOwner: {fileID: 8365024801038495440} m_ComponentOwner: {fileID: 8365024801038495440}
--- !u!114 &2035066971
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8365024801073869719}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 69316e5653a69e04a97ae92bd78b1430, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &8365024801698166082 --- !u!1 &8365024801698166082
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -1,5 +1,156 @@
%YAML 1.1 %YAML 1.1
%TAG !u! tag:unity3d.com,2011: %TAG !u! tag:unity3d.com,2011:
--- !u!1 &763564871199756608
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7304592252411488326}
m_Layer: 5
m_Name: Safe Zone Prompt
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &7304592252411488326
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 763564871199756608}
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_Children:
- {fileID: 6820018694670671316}
m_Father: {fileID: 1878107874060227351}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &939250288673996249
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6820018694670671316}
- component: {fileID: 2559709786450296225}
- component: {fileID: 6319861665145814892}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6820018694670671316
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 939250288673996249}
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_Children: []
m_Father: {fileID: 7304592252411488326}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 500, y: 100}
m_Pivot: {x: 0.5, y: 0}
--- !u!222 &2559709786450296225
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 939250288673996249}
m_CullTransparentMesh: 1
--- !u!114 &6319861665145814892
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 939250288673996249}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 30
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 3
m_MaxSize: 50
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: 'A : Safe zone'
--- !u!1 &1844274959428875625
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6917216836479509094}
m_Layer: 5
m_Name: Start Prompt
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &6917216836479509094
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1844274959428875625}
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_Children:
- {fileID: 408737556976395859}
m_Father: {fileID: 1878107874060227351}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &344214375 --- !u!1 &344214375
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -271,7 +422,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 81a29b049c6380f4abb3c18ed121efcd, type: 3} m_Script: {fileID: 11500000, guid: 81a29b049c6380f4abb3c18ed121efcd, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
minionIconPrefab: {fileID: 1979632678310270257, guid: 2fee1ea5c97c5a04bb2c5f1f685fc92e, type: 3} minionIconPrefab: {fileID: 1979632678310270257, guid: 2fee1ea5c97c5a04bb2c5f1f685fc92e,
type: 3}
--- !u!114 &1878107873739935075 --- !u!114 &1878107873739935075
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -330,6 +482,8 @@ RectTransform:
m_Children: m_Children:
- {fileID: 1878107874314509258} - {fileID: 1878107874314509258}
- {fileID: 1878107873739935084} - {fileID: 1878107873739935084}
- {fileID: 6917216836479509094}
- {fileID: 7304592252411488326}
- {fileID: 344214376} - {fileID: 344214376}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 0 m_RootOrder: 0
@ -577,3 +731,82 @@ MonoBehaviour:
m_FillOrigin: 0 m_FillOrigin: 0
m_UseSpriteMesh: 0 m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1 m_PixelsPerUnitMultiplier: 1
--- !u!1 &2910275079998420734
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 408737556976395859}
- component: {fileID: 5431213429284538757}
- component: {fileID: 7753986740047806469}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &408737556976395859
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2910275079998420734}
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_Children: []
m_Father: {fileID: 6917216836479509094}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 500, y: 300}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5431213429284538757
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2910275079998420734}
m_CullTransparentMesh: 1
--- !u!114 &7753986740047806469
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2910275079998420734}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 50
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 5
m_MaxSize: 50
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: PRESS START TO START

View File

@ -36,6 +36,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 5561158611004983940} - {fileID: 5561158611004983940}
- {fileID: 8877496746214907228}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -72,12 +73,12 @@ MonoBehaviour:
<movementSpeed>k__BackingField: 0 <movementSpeed>k__BackingField: 0
<rotSpeed>k__BackingField: 0 <rotSpeed>k__BackingField: 0
fov: 0 fov: 0
attackRange: 0 <attackRange>k__BackingField: 0
<attackDmg>k__BackingField: 0 <attackDmg>k__BackingField: 0
attackCooldown: 0 attackCooldown: 0
target: {fileID: 0} target: {fileID: 0}
halo: {fileID: 0}
playerStats: {fileID: 11400000, guid: 12a626b5a296d934ba078d222ad6ba98, type: 2} playerStats: {fileID: 11400000, guid: 12a626b5a296d934ba078d222ad6ba98, type: 2}
healthBar: {fileID: 0}
--- !u!114 &1967503440015794769 --- !u!114 &1967503440015794769
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -108,6 +109,7 @@ MonoBehaviour:
suckDuration: 1 suckDuration: 1
suckRange: 3 suckRange: 3
healthGainFromSuck: 30 healthGainFromSuck: 30
bloodParticles: {fileID: 5815394732050939499}
--- !u!212 &1214567908930553595 --- !u!212 &1214567908930553595
SpriteRenderer: SpriteRenderer:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -467,3 +469,70 @@ SpriteRenderer:
m_WasSpriteAssigned: 1 m_WasSpriteAssigned: 1
m_MaskInteraction: 0 m_MaskInteraction: 0
m_SpriteSortPoint: 0 m_SpriteSortPoint: 0
--- !u!1001 &9176030194975883919
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 1214567908930553594}
m_Modifications:
- target: {fileID: 316653409112989651, guid: 78e4227a7fbb82040b8d8138dad79b1d, type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 316653409112989651, guid: 78e4227a7fbb82040b8d8138dad79b1d, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 316653409112989651, guid: 78e4227a7fbb82040b8d8138dad79b1d, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 316653409112989651, guid: 78e4227a7fbb82040b8d8138dad79b1d, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 316653409112989651, guid: 78e4227a7fbb82040b8d8138dad79b1d, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 316653409112989651, guid: 78e4227a7fbb82040b8d8138dad79b1d, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 316653409112989651, guid: 78e4227a7fbb82040b8d8138dad79b1d, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 316653409112989651, guid: 78e4227a7fbb82040b8d8138dad79b1d, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 316653409112989651, guid: 78e4227a7fbb82040b8d8138dad79b1d, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 316653409112989651, guid: 78e4227a7fbb82040b8d8138dad79b1d, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 316653409112989651, guid: 78e4227a7fbb82040b8d8138dad79b1d, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1168153863115657109, guid: 78e4227a7fbb82040b8d8138dad79b1d, type: 3}
propertyPath: m_Name
value: Blood Suck Particles
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 78e4227a7fbb82040b8d8138dad79b1d, type: 3}
--- !u!4 &8877496746214907228 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 316653409112989651, guid: 78e4227a7fbb82040b8d8138dad79b1d, type: 3}
m_PrefabInstance: {fileID: 9176030194975883919}
m_PrefabAsset: {fileID: 0}
--- !u!198 &5815394732050939499 stripped
ParticleSystem:
m_CorrespondingSourceObject: {fileID: 3450778120571403492, guid: 78e4227a7fbb82040b8d8138dad79b1d, type: 3}
m_PrefabInstance: {fileID: 9176030194975883919}
m_PrefabAsset: {fileID: 0}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 68bb79cf26688ab46a0c4c582d1cb315
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -211,6 +211,10 @@ PrefabInstance:
m_Modification: m_Modification:
m_TransformParent: {fileID: 0} m_TransformParent: {fileID: 0}
m_Modifications: m_Modifications:
- target: {fileID: 1359990806, guid: 581322f036f3ff1448d4d2ec70f295a4, type: 3}
propertyPath: startPrompt
value:
objectReference: {fileID: 1551362088}
- target: {fileID: 4164153230343464235, guid: 581322f036f3ff1448d4d2ec70f295a4, type: 3} - target: {fileID: 4164153230343464235, guid: 581322f036f3ff1448d4d2ec70f295a4, type: 3}
propertyPath: globalCamera propertyPath: globalCamera
value: value:
@ -403,6 +407,16 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 81a29b049c6380f4abb3c18ed121efcd, type: 3} m_Script: {fileID: 11500000, guid: 81a29b049c6380f4abb3c18ed121efcd, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
--- !u!1 &1551362088 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 1844274959428875625, guid: e1dac4f28fe75a547b919b7aa8240fed, type: 3}
m_PrefabInstance: {fileID: 1551362086}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1551362089 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 763564871199756608, guid: e1dac4f28fe75a547b919b7aa8240fed, type: 3}
m_PrefabInstance: {fileID: 1551362086}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1557338110 stripped --- !u!1 &1557338110 stripped
GameObject: GameObject:
m_CorrespondingSourceObject: {fileID: 3328484984159178892, guid: f7f5d2b1228d13f4d9015073aced3e81, type: 3} m_CorrespondingSourceObject: {fileID: 3328484984159178892, guid: f7f5d2b1228d13f4d9015073aced3e81, type: 3}
@ -563,6 +577,10 @@ PrefabInstance:
propertyPath: m_ActionEvents.Array.data[16].m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName propertyPath: m_ActionEvents.Array.data[16].m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName
value: UnityEngine.Object, UnityEngine value: UnityEngine.Object, UnityEngine
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1214567908930553592, guid: 3e0aae8cda56aef44af9598dc5471020, type: 3}
propertyPath: safeZonePrompt
value:
objectReference: {fileID: 1551362089}
- target: {fileID: 1214567908930553592, guid: 3e0aae8cda56aef44af9598dc5471020, type: 3} - target: {fileID: 1214567908930553592, guid: 3e0aae8cda56aef44af9598dc5471020, type: 3}
propertyPath: gameFlowManager propertyPath: gameFlowManager
value: value:

View File

@ -287,6 +287,12 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
<Paused>k__BackingField: 1 <Paused>k__BackingField: 1
startPrompt: {fileID: 1551362088}
--- !u!1 &1408196689 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 763564871199756608, guid: e1dac4f28fe75a547b919b7aa8240fed, type: 3}
m_PrefabInstance: {fileID: 1551362086}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1464970062 stripped --- !u!114 &1464970062 stripped
MonoBehaviour: MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 1878107874314509256, guid: e1dac4f28fe75a547b919b7aa8240fed, type: 3} m_CorrespondingSourceObject: {fileID: 1878107874314509256, guid: e1dac4f28fe75a547b919b7aa8240fed, type: 3}
@ -414,6 +420,11 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 81a29b049c6380f4abb3c18ed121efcd, type: 3} m_Script: {fileID: 11500000, guid: 81a29b049c6380f4abb3c18ed121efcd, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
--- !u!1 &1551362088 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 1844274959428875625, guid: e1dac4f28fe75a547b919b7aa8240fed, type: 3}
m_PrefabInstance: {fileID: 1551362086}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1557338110 stripped --- !u!1 &1557338110 stripped
GameObject: GameObject:
m_CorrespondingSourceObject: {fileID: 3328484984159178892, guid: f7f5d2b1228d13f4d9015073aced3e81, type: 3} m_CorrespondingSourceObject: {fileID: 3328484984159178892, guid: f7f5d2b1228d13f4d9015073aced3e81, type: 3}
@ -574,6 +585,10 @@ PrefabInstance:
propertyPath: m_ActionEvents.Array.data[16].m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName propertyPath: m_ActionEvents.Array.data[16].m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName
value: UnityEngine.Object, UnityEngine value: UnityEngine.Object, UnityEngine
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1214567908930553592, guid: 3e0aae8cda56aef44af9598dc5471020, type: 3}
propertyPath: safeZonePrompt
value:
objectReference: {fileID: 1408196689}
- target: {fileID: 1214567908930553592, guid: 3e0aae8cda56aef44af9598dc5471020, type: 3} - target: {fileID: 1214567908930553592, guid: 3e0aae8cda56aef44af9598dc5471020, type: 3}
propertyPath: gameFlowManager propertyPath: gameFlowManager
value: value:

View File

@ -12,4 +12,4 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 8de175900b604adb984b49af64538a07, type: 3} m_Script: {fileID: 11500000, guid: 8de175900b604adb984b49af64538a07, type: 3}
m_Name: Arena Stats m_Name: Arena Stats
m_EditorClassIdentifier: m_EditorClassIdentifier:
secondsBetweenSpawners: 8 secondsBetweenSpawners: 5

View File

@ -8,6 +8,7 @@ public class BloodSucker : MonoBehaviour {
[SerializeField] float suckDuration = 1f; [SerializeField] float suckDuration = 1f;
[SerializeField] float suckRange = 1f; [SerializeField] float suckRange = 1f;
[SerializeField] float healthGainFromSuck = 30f; [SerializeField] float healthGainFromSuck = 30f;
[SerializeField] ParticleSystem bloodParticles;
Entity currentTarget; Entity currentTarget;
VampireEntity vampireEntity; VampireEntity vampireEntity;
@ -16,6 +17,7 @@ public class BloodSucker : MonoBehaviour {
void Awake() { void Awake() {
vampireEntity = GetComponent<VampireEntity>(); vampireEntity = GetComponent<VampireEntity>();
bloodParticles.Stop(true, ParticleSystemStopBehavior.StopEmitting);
} }
void FixedUpdate() { void FixedUpdate() {
@ -39,11 +41,11 @@ public class BloodSucker : MonoBehaviour {
public void ToggleSuck(InputAction.CallbackContext context) { public void ToggleSuck(InputAction.CallbackContext context) {
if (context.performed) { if (context.performed) {
if (currentTarget != null) { if (currentTarget != null) {
isSucking = true; SetIsSucking(true);
currentSuckTimer = suckDuration; currentSuckTimer = suckDuration;
} }
} else if (context.canceled) { } else if (context.canceled) {
isSucking = false; SetIsSucking(false);
} }
} }
@ -60,7 +62,7 @@ public class BloodSucker : MonoBehaviour {
void SetTarget(Entity newTarget) { void SetTarget(Entity newTarget) {
if(newTarget != currentTarget) { if(newTarget != currentTarget) {
isSucking = false; SetIsSucking(false);
} }
if (currentTarget != null) { if (currentTarget != null) {
UnHighlightTarget(); UnHighlightTarget();
@ -75,6 +77,8 @@ public class BloodSucker : MonoBehaviour {
} }
void PerformSuck(float deltaTime) { void PerformSuck(float deltaTime) {
bloodParticles.gameObject.transform.rotation = Quaternion.FromToRotation(transform.right, currentTarget.transform.position - transform.position);
currentSuckTimer -= deltaTime; currentSuckTimer -= deltaTime;
if (currentSuckTimer < 0f) { if (currentSuckTimer < 0f) {
currentTarget.bloodTokens -= 1; currentTarget.bloodTokens -= 1;
@ -82,7 +86,7 @@ public class BloodSucker : MonoBehaviour {
// print("One token sucked"); // print("One token sucked");
if (currentTarget.bloodTokens == 0) { if (currentTarget.bloodTokens == 0) {
SetTarget(null); SetTarget(null);
isSucking = false; SetIsSucking(false);
// TODO : Dispawn target // TODO : Dispawn target
} else { } else {
currentSuckTimer = suckDuration; currentSuckTimer = suckDuration;
@ -90,6 +94,15 @@ public class BloodSucker : MonoBehaviour {
} }
} }
void SetIsSucking(bool value) {
isSucking = value;
if(isSucking) {
bloodParticles.Play();
} else {
bloodParticles.Stop(true, ParticleSystemStopBehavior.StopEmitting);
}
}
void HighlightTarget() { void HighlightTarget() {
currentTarget.EnableHalo(); currentTarget.EnableHalo();
} }

View File

@ -7,20 +7,30 @@ using UnityEngine.SceneManagement;
public class GameFlowManager : MonoBehaviour { public class GameFlowManager : MonoBehaviour {
[SerializeField] [Required] [SerializeField] [Required]
GameTimer gameTimer = null!; GameTimer gameTimer = null!;
/// <summary> /// <summary>
/// True if time is frozen (Start, Pause Menu, Dead) /// True if time is frozen (Start, Pause Menu, Dead)
/// </summary> /// </summary>
/// <remarks>Could be renamed appropriately</remarks> /// <remarks>Could be renamed appropriately</remarks>
[field: SerializeField] [field: SerializeField]
public bool Paused { get; private set; } = true; public bool Paused { get; private set; } = true;
public BaseState CurrentState { get; private set; } = null!; public BaseState CurrentState { get; private set; } = null!;
bool lastStartButton; bool lastStartButton;
bool lastAcceptButton; bool lastAcceptButton;
[SerializeField] GameObject startPrompt;
#region Unity Messages #region Unity Messages
void Awake() => CurrentState = new StartFlowState(this);
void Awake() {
CurrentState = new StartFlowState(this);
if (startPrompt != null) {
startPrompt.SetActive(true);
}
}
void Start() => CurrentState.EnterState(); void Start() => CurrentState.EnterState();
#endregion #endregion
void SetPause(bool value) { void SetPause(bool value) {
@ -32,14 +42,17 @@ public class GameFlowManager : MonoBehaviour {
public void GameOver() => SwitchState(new DeadFlowState(this)); public void GameOver() => SwitchState(new DeadFlowState(this));
#region Inputs #region Inputs
public void OnStart(InputAction.CallbackContext ctx) { public void OnStart(InputAction.CallbackContext ctx) {
if (!ctx.WasPressedThisFrame(ref lastStartButton)) if (!ctx.WasPressedThisFrame(ref lastStartButton))
return; return;
if (CurrentState is StartFlowState) if (CurrentState is StartFlowState) {
startPrompt.SetActive(false);
SwitchState(new GameplayFlowState(this)); SwitchState(new GameplayFlowState(this));
}
} }
public void OnAccept(InputAction.CallbackContext ctx) { public void OnAccept(InputAction.CallbackContext ctx) {
if (!ctx.WasPressedThisFrame(ref lastAcceptButton)) if (!ctx.WasPressedThisFrame(ref lastAcceptButton))
return; return;
@ -47,18 +60,20 @@ public class GameFlowManager : MonoBehaviour {
if (CurrentState is DeadFlowState deadState) if (CurrentState is DeadFlowState deadState)
deadState.ReloadGame(); deadState.ReloadGame();
} }
#endregion #endregion
#region States #region States
void SwitchState(BaseState newState) { void SwitchState(BaseState newState) {
CurrentState.LeaveState(); CurrentState.LeaveState();
CurrentState = newState; CurrentState = newState;
newState.EnterState(); newState.EnterState();
} }
abstract class GameFlowState : BaseState { abstract class GameFlowState : BaseState {
readonly protected GameFlowManager gameFlowManager; readonly protected GameFlowManager gameFlowManager;
protected GameFlowState(GameFlowManager gameFlowManager) { protected GameFlowState(GameFlowManager gameFlowManager) {
this.gameFlowManager = gameFlowManager; this.gameFlowManager = gameFlowManager;
} }
@ -66,10 +81,10 @@ public class GameFlowManager : MonoBehaviour {
class StartFlowState : GameFlowState { class StartFlowState : GameFlowState {
public StartFlowState(GameFlowManager gameFlowManager) : base(gameFlowManager) {} public StartFlowState(GameFlowManager gameFlowManager) : base(gameFlowManager) {}
public override void EnterState() { public override void EnterState() {
base.EnterState(); base.EnterState();
Debug.Log("Press Start to start...!"); Debug.Log("Press Start to start...!");
gameFlowManager.SetPause(true); gameFlowManager.SetPause(true);
} }
@ -78,36 +93,39 @@ public class GameFlowManager : MonoBehaviour {
Debug.Log("Let the games begin!!"); Debug.Log("Let the games begin!!");
} }
} }
class GameplayFlowState : GameFlowState { class GameplayFlowState : GameFlowState {
public GameplayFlowState(GameFlowManager gameFlowManager) : base(gameFlowManager) {} public GameplayFlowState(GameFlowManager gameFlowManager) : base(gameFlowManager) {}
public override void EnterState() { public override void EnterState() {
base.EnterState(); base.EnterState();
gameFlowManager.gameTimer.StartTimer(); gameFlowManager.gameTimer.StartTimer();
gameFlowManager.SetPause(false); gameFlowManager.SetPause(false);
} }
public override void LeaveState() { public override void LeaveState() {
base.LeaveState(); base.LeaveState();
gameFlowManager.gameTimer.PauseTimer(); gameFlowManager.gameTimer.PauseTimer();
} }
} }
class PauseMenuFlowState : GameFlowState { class PauseMenuFlowState : GameFlowState {
public PauseMenuFlowState(GameFlowManager gameFlowManager) : base(gameFlowManager) {} public PauseMenuFlowState(GameFlowManager gameFlowManager) : base(gameFlowManager) {}
public override void EnterState() { public override void EnterState() {
base.EnterState(); base.EnterState();
gameFlowManager.SetPause(true); gameFlowManager.SetPause(true);
} }
} }
class DeadFlowState : GameFlowState { class DeadFlowState : GameFlowState {
public DeadFlowState(GameFlowManager gameFlowManager) : base(gameFlowManager) {} public DeadFlowState(GameFlowManager gameFlowManager) : base(gameFlowManager) {}
public override void EnterState() { public override void EnterState() {
base.EnterState(); base.EnterState();
Debug.Log("You died!\nPress Accept to restart!"); Debug.Log("You died!\nPress Accept to restart!");
gameFlowManager.SetPause(true); gameFlowManager.SetPause(true);
} }
@ -117,5 +135,6 @@ public class GameFlowManager : MonoBehaviour {
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex); SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
} }
} }
#endregion #endregion
} }

View File

@ -0,0 +1,16 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class MainMenuManager : MonoBehaviour {
public void GoToScene(int sceneNb) {
SceneManager.LoadScene(sceneNb);
}
public void QuitGame() {
Application.Quit(0);
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8560765ad764680488938e0b0912b914
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -14,6 +14,7 @@ public class PlayerMovement : MonoBehaviour {
[field: Required] [field: Required]
Rigidbody2D rb = null!; Rigidbody2D rb = null!;
[SerializeField] GameObject safeZonePrompt;
Vector2 moveDirection; Vector2 moveDirection;
BaseState currentState = null!; BaseState currentState = null!;
@ -28,6 +29,7 @@ public class PlayerMovement : MonoBehaviour {
void Awake() { void Awake() {
rb = GetComponent<Rigidbody2D>(); rb = GetComponent<Rigidbody2D>();
currentState = new ImmobileMovementState(this); currentState = new ImmobileMovementState(this);
safeZonePrompt.SetActive(false);
} }
void Start() { void Start() {
@ -47,6 +49,12 @@ public class PlayerMovement : MonoBehaviour {
if (gameFlowManager.Paused) if (gameFlowManager.Paused)
return; return;
if (safeZone != null && safeZone.IsInSafeZone) {
safeZonePrompt.SetActive(false);
} else {
safeZonePrompt.SetActive(true);
}
if (currentState.FixedUpdateState() is {} newState) if (currentState.FixedUpdateState() is {} newState)
SwitchState(newState); SwitchState(newState);
} }

View File

@ -0,0 +1,30 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Cinemachine;
public class ScreenShaker : MonoBehaviour {
CinemachineVirtualCamera cam;
CinemachineBasicMultiChannelPerlin noise;
void Awake() {
cam = GetComponent<CinemachineVirtualCamera>();
noise = cam.GetCinemachineComponent<CinemachineBasicMultiChannelPerlin>();
}
public void Shake(float magnitude = 1f, float duration = 0.2f) {
StartCoroutine(ShakeCoroutine(magnitude, duration));
}
IEnumerator ShakeCoroutine(float magnitude, float duration) {
noise.m_AmplitudeGain = magnitude;
noise.m_FrequencyGain = 10f;
yield return new WaitForSeconds(duration);
noise.m_AmplitudeGain = 0f;
noise.m_FrequencyGain = 1f;
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 69316e5653a69e04a97ae92bd78b1430
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -5,6 +5,9 @@ EditorBuildSettings:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
serializedVersion: 2 serializedVersion: 2
m_Scenes: m_Scenes:
- enabled: 1
path: Assets/Scenes/Main Menu.unity
guid: 68bb79cf26688ab46a0c4c582d1cb315
- enabled: 1 - enabled: 1
path: Assets/Scenes/SampleScene.unity path: Assets/Scenes/SampleScene.unity
guid: 2cda990e2423bbf4892e6590ba056729 guid: 2cda990e2423bbf4892e6590ba056729