Dungeon - escaping wizard

This commit is contained in:
kabix09 2023-01-08 14:08:12 +01:00
parent 8a16fd554d
commit ca4cf6fbb9
11 changed files with 693 additions and 189 deletions

View File

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

View File

@ -0,0 +1,253 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &4759712171538235754
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4759712171538235753}
- component: {fileID: 4759712171538235752}
- component: {fileID: 4759712171538235748}
- component: {fileID: 4759712171538235749}
- component: {fileID: 1190203389089447339}
- component: {fileID: -8463239967595622325}
- component: {fileID: -7576677615092044163}
- component: {fileID: -9141091997471541743}
m_Layer: 0
m_Name: Wizard
m_TagString: NPC
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4759712171538235753
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4759712171538235754}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -1.9412931, y: -2.068871, z: 133.20683}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1699783724360580876}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &4759712171538235752
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4759712171538235754}
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: 3
m_Sprite: {fileID: 2429924255151692236, guid: a618c1a6d5f6e29438eeadfa55fcea33, 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.1875, y: 1.8125}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!50 &4759712171538235748
Rigidbody2D:
serializedVersion: 4
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4759712171538235754}
m_BodyType: 2
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_Interpolate: 0
m_SleepingMode: 1
m_CollisionDetection: 0
m_Constraints: 0
--- !u!58 &4759712171538235749
CircleCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4759712171538235754}
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: 1.5
--- !u!95 &1190203389089447339
Animator:
serializedVersion: 4
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4759712171538235754}
m_Enabled: 1
m_Avatar: {fileID: 0}
m_Controller: {fileID: 9100000, guid: 7d09ffbc6c0aa7c409b8da27c69433bd, type: 2}
m_CullingMode: 0
m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_StabilizeFeet: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorControllerStateOnDisable: 0
--- !u!114 &-8463239967595622325
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4759712171538235754}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a13ccc76cd22a814287fc3a36a9cac71, type: 3}
m_Name:
m_EditorClassIdentifier:
Name: Wizard
State: 1
--- !u!114 &-7576677615092044163
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4759712171538235754}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d622984048644f87804ad1a3f20aa23a, type: 3}
m_Name:
m_EditorClassIdentifier:
speed: 1
currentPosition:
GCost: 0
hCost: 0
walkable: 0
worldPosition: {x: 0, y: 0, z: 0}
gridPosition: {x: 0, y: 0}
isChasing: 0
point: {x: 0, y: 0, z: 0}
path: []
--- !u!114 &-9141091997471541743
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4759712171538235754}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 933f1402478f81c4a88075a73cd55674, type: 3}
m_Name:
m_EditorClassIdentifier:
anim: {fileID: 1190203389089447339}
shouldRotate: 0
dir: {x: 0, y: 0, z: 0}
targetPosition: {fileID: 0}
agent: {fileID: -7576677615092044163}
isDuringEscaping: 0
escapingRadius: 6
--- !u!1 &6978216546461805592
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1699783724360580876}
- component: {fileID: 6130279972041221321}
m_Layer: 0
m_Name: Collider
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1699783724360580876
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6978216546461805592}
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_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4759712171538235753}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!58 &6130279972041221321
CircleCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6978216546461805592}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 0
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: -0.4}
serializedVersion: 2
m_Radius: 0.5

View File

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

View File

@ -169,7 +169,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 8
m_RootOrder: 9
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &4624750
GameObject:
@ -1561,7 +1561,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 4
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &304507412
GameObject:
@ -2036,7 +2036,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 5
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &444470085
GameObject:
@ -3223,7 +3223,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 9
m_RootOrder: 10
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &735700017
GameObject:
@ -5215,7 +5215,7 @@ GameObject:
- component: {fileID: 1192878255}
- component: {fileID: 1192878256}
m_Layer: 0
m_Name: TeleportBuilder
m_Name: DungeonManager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -5228,13 +5228,13 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1192878254}
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_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1264747588}
m_RootOrder: 7
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1192878256
MonoBehaviour:
@ -5250,6 +5250,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
EntranceIndex: 0
TeleportModel: {fileID: 5514110702475440540, guid: 091334681d4a75c47981ce6090486fe2, type: 3}
Wizard: {fileID: 4759712171538235754, guid: 7f803b5686b9a2c4e91914bd68e6a21c, type: 3}
IsBuilded: 0
--- !u!1 &1211278092
GameObject:
@ -6025,7 +6026,6 @@ Transform:
- {fileID: 1855564285}
- {fileID: 1094640840}
- {fileID: 954361415}
- {fileID: 1192878255}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -6824,7 +6824,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 6
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1376403512
GameObject:
@ -7256,170 +7256,6 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1440549414}
m_CullTransparentMesh: 1
--- !u!43 &1449716324
Mesh:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
serializedVersion: 10
m_SubMeshes:
- serializedVersion: 2
firstByte: 0
indexCount: 12
topology: 0
baseVertex: 0
firstVertex: 0
vertexCount: 5
localAABB:
m_Center: {x: -0.00000047683716, y: -0.00000035762787, z: 0}
m_Extent: {x: 6.538223, y: 3.2163715, z: 0}
m_Shapes:
vertices: []
shapes: []
channels: []
fullWeights: []
m_BindPose: []
m_BoneNameHashes:
m_RootBoneNameHash: 0
m_BonesAABB: []
m_VariableBoneCountWeights:
m_Data:
m_MeshCompression: 0
m_IsReadable: 1
m_KeepVertices: 1
m_KeepIndices: 1
m_IndexFormat: 0
m_IndexBuffer: 000001000200000002000300000003000400000004000100
m_VertexData:
serializedVersion: 3
m_VertexCount: 5
m_Channels:
- stream: 0
offset: 0
format: 0
dimension: 3
- stream: 0
offset: 12
format: 0
dimension: 3
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 24
format: 0
dimension: 2
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
m_DataSize: 160
_typelessdata: 985cdcb460b4deb4000000000000000000000000000080bf0000003f0000003f1e39d1400ad94dc0000000000000000000000000000080bf0000803f000000002039d1c00ad94dc0000000000000000000000000000080bf00000000000000002039d1c007d94d40000000000000000000000000000080bf000000000000803f1e39d14007d94d40000000000000000000000000000080bf0000803f0000803f
m_CompressedMesh:
m_Vertices:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_UV:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_Normals:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_Tangents:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_Weights:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_NormalSigns:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_TangentSigns:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_FloatColors:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_BoneIndices:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_Triangles:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_UVInfo: 0
m_LocalAABB:
m_Center: {x: -0.00000047683716, y: -0.00000035762787, z: 0}
m_Extent: {x: 6.538223, y: 3.2163715, z: 0}
m_MeshUsageFlags: 0
m_BakedConvexCollisionMesh:
m_BakedTriangleCollisionMesh:
m_MeshMetrics[0]: 1
m_MeshMetrics[1]: 1
m_MeshOptimizationFlags: 1
m_StreamData:
serializedVersion: 2
offset: 0
size: 0
path:
--- !u!1 &1456785046
GameObject:
m_ObjectHideFlags: 0
@ -8042,7 +7878,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 2
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1541947223
GameObject:
@ -8957,7 +8793,7 @@ PrefabInstance:
- target: {fileID: 1278962375649610277, guid: d95da88540d2d6e44a0c4c40c581b24a, type: 3}
propertyPath: m_Mesh
value:
objectReference: {fileID: 1449716324}
objectReference: {fileID: 2068040588}
- target: {fileID: 1278962375649610280, guid: d95da88540d2d6e44a0c4c40c581b24a, type: 3}
propertyPath: m_Name
value: Light2D
@ -8968,7 +8804,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 1278962375649610283, guid: d95da88540d2d6e44a0c4c40c581b24a, type: 3}
propertyPath: m_RootOrder
value: 1
value: 2
objectReference: {fileID: 0}
- target: {fileID: 1278962375649610283, guid: d95da88540d2d6e44a0c4c40c581b24a, type: 3}
propertyPath: m_LocalScale.x
@ -9164,7 +9000,7 @@ RectTransform:
- {fileID: 781142004}
- {fileID: 1418782410}
m_Father: {fileID: 0}
m_RootOrder: 3
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@ -9659,7 +9495,7 @@ Transform:
- {fileID: 178967050}
- {fileID: 1177818051}
m_Father: {fileID: 0}
m_RootOrder: 7
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1855564284
GameObject:
@ -9724,6 +9560,75 @@ MonoBehaviour:
itemEvent:
m_PersistentCalls:
m_Calls: []
--- !u!1001 &1865105323
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 3079617781123838016, guid: 6b44df46620f48f41903e7858379f704, type: 3}
propertyPath: m_Name
value: GridManager
objectReference: {fileID: 0}
- target: {fileID: 3079617781123838030, guid: 6b44df46620f48f41903e7858379f704, type: 3}
propertyPath: m_RootOrder
value: 11
objectReference: {fileID: 0}
- target: {fileID: 3079617781123838030, guid: 6b44df46620f48f41903e7858379f704, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3079617781123838030, guid: 6b44df46620f48f41903e7858379f704, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3079617781123838030, guid: 6b44df46620f48f41903e7858379f704, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3079617781123838030, guid: 6b44df46620f48f41903e7858379f704, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3079617781123838030, guid: 6b44df46620f48f41903e7858379f704, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3079617781123838030, guid: 6b44df46620f48f41903e7858379f704, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3079617781123838030, guid: 6b44df46620f48f41903e7858379f704, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3079617781123838030, guid: 6b44df46620f48f41903e7858379f704, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3079617781123838030, guid: 6b44df46620f48f41903e7858379f704, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3079617781123838030, guid: 6b44df46620f48f41903e7858379f704, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3079617781123838031, guid: 6b44df46620f48f41903e7858379f704, type: 3}
propertyPath: tilemap
value:
objectReference: {fileID: 178967048}
- target: {fileID: 3079617781123838031, guid: 6b44df46620f48f41903e7858379f704, type: 3}
propertyPath: showIndividualNodes
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3079617781123838031, guid: 6b44df46620f48f41903e7858379f704, type: 3}
propertyPath: TileDatas.Array.data[0]
value:
objectReference: {fileID: 11400000, guid: 09b982311c12ce740906c7e5543621f1, type: 2}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 6b44df46620f48f41903e7858379f704, type: 3}
--- !u!1 &1884073576
GameObject:
m_ObjectHideFlags: 0
@ -10585,6 +10490,37 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2055220928}
m_CullTransparentMesh: 1
--- !u!1 &2055790869
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2055790870}
m_Layer: 0
m_Name: Enemy
m_TagString: EnemyCollection
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2055790870
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2055790869}
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_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 12
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2064245293
GameObject:
m_ObjectHideFlags: 0
@ -10733,6 +10669,170 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2064245293}
m_CullTransparentMesh: 1
--- !u!43 &2068040588
Mesh:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
serializedVersion: 10
m_SubMeshes:
- serializedVersion: 2
firstByte: 0
indexCount: 12
topology: 0
baseVertex: 0
firstVertex: 0
vertexCount: 5
localAABB:
m_Center: {x: -0.00000047683716, y: -0.00000035762787, z: 0}
m_Extent: {x: 6.538223, y: 3.2163715, z: 0}
m_Shapes:
vertices: []
shapes: []
channels: []
fullWeights: []
m_BindPose: []
m_BoneNameHashes:
m_RootBoneNameHash: 0
m_BonesAABB: []
m_VariableBoneCountWeights:
m_Data:
m_MeshCompression: 0
m_IsReadable: 1
m_KeepVertices: 1
m_KeepIndices: 1
m_IndexFormat: 0
m_IndexBuffer: 000001000200000002000300000003000400000004000100
m_VertexData:
serializedVersion: 3
m_VertexCount: 5
m_Channels:
- stream: 0
offset: 0
format: 0
dimension: 3
- stream: 0
offset: 12
format: 0
dimension: 3
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 24
format: 0
dimension: 2
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
m_DataSize: 160
_typelessdata: 985cdcb460b4deb4000000000000000000000000000080bf0000003f0000003f1e39d1400ad94dc0000000000000000000000000000080bf0000803f000000002039d1c00ad94dc0000000000000000000000000000080bf00000000000000002039d1c007d94d40000000000000000000000000000080bf000000000000803f1e39d14007d94d40000000000000000000000000000080bf0000803f0000803f
m_CompressedMesh:
m_Vertices:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_UV:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_Normals:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_Tangents:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_Weights:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_NormalSigns:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_TangentSigns:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_FloatColors:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_BoneIndices:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_Triangles:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_UVInfo: 0
m_LocalAABB:
m_Center: {x: -0.00000047683716, y: -0.00000035762787, z: 0}
m_Extent: {x: 6.538223, y: 3.2163715, z: 0}
m_MeshUsageFlags: 0
m_BakedConvexCollisionMesh:
m_BakedTriangleCollisionMesh:
m_MeshMetrics[0]: 1
m_MeshMetrics[1]: 1
m_MeshOptimizationFlags: 1
m_StreamData:
serializedVersion: 2
offset: 0
size: 0
path:
--- !u!1 &2090937613
GameObject:
m_ObjectHideFlags: 0

View File

@ -26,8 +26,6 @@ public class Graph
nodesPositions.Add(pos, node);
}
}
Debug.Log(graphNodes.Count);
Debug.Log(nodesPositions.Count);
for (int i = 0; i < map.size.x-1; i++)
{

View File

@ -127,8 +127,8 @@ public class TileMapGenerator : MonoBehaviour
int bound = availablePos.Count;
int randomVal;
randomVal = Random.Range(0, bound);
Debug.Log(availablePos[randomVal]);
return availablePos[randomVal];
return availablePos[randomVal];
}

View File

@ -22,6 +22,8 @@ public class DungeonManager : MonoBehaviour
public GameObject TeleportModel;
public GameObject Wizard;
public bool IsBuilded = false;
public void Awake()
@ -46,8 +48,9 @@ public class DungeonManager : MonoBehaviour
{
if (!IsBuilded)
{
Manage();
ManageTeleports();
BuildWizard();
IsBuilded = true;
}
}
@ -55,7 +58,7 @@ public class DungeonManager : MonoBehaviour
/// <summary>
/// Function to manage which teleport is currently required to build on scene
/// </summary>
public void Manage()
public void ManageTeleports()
{
switch (EntranceIndex)
{
@ -95,8 +98,7 @@ public class DungeonManager : MonoBehaviour
do {
teleportCoords = GameObject.FindObjectOfType<TileMapGenerator>().gameObject.GetComponent<TileMapGenerator>().randomCoordsForStanding();
} while (Vector2.Distance(teleportCoords, GameObject.FindGameObjectWithTag("Player").gameObject.transform.position) > 20);
} while (!(Vector2.Distance(teleportCoords, GameObject.FindGameObjectWithTag("Player").gameObject.transform.position) > 30));
// 2. Instantiate
var newTeleport = Instantiate(TeleportModel, teleportCoords, Quaternion.identity);
@ -125,4 +127,28 @@ public class DungeonManager : MonoBehaviour
SaveProggress(EntranceIndex);
}
public void BuildWizard()
{
Vector3 teleportCoords;
do
{
teleportCoords = GameObject.FindObjectOfType<TileMapGenerator>().gameObject.GetComponent<TileMapGenerator>().randomCoordsForStanding();
Debug.Log(Vector2.Distance(teleportCoords, GameObject.FindGameObjectWithTag("Player").gameObject.transform.position));
Debug.Log("player position: " + GameObject.FindGameObjectWithTag("Player").gameObject.transform.position);
} while (!(Vector2.Distance(teleportCoords, GameObject.FindGameObjectWithTag("Player").gameObject.transform.position) > 6 &&
Vector2.Distance(teleportCoords, GameObject.FindGameObjectWithTag("Player").gameObject.transform.position) < 9));
Debug.Log(teleportCoords);
Debug.Log(Vector2.Distance(teleportCoords, GameObject.FindGameObjectWithTag("Player").gameObject.transform.position));
var newWizard = Instantiate(Wizard, teleportCoords, Quaternion.identity);
//newWizard.transform.localPosition = teleportCoords;
newWizard.name = Wizard.name;
}
}

View File

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

View File

@ -0,0 +1,94 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
[RequireComponent(typeof(NPC))]
class EscapingWizard : MonoBehaviour
{
private Rigidbody2D myRigidbody;
public Animator anim;
private Vector2 movement;
public bool shouldRotate;
public Vector3 dir;
[Header("Following Logic")]
public Transform targetPosition;
public AStarPathfindingAgent agent;
public bool isDuringEscaping = false; // var is setted by trigger range
public float escapingRadius = 6f; // radious where Wizard start escaping if player is in
public void Awake()
{
agent = GetComponent<AStarPathfindingAgent>();
}
private void Start()
{
}
private void Update()
{
if(targetPosition == null)
{
targetPosition = GameObject.FindGameObjectWithTag("SceneTransition")?.transform;
}
//StopAllCoroutines();
if (IsInEscapingRadious())
{
gameObject.GetComponent<NPC>().State = NPCStateEnum.Walking;
// Animation config
dir = targetPosition.position - transform.position;
float angle = Mathf.Atan2(dir.y, dir.x) * Mathf.Rad2Deg;
dir.Normalize();
movement = dir;
anim.SetBool("isRunning", movement != Vector2.zero);
if (shouldRotate)
{
anim.SetFloat("Xinfo", dir.x);
anim.SetFloat("Yinfo", dir.y);
}
agent.point = targetPosition.position;
agent.FindPoint();
StartCoroutine(agent.FollowPath());
} else
{
anim.SetBool("isRunning", false);
gameObject.GetComponent<NPC>().State = NPCStateEnum.Pending;
}
}
public bool IsInEscapingRadious()
{
if (Vector2.Distance(GameObject.FindGameObjectWithTag("Player").transform.position, transform.position) >= escapingRadius)
return false;
return true;
}
public void OnCollisionEnter2D(Collision2D collision)
{
if(collision.collider.tag == "SceneTransition")
{
Destroy(gameObject);
}
}
}

View File

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

View File

@ -101,13 +101,12 @@ public class ThugNPCFollowing : MonoBehaviour
// 0 Cofigure Animator
if (Vector2.Distance(targetPosition.position, transform.position) <= chasingRadius)
{
Debug.Log("Chase");
dir = targetPosition.position - transform.position;
float angle = Mathf.Atan2(dir.y, dir.x) * Mathf.Rad2Deg;
dir.Normalize();
movement = dir;
anim.SetBool("isRunning", movement != Vector2.zero);
Debug.Log(shouldRotate);
if (shouldRotate)
{
anim.SetFloat("Xinfo", dir.x);