feat: fish move around, player pan camera around
This commit is contained in:
570
Assets/FishBase.prefab
generated
Normal file
570
Assets/FishBase.prefab
generated
Normal file
@@ -0,0 +1,570 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1297295590920251679
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1961925822973103683}
|
||||
- component: {fileID: 4374195185839367744}
|
||||
m_Layer: 0
|
||||
m_Name: Circle (1)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1961925822973103683
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1297295590920251679}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0.172, y: -0.714, z: 1}
|
||||
m_LocalScale: {x: 0.05, y: 0.05, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1120781196768809370}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &4374195185839367744
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1297295590920251679}
|
||||
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: 10754, guid: 0000000000000000f000000000000000, type: 0}
|
||||
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: 2
|
||||
m_Sprite: {fileID: -2413806693520163455, guid: a86470a33a6bf42c4b3595704624658b, 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 &2892864556961381447
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 885421558566952579}
|
||||
- component: {fileID: 7376179583641685704}
|
||||
m_Layer: 0
|
||||
m_Name: Circle
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &885421558566952579
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2892864556961381447}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0.172, y: -0.637, z: 1}
|
||||
m_LocalScale: {x: 0.25, y: 0.25, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1120781196768809370}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &7376179583641685704
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2892864556961381447}
|
||||
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: 10754, guid: 0000000000000000f000000000000000, type: 0}
|
||||
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: 2
|
||||
m_Sprite: {fileID: -2413806693520163455, guid: a86470a33a6bf42c4b3595704624658b, type: 3}
|
||||
m_Color: {r: 0, g: 0, b: 0, 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 &3223469577756298920
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1120781196768809370}
|
||||
- component: {fileID: 4369537276804049458}
|
||||
m_Layer: 0
|
||||
m_Name: Capsule
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1120781196768809370
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3223469577756298920}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0.7071068, w: 0.7071068}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 1}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 885421558566952579}
|
||||
- {fileID: 1961925822973103683}
|
||||
- {fileID: 5343832725915268017}
|
||||
- {fileID: 5876069810796564625}
|
||||
m_Father: {fileID: 8949514729097688079}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90}
|
||||
--- !u!212 &4369537276804049458
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3223469577756298920}
|
||||
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: 10754, guid: 0000000000000000f000000000000000, type: 0}
|
||||
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: -9095717837082945937, guid: 207ee8102dd4143d288186ef0be518ee, type: 3}
|
||||
m_Color: {r: 1, g: 0.8514392, b: 0, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 1, y: 2}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!1 &5918277834941419885
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5343832725915268017}
|
||||
- component: {fileID: 8838206893883122519}
|
||||
m_Layer: 0
|
||||
m_Name: Triangle
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &5343832725915268017
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5918277834941419885}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0.7071068, w: 0.7071068}
|
||||
m_LocalPosition: {x: -0.1076, y: 0.1558, z: 1}
|
||||
m_LocalScale: {x: 0.4334215, y: 0.4461268, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1120781196768809370}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90}
|
||||
--- !u!212 &8838206893883122519
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5918277834941419885}
|
||||
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: 10754, guid: 0000000000000000f000000000000000, type: 0}
|
||||
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: 2
|
||||
m_Sprite: {fileID: 7482667652216324306, guid: 75f5f34dc1b5347e0b8351032682f224, type: 3}
|
||||
m_Color: {r: 0.9, g: 0.7658823, b: 0, 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 &7885664091604312409
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8949514729097688079}
|
||||
- component: {fileID: 5499800716888506251}
|
||||
- component: {fileID: -3171060482806259593}
|
||||
- component: {fileID: 5824702058179518384}
|
||||
- component: {fileID: 5282659697223236534}
|
||||
- component: {fileID: 8229896558137267185}
|
||||
m_Layer: 0
|
||||
m_Name: FishBase
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &8949514729097688079
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7885664091604312409}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 1}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1120781196768809370}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &5499800716888506251
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7885664091604312409}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 770055c3e56f3b64bb4a1a051c1a10cb, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
name:
|
||||
age: 0
|
||||
health: 0
|
||||
--- !u!114 &-3171060482806259593
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7885664091604312409}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f151494948adc0646b33ca582caa7fa7, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_minTimeBetweenRandomMovements: 5
|
||||
_maxTimeBetweenRandomMovements: 15
|
||||
_chanceToPerformRandomMovement: 0.8
|
||||
_chanceToStareAtEdge: 0.75
|
||||
_maxStareAtEdgeTime: 5
|
||||
--- !u!70 &5824702058179518384
|
||||
CapsuleCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7885664091604312409}
|
||||
m_Enabled: 1
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 64
|
||||
m_LayerOverridePriority: 0
|
||||
m_ForceSendLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ForceReceiveLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ContactCaptureLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_CallbackLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_IsTrigger: 0
|
||||
m_UsedByEffector: 0
|
||||
m_UsedByComposite: 0
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Size: {x: 2, y: 1}
|
||||
m_Direction: 1
|
||||
--- !u!50 &5282659697223236534
|
||||
Rigidbody2D:
|
||||
serializedVersion: 4
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7885664091604312409}
|
||||
m_BodyType: 1
|
||||
m_Simulated: 1
|
||||
m_UseFullKinematicContacts: 0
|
||||
m_UseAutoMass: 0
|
||||
m_Mass: 1
|
||||
m_LinearDrag: 0
|
||||
m_AngularDrag: 0.05
|
||||
m_GravityScale: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_Interpolate: 0
|
||||
m_SleepingMode: 1
|
||||
m_CollisionDetection: 0
|
||||
m_Constraints: 0
|
||||
--- !u!114 &8229896558137267185
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7885664091604312409}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: ad9777bfdaaf62a42a06f497dfffd382, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_fishMovement: {fileID: -3171060482806259593}
|
||||
--- !u!1 &8634133774689428594
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5876069810796564625}
|
||||
- component: {fileID: 5803989808784614637}
|
||||
m_Layer: 0
|
||||
m_Name: Square
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &5876069810796564625
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8634133774689428594}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -0.121, y: -0.818, z: 1}
|
||||
m_LocalScale: {x: 0.0578, y: 0.2679, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1120781196768809370}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &5803989808784614637
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8634133774689428594}
|
||||
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: 10754, guid: 0000000000000000f000000000000000, type: 0}
|
||||
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: 2
|
||||
m_Sprite: {fileID: 7482667652216324306, guid: 311925a002f4447b3a28927169b83ea6, type: 3}
|
||||
m_Color: {r: 0, g: 0, b: 0, 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
|
7
Assets/FishBase.prefab.meta
generated
Normal file
7
Assets/FishBase.prefab.meta
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 261c8fbc7f1393a47814c947490030a9
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/FishTank.meta
generated
Normal file
8
Assets/FishTank.meta
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fd6b0caf93cad35439787ed2a575e7d0
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
31
Assets/FishTank/CameraInputHandler.cs
Normal file
31
Assets/FishTank/CameraInputHandler.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace Assets.FishTank
|
||||
{
|
||||
public class CameraInputHandler : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private PlayerCameraHandler _playerCameraHandler;
|
||||
|
||||
private bool _panEnabled;
|
||||
public void EnablePan(InputAction.CallbackContext context)
|
||||
{
|
||||
_panEnabled = context.phase switch
|
||||
{
|
||||
InputActionPhase.Performed => true,
|
||||
_ => false,
|
||||
};
|
||||
}
|
||||
|
||||
public void OnPan(InputAction.CallbackContext context)
|
||||
{
|
||||
if (context.phase != InputActionPhase.Performed) return;
|
||||
if (!_panEnabled) return;
|
||||
|
||||
var input = context.ReadValue<Vector2>();
|
||||
_playerCameraHandler.Pan(input * Time.deltaTime);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
11
Assets/FishTank/CameraInputHandler.cs.meta
generated
Normal file
11
Assets/FishTank/CameraInputHandler.cs.meta
generated
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0e740da002774634ebc005019cc4cbb8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/FishTank/Fish.meta
generated
Normal file
8
Assets/FishTank/Fish.meta
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 61cd9f7ea312f9e4ba2be7bf6994455f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
11
Assets/FishTank/Fish/Fish.cs
Normal file
11
Assets/FishTank/Fish/Fish.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Assets.FishTank.Fish
|
||||
{
|
||||
public class Fish : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private new string name;
|
||||
[SerializeField] private int age;
|
||||
[SerializeField] private float health;
|
||||
}
|
||||
}
|
11
Assets/FishTank/Fish/Fish.cs.meta
generated
Normal file
11
Assets/FishTank/Fish/Fish.cs.meta
generated
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 770055c3e56f3b64bb4a1a051c1a10cb
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
18
Assets/FishTank/Fish/FishFacingDirection.cs
Normal file
18
Assets/FishTank/Fish/FishFacingDirection.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Assets.FishTank.Fish
|
||||
{
|
||||
public class FishFacingDirection : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private FishMovement _fishMovement;
|
||||
|
||||
private void Update()
|
||||
{
|
||||
var movementDirection = _fishMovement.MovementDirection;
|
||||
var localScale = transform.localScale;
|
||||
localScale.x = movementDirection.x > 0 ? Mathf.Abs(localScale.x) : -Mathf.Abs(localScale.x);
|
||||
transform.localScale = localScale;
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/FishTank/Fish/FishFacingDirection.cs.meta
generated
Normal file
11
Assets/FishTank/Fish/FishFacingDirection.cs.meta
generated
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ad9777bfdaaf62a42a06f497dfffd382
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
88
Assets/FishTank/Fish/FishMovement.cs
Normal file
88
Assets/FishTank/Fish/FishMovement.cs
Normal file
@@ -0,0 +1,88 @@
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Assets.FishTank.Fish
|
||||
{
|
||||
public class FishMovement : MonoBehaviour
|
||||
{
|
||||
private class MovementSpeed
|
||||
{
|
||||
public static readonly float Float = 0.1f;
|
||||
public static readonly float Creep = 0.5f;
|
||||
public static readonly float Swim = 1.0f;
|
||||
public static readonly float Dart = 2.0f;
|
||||
}
|
||||
|
||||
[SerializeField, Min(0)] private int _minTimeBetweenRandomMovements;
|
||||
[SerializeField, Min(0)] private int _maxTimeBetweenRandomMovements;
|
||||
[SerializeField, Range(0, 1)] private float _chanceToPerformRandomMovement;
|
||||
[SerializeField, Range(0, 1)] private float _chanceToStareAtEdge;
|
||||
[SerializeField, Range(0, 10)] private float _maxStareAtEdgeTime;
|
||||
|
||||
private Vector2 _movementDirection;
|
||||
private float _movementSpeed;
|
||||
private float _timeSinceLastRandomMovement;
|
||||
|
||||
public Vector2 MovementDirection => _movementDirection;
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
_movementDirection = RandomMovementDirection();
|
||||
_movementSpeed = RandomMovementSpeed();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
_timeSinceLastRandomMovement += Time.deltaTime;
|
||||
transform.position += (Vector3)_movementDirection * _movementSpeed * Time.deltaTime;
|
||||
}
|
||||
|
||||
private void OnTriggerExit2D(Collider2D collision)
|
||||
{
|
||||
if (collision == null) return;
|
||||
_movementSpeed = 0.0f;
|
||||
StartCoroutine(StareAtEdge());
|
||||
|
||||
}
|
||||
|
||||
private IEnumerator StareAtEdge()
|
||||
{
|
||||
if (Random.value < _chanceToStareAtEdge)
|
||||
{
|
||||
yield return new WaitForSeconds(_maxStareAtEdgeTime * Random.value);
|
||||
}
|
||||
|
||||
_movementDirection = -_movementDirection;
|
||||
_movementSpeed = RandomMovementSpeed();
|
||||
_timeSinceLastRandomMovement = 0;
|
||||
}
|
||||
|
||||
private void OnTriggerStay2D(Collider2D collision)
|
||||
{
|
||||
|
||||
if (_timeSinceLastRandomMovement < _minTimeBetweenRandomMovements) return;
|
||||
if (_timeSinceLastRandomMovement >= _maxTimeBetweenRandomMovements && Random.value >= _chanceToPerformRandomMovement) return;
|
||||
|
||||
_movementDirection = RandomMovementDirection();
|
||||
_movementSpeed = RandomMovementSpeed();
|
||||
_timeSinceLastRandomMovement = 0;
|
||||
}
|
||||
|
||||
private Vector2 RandomMovementDirection()
|
||||
{
|
||||
return Random.insideUnitCircle.normalized;
|
||||
}
|
||||
|
||||
private float RandomMovementSpeed()
|
||||
{
|
||||
return Random.value switch
|
||||
{
|
||||
< 0.25f => MovementSpeed.Float,
|
||||
< 0.5f => MovementSpeed.Creep,
|
||||
< 0.75f => MovementSpeed.Swim,
|
||||
< 1.0f => MovementSpeed.Dart,
|
||||
_ => 0,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/FishTank/Fish/FishMovement.cs.meta
generated
Normal file
11
Assets/FishTank/Fish/FishMovement.cs.meta
generated
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f151494948adc0646b33ca582caa7fa7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
32
Assets/FishTank/PlayerCameraHandler.cs
Normal file
32
Assets/FishTank/PlayerCameraHandler.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace Assets.FishTank
|
||||
{
|
||||
public class PlayerCameraHandler : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Camera _camera;
|
||||
[SerializeField] private Bounds _bounds; // TODO (Michael): add way for bounds to be constrained to tank size
|
||||
[SerializeField] [Range(0, 10)] private float _panSensitivity;
|
||||
|
||||
public void Pan(Vector2 panAmount)
|
||||
{
|
||||
var cameraPosition = _camera.transform.position;
|
||||
cameraPosition += (Vector3) panAmount * _panSensitivity;
|
||||
|
||||
if (!_bounds.Contains(cameraPosition))
|
||||
{
|
||||
cameraPosition = _bounds.ClosestPoint(cameraPosition);
|
||||
}
|
||||
|
||||
_camera.transform.position = cameraPosition;
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
Cursor.lockState = CursorLockMode.Locked;
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/FishTank/PlayerCameraHandler.cs.meta
generated
Normal file
11
Assets/FishTank/PlayerCameraHandler.cs.meta
generated
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a5318e05982c2d94d9da3003b5a8bbcf
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
11
Assets/FishTank/PlayerInventory.cs
Normal file
11
Assets/FishTank/PlayerInventory.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Assets.FishTank
|
||||
{
|
||||
public class PlayerInventory : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private int _fishEggs;
|
||||
|
||||
}
|
||||
}
|
11
Assets/FishTank/PlayerInventory.cs.meta
generated
Normal file
11
Assets/FishTank/PlayerInventory.cs.meta
generated
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: eeb1c042e41dc8f41b950e78ec46be61
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
13
Assets/FishTank/Tank.cs
Normal file
13
Assets/FishTank/Tank.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Assets.FishTank
|
||||
{
|
||||
public class Tank : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Bounds _bounds;
|
||||
|
||||
private List<Fish.Fish> _fish;
|
||||
}
|
||||
}
|
11
Assets/FishTank/Tank.cs.meta
generated
Normal file
11
Assets/FishTank/Tank.cs.meta
generated
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7a3c8a19dc10d594594bbead377df5c1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
54
Assets/PlayerActions.inputactions
Normal file
54
Assets/PlayerActions.inputactions
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"name": "PlayerActions",
|
||||
"maps": [
|
||||
{
|
||||
"name": "Idle",
|
||||
"id": "6888044f-0d6b-4208-9f84-523aeaef969c",
|
||||
"actions": [
|
||||
{
|
||||
"name": "PanCamera",
|
||||
"type": "PassThrough",
|
||||
"id": "9e2de649-d112-4339-b90e-985cefedb6f1",
|
||||
"expectedControlType": "Vector2",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "EnableCameraPan",
|
||||
"type": "Button",
|
||||
"id": "f2d306df-d080-47f9-8b89-13cdc618e33f",
|
||||
"expectedControlType": "Button",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
}
|
||||
],
|
||||
"bindings": [
|
||||
{
|
||||
"name": "",
|
||||
"id": "92480903-92cf-4fbc-a571-e7030288b320",
|
||||
"path": "<Mouse>/delta",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "PanCamera",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "34fa967f-534c-446e-94f9-80fbffdde8ce",
|
||||
"path": "<Mouse>/rightButton",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "EnableCameraPan",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"controlSchemes": []
|
||||
}
|
14
Assets/PlayerActions.inputactions.meta
generated
Normal file
14
Assets/PlayerActions.inputactions.meta
generated
Normal file
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 61746e8436ed7cc44b3e171c25169e67
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 8404be70184654265930450def6a9037, type: 3}
|
||||
generateWrapperCode: 0
|
||||
wrapperCodePath:
|
||||
wrapperClassName:
|
||||
wrapperCodeNamespace:
|
8
Assets/Scenes.meta
generated
Normal file
8
Assets/Scenes.meta
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a6d993a7929eb254b8899f2f4c2ade84
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
1008
Assets/Scenes/SampleScene.unity
generated
Normal file
1008
Assets/Scenes/SampleScene.unity
generated
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/Scenes/SampleScene.unity.meta
generated
Normal file
7
Assets/Scenes/SampleScene.unity.meta
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2cda990e2423bbf4892e6590ba056729
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user