Compare commits

..

No commits in common. '9f770d399aa21f1b3a45df5f59b1da5a45f8b413' and '43a50d5374df361cf9356bc43c3d53dbd3b5b1fb' have entirely different histories.

  1. 2
      Assets/Materials/Ball.mat
  2. 47
      Assets/Materials/NewBall.mat
  3. 8
      Assets/Materials/NewBall.mat.meta
  4. 8
      Assets/Prefabs/Collectables.meta
  5. 220
      Assets/Prefabs/Collectables/NewBall.prefab
  6. 7
      Assets/Prefabs/Collectables/NewBall.prefab.meta
  7. 0
      Assets/Prefabs/Modifications.meta
  8. 0
      Assets/Prefabs/Modifications/BorderBuff.asset
  9. 0
      Assets/Prefabs/Modifications/BorderBuff.asset.meta
  10. 0
      Assets/Prefabs/Modifications/BorderNerf.asset
  11. 0
      Assets/Prefabs/Modifications/BorderNerf.asset.meta
  12. 20
      Assets/Prefabs/Modifications/Modification.prefab
  13. 0
      Assets/Prefabs/Modifications/Modification.prefab.meta
  14. 0
      Assets/Prefabs/Modifications/SpeedBuff.asset
  15. 0
      Assets/Prefabs/Modifications/SpeedBuff.asset.meta
  16. 0
      Assets/Prefabs/Modifications/SpeedNerf.asset
  17. 0
      Assets/Prefabs/Modifications/SpeedNerf.asset.meta
  18. 0
      Assets/Prefabs/Modifications/WidthBuff.asset
  19. 0
      Assets/Prefabs/Modifications/WidthBuff.asset.meta
  20. 0
      Assets/Prefabs/Modifications/WidthNerf.asset
  21. 0
      Assets/Prefabs/Modifications/WidthNerf.asset.meta
  22. 2
      Assets/Prefabs/Player.prefab
  23. 17
      Assets/Scenes/Game.unity
  24. 10
      Assets/Scripts/Game/Collectable.cs
  25. 12
      Assets/Scripts/Game/GameManager.cs
  26. 8
      Assets/Scripts/Game/Modification.cs
  27. 37
      Assets/Scripts/Game/NewBall.cs
  28. 3
      Assets/Scripts/Game/NewBall.cs.meta
  29. 3
      Assets/Scripts/Game/Wormhole.cs
  30. 8
      ProjectSettings/ProjectSettings.asset
  31. 2
      ProjectSettings/QualitySettings.asset
  32. 1
      README.md

@ -41,7 +41,7 @@ Material:
- PixelSnap: 0 - PixelSnap: 0
- _EnableExternalAlpha: 0 - _EnableExternalAlpha: 0
m_Colors: m_Colors:
- _Color: {r: 2, g: 2, b: 2, a: 1} - _Color: {r: 0.740121, g: 1.9565982, b: 2.037736, a: 1}
- _Flip: {r: 1, g: 1, b: 1, a: 1} - _Flip: {r: 1, g: 1, b: 1, a: 1}
- _RendererColor: {r: 1, g: 1, b: 1, a: 1} - _RendererColor: {r: 1, g: 1, b: 1, a: 1}
m_BuildTextureStacks: [] m_BuildTextureStacks: []

@ -1,47 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: NewBall
m_Shader: {fileID: 4800000, guid: da25e23f4bce4102a45b0743b67525c4, type: 3}
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _AlphaTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MaskTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- PixelSnap: 0
- _EnableExternalAlpha: 0
m_Colors:
- _Color: {r: 1.319508, g: 1.319508, b: 1.319508, a: 1}
- _Flip: {r: 1, g: 1, b: 1, a: 1}
- _RendererColor: {r: 1, g: 1, b: 1, a: 1}
m_BuildTextureStacks: []

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: efe64386af2c943be9fe140cdb79ee9b
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 9cd45d27f29b4e4e68b1d12a2bd112f5
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -1,220 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &2068902108434861102
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3019560421038336810}
- component: {fileID: 4286311027153464049}
m_Layer: 7
m_Name: MainColor
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3019560421038336810
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2068902108434861102}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.9, y: 0.9, z: 0.9}
m_ConstrainProportionsScale: 1
m_Children: []
m_Father: {fileID: 5863603256186968683}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &4286311027153464049
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2068902108434861102}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: efe64386af2c943be9fe140cdb79ee9b, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 1
m_Sprite: {fileID: 21300000, guid: 47e353a78c92b9838963e533e37462e5, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1, y: 1}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!1 &5863603256186968685
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5863603256186968683}
- component: {fileID: 5863603256186968682}
- component: {fileID: 5863603256186968680}
- component: {fileID: 5863603256186968662}
- component: {fileID: 5863603256186968681}
m_Layer: 7
m_Name: NewBall
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &5863603256186968683
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5863603256186968685}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.75, y: 0.75, z: 0.75}
m_ConstrainProportionsScale: 1
m_Children:
- {fileID: 3019560421038336810}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &5863603256186968682
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5863603256186968685}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: efe64386af2c943be9fe140cdb79ee9b, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 47e353a78c92b9838963e533e37462e5, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1, y: 1}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!58 &5863603256186968680
CircleCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5863603256186968685}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 1
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: 0}
serializedVersion: 2
m_Radius: 0.5
--- !u!114 &5863603256186968662
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5863603256186968685}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c1f92e3c448648a3977db1730f02b11d, type: 3}
m_Name:
m_EditorClassIdentifier:
permanentDuration: 5
temporaryDuration: 10
--- !u!114 &5863603256186968681
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5863603256186968685}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
m_Name:
m_EditorClassIdentifier:
GlobalObjectIdHash: 951099334
AlwaysReplicateAsRoot: 0
DontDestroyWithOwner: 0
AutoObjectParentSync: 1

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

@ -11,7 +11,7 @@ GameObject:
- component: {fileID: 7947935438987891323} - component: {fileID: 7947935438987891323}
- component: {fileID: 7947935438987891317} - component: {fileID: 7947935438987891317}
- component: {fileID: 7947935438987891316} - component: {fileID: 7947935438987891316}
- component: {fileID: 2362697393472433045} - component: {fileID: 5272754659973803181}
m_Layer: 7 m_Layer: 7
m_Name: Modification m_Name: Modification
m_TagString: Untagged m_TagString: Untagged
@ -29,7 +29,7 @@ Transform:
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: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 1 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 0 m_RootOrder: 0
@ -62,8 +62,8 @@ MonoBehaviour:
AlwaysReplicateAsRoot: 0 AlwaysReplicateAsRoot: 0
DontDestroyWithOwner: 0 DontDestroyWithOwner: 0
AutoObjectParentSync: 1 AutoObjectParentSync: 1
--- !u!58 &2362697393472433045 --- !u!61 &5272754659973803181
CircleCollider2D: BoxCollider2D:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
@ -76,5 +76,15 @@ CircleCollider2D:
m_UsedByEffector: 0 m_UsedByEffector: 0
m_UsedByComposite: 0 m_UsedByComposite: 0
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0.5, y: 0.5}
oldSize: {x: 2, y: 2}
newSize: {x: 2, y: 2}
adaptiveTilingThreshold: 0.5
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2 serializedVersion: 2
m_Radius: 1 m_Size: {x: 2, y: 2}
m_EdgeRadius: 0

@ -72,7 +72,7 @@ SpriteRenderer:
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0 m_SortingLayerID: 0
m_SortingLayer: 0 m_SortingLayer: 0
m_SortingOrder: 1 m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 47e353a78c92b9838963e533e37462e5, type: 3} m_Sprite: {fileID: 21300000, guid: 47e353a78c92b9838963e533e37462e5, type: 3}
m_Color: {r: 0.13207549, g: 0.13207549, b: 0.13207549, a: 1} m_Color: {r: 0.13207549, g: 0.13207549, b: 0.13207549, a: 1}
m_FlipX: 0 m_FlipX: 0

@ -590,7 +590,7 @@ SpriteRenderer:
m_FlipX: 0 m_FlipX: 0
m_FlipY: 0 m_FlipY: 0
m_DrawMode: 2 m_DrawMode: 2
m_Size: {x: 20.487806, y: 35} m_Size: {x: 34.728683, y: 35}
m_AdaptiveModeThreshold: 0.5 m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0 m_SpriteTileMode: 0
m_WasSpriteAssigned: 1 m_WasSpriteAssigned: 1
@ -853,7 +853,7 @@ Camera:
far clip plane: 1000 far clip plane: 1000
field of view: 60 field of view: 60
orthographic: 1 orthographic: 1
orthographic size: 21.056911 orthographic size: 23.152454
m_Depth: 0 m_Depth: 0
m_CullingMask: m_CullingMask:
serializedVersion: 2 serializedVersion: 2
@ -926,11 +926,11 @@ PrefabInstance:
m_Modifications: m_Modifications:
- target: {fileID: 4540566536649322900, guid: b4033513367475439bfcd048b5d376a6, type: 3} - target: {fileID: 4540566536649322900, guid: b4033513367475439bfcd048b5d376a6, type: 3}
propertyPath: m_Size.x propertyPath: m_Size.x
value: 20.487806 value: 34.728683
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4540566536649322900, guid: b4033513367475439bfcd048b5d376a6, type: 3} - target: {fileID: 4540566536649322900, guid: b4033513367475439bfcd048b5d376a6, type: 3}
propertyPath: m_Size.y propertyPath: m_Size.y
value: 3.5569115 value: 5.6524544
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4540566536649322901, guid: b4033513367475439bfcd048b5d376a6, type: 3} - target: {fileID: 4540566536649322901, guid: b4033513367475439bfcd048b5d376a6, type: 3}
propertyPath: m_Name propertyPath: m_Name
@ -946,7 +946,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4540566536649322903, guid: b4033513367475439bfcd048b5d376a6, type: 3} - target: {fileID: 4540566536649322903, guid: b4033513367475439bfcd048b5d376a6, type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: -19.278456 value: -20.326227
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4540566536649322903, guid: b4033513367475439bfcd048b5d376a6, type: 3} - target: {fileID: 4540566536649322903, guid: b4033513367475439bfcd048b5d376a6, type: 3}
propertyPath: m_LocalPosition.z propertyPath: m_LocalPosition.z
@ -1028,7 +1028,6 @@ MonoBehaviour:
- {fileID: 11400000, guid: 3237b9257f669690ea1a6f828451509e, type: 2} - {fileID: 11400000, guid: 3237b9257f669690ea1a6f828451509e, type: 2}
- {fileID: 11400000, guid: c6de04aab82eeff81894387c19ac1310, type: 2} - {fileID: 11400000, guid: c6de04aab82eeff81894387c19ac1310, type: 2}
wormholePrefab: {fileID: 7486271855853268360, guid: bf48a6813e1f5a2f7a63fc5c413808cb, type: 3} wormholePrefab: {fileID: 7486271855853268360, guid: bf48a6813e1f5a2f7a63fc5c413808cb, type: 3}
newBallPrefab: {fileID: 5863603256186968685, guid: 0b8e2f55b0355b500bb1a8ab627c8833, type: 3}
--- !u!4 &2109945868 --- !u!4 &2109945868
Transform: Transform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1069,11 +1068,11 @@ PrefabInstance:
m_Modifications: m_Modifications:
- target: {fileID: 4540566536649322900, guid: b4033513367475439bfcd048b5d376a6, type: 3} - target: {fileID: 4540566536649322900, guid: b4033513367475439bfcd048b5d376a6, type: 3}
propertyPath: m_Size.x propertyPath: m_Size.x
value: 20.487806 value: 34.728683
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4540566536649322900, guid: b4033513367475439bfcd048b5d376a6, type: 3} - target: {fileID: 4540566536649322900, guid: b4033513367475439bfcd048b5d376a6, type: 3}
propertyPath: m_Size.y propertyPath: m_Size.y
value: 3.5569115 value: 5.6524544
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4540566536649322901, guid: b4033513367475439bfcd048b5d376a6, type: 3} - target: {fileID: 4540566536649322901, guid: b4033513367475439bfcd048b5d376a6, type: 3}
propertyPath: m_Name propertyPath: m_Name
@ -1089,7 +1088,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4540566536649322903, guid: b4033513367475439bfcd048b5d376a6, type: 3} - target: {fileID: 4540566536649322903, guid: b4033513367475439bfcd048b5d376a6, type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: 19.278456 value: 20.326227
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4540566536649322903, guid: b4033513367475439bfcd048b5d376a6, type: 3} - target: {fileID: 4540566536649322903, guid: b4033513367475439bfcd048b5d376a6, type: 3}
propertyPath: m_LocalPosition.z propertyPath: m_LocalPosition.z

@ -1,10 +1,8 @@
using System.Collections;
using Unity.Netcode; using Unity.Netcode;
using UnityEngine; using UnityEngine;
namespace Game { namespace Game {
public abstract class Collectable : NetworkBehaviour { public abstract class Collectable : NetworkBehaviour {
private void OnTriggerEnter2D(Collider2D other) { private void OnTriggerEnter2D(Collider2D other) {
var player = other.GetComponent<Ball>().LastContactPlayer; var player = other.GetComponent<Ball>().LastContactPlayer;
if (player != null) { if (player != null) {
@ -13,14 +11,6 @@ namespace Game {
} }
} }
private IEnumerator Start() {
Setup();
yield return new WaitForSeconds(Duration());
Destroy(gameObject);
}
protected abstract void Setup();
protected abstract float Duration();
protected abstract void OnCollect(Player collector); protected abstract void OnCollect(Player collector);
} }
} }

@ -15,7 +15,6 @@ namespace Game {
public Object modificationPrefab; public Object modificationPrefab;
public ModificationProperties[] modifications; public ModificationProperties[] modifications;
public Object wormholePrefab; public Object wormholePrefab;
public Object newBallPrefab;
public static GameManager Singleton { get; private set; } public static GameManager Singleton { get; private set; }
@ -44,14 +43,12 @@ namespace Game {
SpawnModification(); SpawnModification();
yield return new WaitForSeconds(2); yield return new WaitForSeconds(2);
SpawnWormhole(); SpawnWormhole();
yield return new WaitForSeconds(1);
SpawnNewBall();
} }
} }
private void SetupPlayers() { private void SetupPlayers() {
Settings.Type = Type.AI; Settings.Type = Type.Hybrid;
Settings.AIDifficulty = Difficulty.VeryHard; Settings.AIDifficulty = Difficulty.Hard;
var p1Obj = Instantiate(playerPrefab); var p1Obj = Instantiate(playerPrefab);
var p2Obj = Instantiate(playerPrefab); var p2Obj = Instantiate(playerPrefab);
@ -92,11 +89,6 @@ namespace Game {
Player2 = p2; Player2 = p2;
} }
private void SpawnNewBall() {
var pos = new Vector2(Random.Range(0, Dimensions.Singleton.PlaySize.x) - Dimensions.Singleton.PlaySize.x / 2, Random.Range(-5, 5));
Instantiate(newBallPrefab, pos, Quaternion.identity).GetComponent<NewBall>().IsPermanent = Random.value > 0.8f;
}
private void SpawnWormhole() { private void SpawnWormhole() {
var pos = new Vector2(Random.Range(0, Dimensions.Singleton.PlaySize.x) - Dimensions.Singleton.PlaySize.x / 2, Random.Range(-5, 5)); var pos = new Vector2(Random.Range(0, Dimensions.Singleton.PlaySize.x) - Dimensions.Singleton.PlaySize.x / 2, Random.Range(-5, 5));
Instantiate(wormholePrefab, pos, Quaternion.identity); Instantiate(wormholePrefab, pos, Quaternion.identity);

@ -7,16 +7,14 @@ namespace Game {
public ModificationProperties Properties { get; set; } public ModificationProperties Properties { get; set; }
protected override void Setup() { private IEnumerator Start() {
gameObject.AddComponent<SpriteRenderer>().sprite = Properties.image; gameObject.AddComponent<SpriteRenderer>().sprite = Properties.image;
yield return new WaitForSeconds(Properties.pickupDuration);
Destroy(gameObject);
} }
protected override void OnCollect(Player collector) { protected override void OnCollect(Player collector) {
collector.StartCoroutine(collector.ProcessModification(Properties)); collector.StartCoroutine(collector.ProcessModification(Properties));
} }
protected override float Duration() {
return Properties.pickupDuration;
}
} }
} }

@ -1,37 +0,0 @@
using UnityEngine;
namespace Game {
public class NewBall : Collectable {
public float permanentDuration;
public float temporaryDuration;
private bool isPermanent;
public bool IsPermanent {
private get => isPermanent;
set {
isPermanent = value;
const float intensity = 1f;
float factor = Mathf.Pow(2, intensity);
float r = value ? 1 : 0;
float g = 1;
float b = value ? 0 : 1;
Color borderColor = new Vector4(r, g, b, 1) * factor;
GetComponent<SpriteRenderer>().material.color = borderColor;
}
}
protected override void Setup() {
}
protected override float Duration() {
return IsPermanent ? permanentDuration : temporaryDuration;
}
protected override void OnCollect(Player player) {
GameManager.Singleton.SpawnBall(player, isPermanent);
}
}
}

@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: c1f92e3c448648a3977db1730f02b11d
timeCreated: 1681653966

@ -11,7 +11,7 @@ namespace Game {
private const float MaxSize = 10; private const float MaxSize = 10;
private float size; private float size;
private float Size { public float Size {
get => size; get => size;
set { set {
size = value; size = value;
@ -54,7 +54,6 @@ namespace Game {
yield return Grow(duration * 0.2f); yield return Grow(duration * 0.2f);
yield return new WaitForSeconds(duration * 0.7f); yield return new WaitForSeconds(duration * 0.7f);
yield return Shrink(duration * 0.1f); yield return Shrink(duration * 0.1f);
Destroy(gameObject);
} }
private void FixedUpdate() { private void FixedUpdate() {

@ -165,8 +165,8 @@ PlayerSettings:
iPhone: 0 iPhone: 0
tvOS: 0 tvOS: 0
overrideDefaultApplicationIdentifier: 0 overrideDefaultApplicationIdentifier: 0
AndroidBundleVersionCode: 8 AndroidBundleVersionCode: 5
AndroidMinSdkVersion: 24 AndroidMinSdkVersion: 22
AndroidTargetSdkVersion: 33 AndroidTargetSdkVersion: 33
AndroidPreferredInstallLocation: 1 AndroidPreferredInstallLocation: 1
aotOptions: aotOptions:
@ -409,7 +409,7 @@ PlayerSettings:
m_DefaultShaderChunkCount: 0 m_DefaultShaderChunkCount: 0
openGLRequireES31: 0 openGLRequireES31: 0
openGLRequireES31AEP: 0 openGLRequireES31AEP: 0
openGLRequireES32: 1 openGLRequireES32: 0
m_TemplateCustomTags: {} m_TemplateCustomTags: {}
mobileMTRendering: mobileMTRendering:
Android: 1 Android: 1
@ -676,7 +676,7 @@ PlayerSettings:
scriptingBackend: scriptingBackend:
Android: 1 Android: 1
il2cppCompilerConfiguration: il2cppCompilerConfiguration:
Android: 1 Android: 2
managedStrippingLevel: managedStrippingLevel:
Android: 3 Android: 3
incrementalIl2cppBuild: {} incrementalIl2cppBuild: {}

@ -201,7 +201,7 @@ QualitySettings:
skinWeights: 255 skinWeights: 255
textureQuality: 0 textureQuality: 0
anisotropicTextures: 1 anisotropicTextures: 1
antiAliasing: 0 antiAliasing: 4
softParticles: 1 softParticles: 1
softVegetation: 1 softVegetation: 1
realtimeReflectionProbes: 1 realtimeReflectionProbes: 1

@ -4,6 +4,7 @@
- Score number rotation - Score number rotation
- Collectables: - Collectables:
- NewBall - NewBall
- Wormhole
- Border visuals - Border visuals
### Menu ### Menu

Loading…
Cancel
Save