loot table added - AI improved a bit

This commit is contained in:
2022-05-02 14:28:44 +03:00
parent a748b342a8
commit 6571056d18
78 changed files with 4065 additions and 1895 deletions

View File

@@ -140,6 +140,31 @@ AnimatorStateTransition:
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &-3741334239111002070
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: Dead
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102835054974116572}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.75
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &-1989803667490188130
AnimatorState:
serializedVersion: 6
@@ -231,25 +256,37 @@ AnimatorController:
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
m_Controller: {fileID: 9100000}
- m_Name: EnemyInAggroRange
m_Type: 4
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
m_Controller: {fileID: 9100000}
- m_Name: EnemyInAttackRange
m_Type: 4
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
m_Controller: {fileID: 9100000}
- m_Name: Wandering
m_Type: 4
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
m_Controller: {fileID: 9100000}
- m_Name: Dead
m_Type: 4
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
- m_Name: DeathComplete
m_Type: 4
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
@@ -1043,7 +1080,7 @@ AnimatorStateMachine:
m_Position: {x: 670, y: 550, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102835054974116572}
m_Position: {x: 280, y: 500, z: 0}
m_Position: {x: 300, y: -80, z: 0}
- serializedVersion: 1
m_State: {fileID: 8194647877007136643}
m_Position: {x: 300, y: 220, z: 0}
@@ -1054,11 +1091,12 @@ AnimatorStateMachine:
m_State: {fileID: -6878085496064969341}
m_Position: {x: 300, y: 300, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_AnyStateTransitions:
- {fileID: -3741334239111002070}
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 50, y: 20, z: 0}
m_AnyStatePosition: {x: 60, y: -70, z: 0}
m_EntryPosition: {x: 100, y: 150, z: 0}
m_ExitPosition: {x: 90, y: 510, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}

View File

@@ -363,6 +363,7 @@ GameObject:
- component: {fileID: 979664278525990523}
- component: {fileID: 7068053744138324038}
- component: {fileID: -8446248727669723812}
- component: {fileID: -8829389009851380535}
m_Layer: 0
m_Name: BossSlime
m_TagString: BossSlime
@@ -421,6 +422,9 @@ MonoBehaviour:
m_EditorClassIdentifier:
moveSpeed: 1
rotSpeed: 50
onDeathComplete:
m_PersistentCalls:
m_Calls: []
--- !u!54 &979664278525990523
Rigidbody:
m_ObjectHideFlags: 0
@@ -472,6 +476,23 @@ NavMeshAgent:
m_BaseOffset: 0
m_WalkableMask: 4294967295
m_ObstacleAvoidanceType: 4
--- !u!114 &-8829389009851380535
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8437010424349675124}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a29d148fe20acce4c9eb0eae410c0fd1, type: 3}
m_Name:
m_EditorClassIdentifier:
specialLootItems:
- {fileID: 794930279730652231, guid: 462744d4504c94f40890a6592a874f48, type: 3}
defaultLootItems:
- {fileID: 1107664363, guid: 60329536ab1a8ad4fbb3bacaa6e3f274, type: 3}
- {fileID: 1452325626, guid: 3f5d27982f14e1f48bd08144e6efaca3, type: 3}
--- !u!1 &8437097380876049792
GameObject:
m_ObjectHideFlags: 0

View File

@@ -363,6 +363,7 @@ GameObject:
- component: {fileID: 979664278525990523}
- component: {fileID: 6363954507592996496}
- component: {fileID: 8521358267821330725}
- component: {fileID: -563634439873772526}
m_Layer: 0
m_Name: SlimePBR
m_TagString: Slime
@@ -421,6 +422,21 @@ MonoBehaviour:
m_EditorClassIdentifier:
moveSpeed: 1
rotSpeed: 100
onDeathComplete:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: -563634439873772526}
m_TargetAssemblyTypeName: LootTable, Assembly-CSharp
m_MethodName: SpawnLoot
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!54 &979664278525990523
Rigidbody:
m_ObjectHideFlags: 0
@@ -472,6 +488,28 @@ NavMeshAgent:
m_BaseOffset: 0
m_WalkableMask: 4294967295
m_ObstacleAvoidanceType: 4
--- !u!114 &-563634439873772526
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8437010424349675124}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a29d148fe20acce4c9eb0eae410c0fd1, type: 3}
m_Name:
m_EditorClassIdentifier:
specialLootItems:
- {fileID: 255228764982434128, guid: cef55772982401344a4936484c7815e6, type: 3}
- {fileID: 1452325626, guid: 3f5d27982f14e1f48bd08144e6efaca3, type: 3}
- {fileID: 1107664363, guid: 60329536ab1a8ad4fbb3bacaa6e3f274, type: 3}
defaultLootItems:
- {fileID: 6396165985204489939, guid: c0ed2a71608d12c47b4a8b698ddd42df, type: 3}
- {fileID: 8332373344487160328, guid: ef3a94d51636ad84cac71115711a0988, type: 3}
- {fileID: 3432542220449269451, guid: d10fd02c374eedc48b2364d2c6d032e5, type: 3}
- {fileID: 3504448552189821465, guid: 01a709ed5519e884a914f857d168111a, type: 3}
- {fileID: 6500982278920226610, guid: c3f2ddc52eeb7e84cb339ad10597ab01, type: 3}
--- !u!1 &8437097380876049792
GameObject:
m_ObjectHideFlags: 0

View File

@@ -4887,6 +4887,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 4bdcdc21af179024f86b724696cc5425, type: 3}
m_Name:
m_EditorClassIdentifier:
damage: 1
--- !u!135 &3271421586109646936
SphereCollider:
m_ObjectHideFlags: 0

View File

@@ -0,0 +1,233 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1452325626
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7599009815076498713}
- component: {fileID: 7690316421642756961}
- component: {fileID: 1959997447465322129}
- component: {fileID: 1452325627}
- component: {fileID: -27368184810204396}
- component: {fileID: 1015029739545606862}
m_Layer: 0
m_Name: essencepot
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7599009815076498713
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1452325626}
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: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &7690316421642756961
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1452325626}
m_Mesh: {fileID: 4300000, guid: 3fdf4fadcd707094d8063bc6de1e8931, type: 3}
--- !u!23 &1959997447465322129
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1452325626}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: d08a0d1aba6bbce4b815d4bd76548e32, 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: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!64 &1452325627
MeshCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1452325626}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 4
m_Convex: 1
m_CookingOptions: 30
m_Mesh: {fileID: 4300000, guid: 3fdf4fadcd707094d8063bc6de1e8931, type: 3}
--- !u!54 &-27368184810204396
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1452325626}
serializedVersion: 2
m_Mass: 1
m_Drag: 0
m_AngularDrag: 0.05
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!114 &1015029739545606862
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1452325626}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0ad34abafad169848a38072baa96cdb2, type: 3}
m_Name:
m_EditorClassIdentifier:
m_InteractionManager: {fileID: 0}
m_Colliders: []
m_InteractionLayerMask:
serializedVersion: 2
m_Bits: 4294967295
m_InteractionLayers:
m_Bits: 1
m_SelectMode: 0
m_CustomReticle: {fileID: 0}
m_FirstHoverEntered:
m_PersistentCalls:
m_Calls: []
m_LastHoverExited:
m_PersistentCalls:
m_Calls: []
m_HoverEntered:
m_PersistentCalls:
m_Calls: []
m_HoverExited:
m_PersistentCalls:
m_Calls: []
m_FirstSelectEntered:
m_PersistentCalls:
m_Calls: []
m_LastSelectExited:
m_PersistentCalls:
m_Calls: []
m_SelectEntered:
m_PersistentCalls:
m_Calls: []
m_SelectExited:
m_PersistentCalls:
m_Calls: []
m_Activated:
m_PersistentCalls:
m_Calls: []
m_Deactivated:
m_PersistentCalls:
m_Calls: []
m_OnFirstHoverEntered:
m_PersistentCalls:
m_Calls: []
m_OnLastHoverExited:
m_PersistentCalls:
m_Calls: []
m_OnHoverEntered:
m_PersistentCalls:
m_Calls: []
m_OnHoverExited:
m_PersistentCalls:
m_Calls: []
m_OnSelectEntered:
m_PersistentCalls:
m_Calls: []
m_OnSelectExited:
m_PersistentCalls:
m_Calls: []
m_OnSelectCanceled:
m_PersistentCalls:
m_Calls: []
m_OnActivate:
m_PersistentCalls:
m_Calls: []
m_OnDeactivate:
m_PersistentCalls:
m_Calls: []
m_AttachTransform: {fileID: 0}
m_AttachEaseInTime: 0.15
m_MovementType: 2
m_VelocityDamping: 1
m_VelocityScale: 1
m_AngularVelocityDamping: 1
m_AngularVelocityScale: 1
m_TrackPosition: 1
m_SmoothPosition: 0
m_SmoothPositionAmount: 5
m_TightenPosition: 0.5
m_TrackRotation: 1
m_SmoothRotation: 0
m_SmoothRotationAmount: 5
m_TightenRotation: 0.5
m_ThrowOnDetach: 1
m_ThrowSmoothingDuration: 0.25
m_ThrowSmoothingCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
m_ThrowVelocityScale: 1.5
m_ThrowAngularVelocityScale: 1
m_ForceGravityOnDetach: 0
m_RetainTransformParent: 1
m_AttachPointCompatibilityMode: 0

View File

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

View File

@@ -0,0 +1,247 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1107664363
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5430430573211772600}
- component: {fileID: 3340775013565204642}
- component: {fileID: 1972919536741450415}
- component: {fileID: 1107664364}
- component: {fileID: -726634077533106663}
- component: {fileID: -5739339566287519855}
- component: {fileID: -6197903171342633845}
m_Layer: 0
m_Name: healthpot
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &5430430573211772600
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1107664363}
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: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &3340775013565204642
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1107664363}
m_Mesh: {fileID: 4300000, guid: b42c9d83e7c60034db9c5602d55eb524, type: 3}
--- !u!23 &1972919536741450415
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1107664363}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: d08a0d1aba6bbce4b815d4bd76548e32, 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: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!64 &1107664364
MeshCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1107664363}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 4
m_Convex: 1
m_CookingOptions: 30
m_Mesh: {fileID: 4300000, guid: b42c9d83e7c60034db9c5602d55eb524, type: 3}
--- !u!54 &-726634077533106663
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1107664363}
serializedVersion: 2
m_Mass: 1
m_Drag: 0
m_AngularDrag: 0.05
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!114 &-5739339566287519855
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1107664363}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0ad34abafad169848a38072baa96cdb2, type: 3}
m_Name:
m_EditorClassIdentifier:
m_InteractionManager: {fileID: 0}
m_Colliders: []
m_InteractionLayerMask:
serializedVersion: 2
m_Bits: 4294967295
m_InteractionLayers:
m_Bits: 1
m_SelectMode: 0
m_CustomReticle: {fileID: 0}
m_FirstHoverEntered:
m_PersistentCalls:
m_Calls: []
m_LastHoverExited:
m_PersistentCalls:
m_Calls: []
m_HoverEntered:
m_PersistentCalls:
m_Calls: []
m_HoverExited:
m_PersistentCalls:
m_Calls: []
m_FirstSelectEntered:
m_PersistentCalls:
m_Calls: []
m_LastSelectExited:
m_PersistentCalls:
m_Calls: []
m_SelectEntered:
m_PersistentCalls:
m_Calls: []
m_SelectExited:
m_PersistentCalls:
m_Calls: []
m_Activated:
m_PersistentCalls:
m_Calls: []
m_Deactivated:
m_PersistentCalls:
m_Calls: []
m_OnFirstHoverEntered:
m_PersistentCalls:
m_Calls: []
m_OnLastHoverExited:
m_PersistentCalls:
m_Calls: []
m_OnHoverEntered:
m_PersistentCalls:
m_Calls: []
m_OnHoverExited:
m_PersistentCalls:
m_Calls: []
m_OnSelectEntered:
m_PersistentCalls:
m_Calls: []
m_OnSelectExited:
m_PersistentCalls:
m_Calls: []
m_OnSelectCanceled:
m_PersistentCalls:
m_Calls: []
m_OnActivate:
m_PersistentCalls:
m_Calls: []
m_OnDeactivate:
m_PersistentCalls:
m_Calls: []
m_AttachTransform: {fileID: 0}
m_AttachEaseInTime: 0.15
m_MovementType: 2
m_VelocityDamping: 1
m_VelocityScale: 1
m_AngularVelocityDamping: 1
m_AngularVelocityScale: 1
m_TrackPosition: 1
m_SmoothPosition: 0
m_SmoothPositionAmount: 5
m_TightenPosition: 0.5
m_TrackRotation: 1
m_SmoothRotation: 0
m_SmoothRotationAmount: 5
m_TightenRotation: 0.5
m_ThrowOnDetach: 1
m_ThrowSmoothingDuration: 0.25
m_ThrowSmoothingCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
m_ThrowVelocityScale: 1.5
m_ThrowAngularVelocityScale: 1
m_ForceGravityOnDetach: 0
m_RetainTransformParent: 1
m_AttachPointCompatibilityMode: 0
--- !u!114 &-6197903171342633845
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1107664363}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 85669d78a60553c479d2baa2accd0eec, type: 3}
m_Name:
m_EditorClassIdentifier:
regenAmount: 0

View File

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

View File

@@ -19,6 +19,8 @@ public class SlimeAI : MonoBehaviour
private bool isRotatingRight = false;
private bool isWalking = false;
public UnityEvent onDeathComplete;
//[SerializeField]
//private UnityEvent onAttack;
@@ -27,7 +29,7 @@ public class SlimeAI : MonoBehaviour
{
animator = GetComponent<Animator>();
player = GameObject.FindWithTag("Player");
HP = 10;
HP = 2;
}
@@ -73,9 +75,6 @@ public class SlimeAI : MonoBehaviour
//Idle
StartCoroutine("Wander");
}
Debug.Log(isWandering);
Debug.Log(isRotatingLeft);
Debug.Log(isRotatingRight);
if (isRotatingRight == true)
{
animator.SetBool("Wandering", false);
@@ -94,13 +93,17 @@ public class SlimeAI : MonoBehaviour
if (HP <= 0)
{
animator.SetBool("Dead", true);
}
if (animator.GetBool("DeathComplete"))
if (animator.GetBool("Dead"))
{
print("asd");
Destroy(this.gameObject);
onDeathComplete.Invoke();
}
}
void Rotate()

View File

@@ -0,0 +1,34 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LootTable : MonoBehaviour
{
public List<GameObject> specialLootItems;
public List<GameObject> defaultLootItems;
public void SpawnLoot() {
float r = Random.value;
Debug.LogWarning(r);
Vector3 spawnLocation = this.transform.position;
spawnLocation.y += 3;
if ( r > 0.50) //%50 percent chance -> special loot chance + default loot
{
int specialloot = Random.Range(0, specialLootItems.Count);
int defaultloot = Random.Range(0, defaultLootItems.Count);
Debug.LogWarning("special loot spawned");
Instantiate(specialLootItems[specialloot], spawnLocation, Quaternion.identity);
Instantiate(defaultLootItems[defaultloot], spawnLocation, Quaternion.identity);
}
if (r > 0.2) //%80 percent chance -> default loot chance loot chance
{
Debug.LogWarning("default loot spawned");
int defaultloot = Random.Range(0, defaultLootItems.Count);
Instantiate(defaultLootItems[defaultloot], this.transform);
}
}
}

View File

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

View File

@@ -31,6 +31,10 @@ public class Projectile : MonoBehaviour
if (collision.gameObject.tag != "IceBolt" && collision.gameObject.tag != "Player" && !collided)
{
collided = true;
if (collision.gameObject.tag == "Slime")
{
collision.gameObject.GetComponent<SlimeAI>().GetHit((int)damage);
}
if (collision.gameObject.name == "Dummy") Destroy(collision.gameObject); //REPLACE WITH ENEMY TAG CHECK AND DAMAGE CHECKING
Destroy(gameObject);
}
@@ -44,10 +48,11 @@ public class Projectile : MonoBehaviour
collided = true;
Destroy(gameObject);
}
else if (other.gameObject.name == "Dummy")
if (other.gameObject.name == "Dummy")
{
Destroy(other.gameObject);
Destroy(gameObject);
}
}
}

View File

@@ -18,7 +18,7 @@ public class PlayerInfo : MonoBehaviour
{
Instance = this;
health = 5;
essence_basic = 0;
essence_basic = 1000;
rightHandHeld = null;
leftHandHeld = null;
}