add player death animation
also bugfixed some tambourine stuff
This commit is contained in:
parent
16a190949d
commit
9f36564e67
111
Assets/Animations/Player/Die.anim
Normal file
111
Assets/Animations/Player/Die.anim
Normal file
@ -0,0 +1,111 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!74 &7400000
|
||||
AnimationClip:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Die
|
||||
serializedVersion: 7
|
||||
m_Legacy: 0
|
||||
m_Compressed: 0
|
||||
m_UseHighQualityCurve: 1
|
||||
m_RotationCurves: []
|
||||
m_CompressedRotationCurves: []
|
||||
m_EulerCurves: []
|
||||
m_PositionCurves: []
|
||||
m_ScaleCurves: []
|
||||
m_FloatCurves: []
|
||||
m_PPtrCurves:
|
||||
- serializedVersion: 2
|
||||
curve:
|
||||
- time: 0
|
||||
value: {fileID: -122338556, guid: ef839c6d1bbb746a8a3f399806a935a5, type: 3}
|
||||
- time: 0.083333336
|
||||
value: {fileID: 189834051, guid: ef839c6d1bbb746a8a3f399806a935a5, type: 3}
|
||||
- time: 0.16666667
|
||||
value: {fileID: -2024555392, guid: ef839c6d1bbb746a8a3f399806a935a5, type: 3}
|
||||
- time: 0.25
|
||||
value: {fileID: 1086045528, guid: ef839c6d1bbb746a8a3f399806a935a5, type: 3}
|
||||
- time: 0.33333334
|
||||
value: {fileID: 884718321, guid: ef839c6d1bbb746a8a3f399806a935a5, type: 3}
|
||||
- time: 0.41666666
|
||||
value: {fileID: -460163578, guid: ef839c6d1bbb746a8a3f399806a935a5, type: 3}
|
||||
- time: 0.5
|
||||
value: {fileID: -990243943, guid: ef839c6d1bbb746a8a3f399806a935a5, type: 3}
|
||||
- time: 0.5833333
|
||||
value: {fileID: -625216433, guid: ef839c6d1bbb746a8a3f399806a935a5, type: 3}
|
||||
- time: 0.6666667
|
||||
value: {fileID: 323212427, guid: ef839c6d1bbb746a8a3f399806a935a5, type: 3}
|
||||
- time: 0.75
|
||||
value: {fileID: 565888814, guid: ef839c6d1bbb746a8a3f399806a935a5, type: 3}
|
||||
- time: 0.8333333
|
||||
value: {fileID: 315249131, guid: ef839c6d1bbb746a8a3f399806a935a5, type: 3}
|
||||
- time: 0.9166667
|
||||
value: {fileID: -318639155, guid: ef839c6d1bbb746a8a3f399806a935a5, type: 3}
|
||||
- time: 1
|
||||
value: {fileID: 478881412, guid: ef839c6d1bbb746a8a3f399806a935a5, type: 3}
|
||||
- time: 1.0833334
|
||||
value: {fileID: 1253964676, guid: ef839c6d1bbb746a8a3f399806a935a5, type: 3}
|
||||
attribute: m_Sprite
|
||||
path:
|
||||
classID: 212
|
||||
script: {fileID: 0}
|
||||
flags: 2
|
||||
m_SampleRate: 12
|
||||
m_WrapMode: 0
|
||||
m_Bounds:
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
m_Extent: {x: 0, y: 0, z: 0}
|
||||
m_ClipBindingConstant:
|
||||
genericBindings:
|
||||
- serializedVersion: 2
|
||||
path: 0
|
||||
attribute: 0
|
||||
script: {fileID: 0}
|
||||
typeID: 212
|
||||
customType: 23
|
||||
isPPtrCurve: 1
|
||||
isIntCurve: 0
|
||||
isSerializeReferenceCurve: 0
|
||||
pptrCurveMapping:
|
||||
- {fileID: -122338556, guid: ef839c6d1bbb746a8a3f399806a935a5, type: 3}
|
||||
- {fileID: 189834051, guid: ef839c6d1bbb746a8a3f399806a935a5, type: 3}
|
||||
- {fileID: -2024555392, guid: ef839c6d1bbb746a8a3f399806a935a5, type: 3}
|
||||
- {fileID: 1086045528, guid: ef839c6d1bbb746a8a3f399806a935a5, type: 3}
|
||||
- {fileID: 884718321, guid: ef839c6d1bbb746a8a3f399806a935a5, type: 3}
|
||||
- {fileID: -460163578, guid: ef839c6d1bbb746a8a3f399806a935a5, type: 3}
|
||||
- {fileID: -990243943, guid: ef839c6d1bbb746a8a3f399806a935a5, type: 3}
|
||||
- {fileID: -625216433, guid: ef839c6d1bbb746a8a3f399806a935a5, type: 3}
|
||||
- {fileID: 323212427, guid: ef839c6d1bbb746a8a3f399806a935a5, type: 3}
|
||||
- {fileID: 565888814, guid: ef839c6d1bbb746a8a3f399806a935a5, type: 3}
|
||||
- {fileID: 315249131, guid: ef839c6d1bbb746a8a3f399806a935a5, type: 3}
|
||||
- {fileID: -318639155, guid: ef839c6d1bbb746a8a3f399806a935a5, type: 3}
|
||||
- {fileID: 478881412, guid: ef839c6d1bbb746a8a3f399806a935a5, type: 3}
|
||||
- {fileID: 1253964676, guid: ef839c6d1bbb746a8a3f399806a935a5, type: 3}
|
||||
m_AnimationClipSettings:
|
||||
serializedVersion: 2
|
||||
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||
m_AdditiveReferencePoseTime: 0
|
||||
m_StartTime: 0
|
||||
m_StopTime: 1.1666667
|
||||
m_OrientationOffsetY: 0
|
||||
m_Level: 0
|
||||
m_CycleOffset: 0
|
||||
m_HasAdditiveReferencePose: 0
|
||||
m_LoopTime: 0
|
||||
m_LoopBlend: 0
|
||||
m_LoopBlendOrientation: 0
|
||||
m_LoopBlendPositionY: 0
|
||||
m_LoopBlendPositionXZ: 0
|
||||
m_KeepOriginalOrientation: 0
|
||||
m_KeepOriginalPositionY: 1
|
||||
m_KeepOriginalPositionXZ: 0
|
||||
m_HeightFromFeet: 0
|
||||
m_Mirror: 0
|
||||
m_EditorCurves: []
|
||||
m_EulerEditorCurves: []
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_Events: []
|
8
Assets/Animations/Player/Die.anim.meta
Normal file
8
Assets/Animations/Player/Die.anim.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 16389a4fa696c4f01a48a99d08f253fc
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,5 +1,31 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1102 &-9207161459798249037
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Die
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: 16389a4fa696c4f01a48a99d08f253fc, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!91 &9100000
|
||||
AnimatorController:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -14,7 +40,7 @@ AnimatorController:
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 0}
|
||||
m_Controller: {fileID: 9100000}
|
||||
m_AnimatorLayers:
|
||||
- serializedVersion: 5
|
||||
m_Name: Base Layer
|
||||
@ -147,6 +173,9 @@ AnimatorStateMachine:
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 3938999004827103792}
|
||||
m_Position: {x: 180, y: 320, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: -9207161459798249037}
|
||||
m_Position: {x: 360, y: 80, z: 0}
|
||||
m_ChildStateMachines: []
|
||||
m_AnyStateTransitions: []
|
||||
m_EntryTransitions: []
|
||||
|
@ -42,6 +42,7 @@ GameObject:
|
||||
- component: {fileID: 5447655033524966674}
|
||||
- component: {fileID: 4957706768026546484}
|
||||
- component: {fileID: 6465130401096595230}
|
||||
- component: {fileID: 1214578695954916569}
|
||||
m_Layer: 0
|
||||
m_Name: CaveOctopus
|
||||
m_TagString: Enemy
|
||||
@ -133,3 +134,48 @@ MonoBehaviour:
|
||||
firePoint: {fileID: 5766250975723295123}
|
||||
fireSpeed: 0.3
|
||||
projectileSpeed: 160
|
||||
--- !u!61 &1214578695954916569
|
||||
BoxCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8749426230765200713}
|
||||
m_Enabled: 1
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
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_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
oldSize: {x: 0.5, y: 0.5}
|
||||
newSize: {x: 1, y: 2}
|
||||
adaptiveTilingThreshold: 0.5
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 0.5, y: 0.5}
|
||||
m_EdgeRadius: 0
|
||||
|
@ -11,7 +11,6 @@ GameObject:
|
||||
- component: {fileID: 8219214743225187619}
|
||||
- component: {fileID: 5211884072714540459}
|
||||
- component: {fileID: 4246396268875048627}
|
||||
- component: {fileID: 2452103161071792001}
|
||||
- component: {fileID: -3408990633585578017}
|
||||
- component: {fileID: 217851877528699149}
|
||||
m_Layer: 0
|
||||
@ -115,41 +114,6 @@ Rigidbody2D:
|
||||
m_SleepingMode: 1
|
||||
m_CollisionDetection: 0
|
||||
m_Constraints: 0
|
||||
--- !u!58 &2452103161071792001
|
||||
CircleCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6786092313738818144}
|
||||
m_Enabled: 1
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
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: 1
|
||||
m_UsedByEffector: 0
|
||||
m_UsedByComposite: 0
|
||||
m_Offset: {x: 0, y: 0}
|
||||
serializedVersion: 2
|
||||
m_Radius: 5
|
||||
--- !u!61 &-3408990633585578017
|
||||
BoxCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -10,9 +10,9 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 493245979038171992}
|
||||
- component: {fileID: 493245979038171999}
|
||||
- component: {fileID: 493245979038171993}
|
||||
- component: {fileID: 4018407283885727215}
|
||||
- component: {fileID: 5337163787054360807}
|
||||
- component: {fileID: 1833154123759965952}
|
||||
m_Layer: 0
|
||||
m_Name: Slug
|
||||
m_TagString: Enemy
|
||||
@ -33,7 +33,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 1
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 12
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &493245979038171999
|
||||
SpriteRenderer:
|
||||
@ -87,41 +87,6 @@ SpriteRenderer:
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!58 &493245979038171993
|
||||
CircleCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 493245979038171997}
|
||||
m_Enabled: 1
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
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: 1
|
||||
m_UsedByEffector: 0
|
||||
m_UsedByComposite: 0
|
||||
m_Offset: {x: 0, y: 0}
|
||||
serializedVersion: 2
|
||||
m_Radius: 1.11
|
||||
--- !u!114 &4018407283885727215
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -167,3 +132,48 @@ Animator:
|
||||
m_AllowConstantClipSamplingOptimization: 1
|
||||
m_KeepAnimatorStateOnDisable: 0
|
||||
m_WriteDefaultValuesOnDisable: 0
|
||||
--- !u!61 &1833154123759965952
|
||||
BoxCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 493245979038171997}
|
||||
m_Enabled: 1
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
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: 1
|
||||
m_UsedByEffector: 0
|
||||
m_UsedByComposite: 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: 0.75, y: 0.9375}
|
||||
newSize: {x: 1, y: 1}
|
||||
adaptiveTilingThreshold: 0.5
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 0.75, y: 0.9375}
|
||||
m_EdgeRadius: 0
|
||||
|
@ -13,7 +13,6 @@ GameObject:
|
||||
- component: {fileID: 4018407283885727215}
|
||||
- component: {fileID: 5337163787054360807}
|
||||
- component: {fileID: 4224870664944535266}
|
||||
- component: {fileID: 3214655307310058165}
|
||||
m_Layer: 0
|
||||
m_Name: Snake
|
||||
m_TagString: Enemy
|
||||
@ -179,41 +178,6 @@ BoxCollider2D:
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 1, y: 0.875}
|
||||
m_EdgeRadius: 0
|
||||
--- !u!58 &3214655307310058165
|
||||
CircleCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 493245979038171997}
|
||||
m_Enabled: 1
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
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: 1
|
||||
m_UsedByEffector: 0
|
||||
m_UsedByComposite: 0
|
||||
m_Offset: {x: -0.0000009536743, y: 0.14860392}
|
||||
serializedVersion: 2
|
||||
m_Radius: 2.1117759
|
||||
--- !u!1 &6199841205034961327
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -7220,11 +7220,11 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6506293507589830987, guid: d89768fad21a147d59156c6b9503b913, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -2.72
|
||||
value: -2.63
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6506293507589830987, guid: d89768fad21a147d59156c6b9503b913, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 22.9
|
||||
value: 23.17
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6506293507589830987, guid: d89768fad21a147d59156c6b9503b913, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
|
@ -27,6 +27,7 @@ public class PlayerBehavior : MonoBehaviour
|
||||
[SerializeField] private StateController stateController;
|
||||
|
||||
Animator animator;
|
||||
[HideInInspector] public bool playerIsAlive = true;
|
||||
|
||||
|
||||
void Start()
|
||||
@ -35,11 +36,12 @@ public class PlayerBehavior : MonoBehaviour
|
||||
stateController = GameObject.Find("StateController").GetComponent<StateController>();
|
||||
animator = GetComponent<Animator>();
|
||||
GameObject.Find("Main Camera").GetComponent<CameraMovement>().player = this.gameObject;
|
||||
playerIsAlive = true;
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
|
||||
if (playerIsAlive) {
|
||||
// throw tambourine
|
||||
// if (Input.GetKeyDown(KeyCode.K)) {
|
||||
if (playerInput.actions["ThrowTambourine"].WasPressedThisFrame())
|
||||
@ -62,6 +64,7 @@ public class PlayerBehavior : MonoBehaviour
|
||||
|
||||
Animate();
|
||||
}
|
||||
}
|
||||
|
||||
void Animate() {
|
||||
// start walking
|
||||
@ -76,6 +79,7 @@ public class PlayerBehavior : MonoBehaviour
|
||||
|
||||
void OnMove(InputValue value)
|
||||
{
|
||||
if (playerIsAlive) {
|
||||
_hInput = value.Get<Vector2>().x;
|
||||
if (_hInput < 0)
|
||||
{
|
||||
@ -91,6 +95,7 @@ public class PlayerBehavior : MonoBehaviour
|
||||
}
|
||||
forward = 1;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -150,7 +155,7 @@ public class PlayerBehavior : MonoBehaviour
|
||||
}
|
||||
else if (col.tag == "instaDeath")
|
||||
{
|
||||
DestroyPlayer();
|
||||
StartCoroutine(DestroyPlayer());
|
||||
}
|
||||
else if (col.tag == "spawnPoint") {
|
||||
stateController.spawnPoint.GetComponent<SpawnPointBehavior>().DeactivateSpawnPoint();
|
||||
@ -182,16 +187,22 @@ public class PlayerBehavior : MonoBehaviour
|
||||
_rb.AddForce(Vector2.up * 8, ForceMode2D.Impulse);
|
||||
collision.gameObject.GetComponent<EnemyPatrol>().DefeatEnemy();
|
||||
} else {
|
||||
DestroyPlayer();
|
||||
StartCoroutine(DestroyPlayer());
|
||||
}
|
||||
}
|
||||
else if (collision.gameObject.tag == "Projectile") {
|
||||
Destroy(collision.gameObject);
|
||||
DestroyPlayer();
|
||||
StartCoroutine(DestroyPlayer());
|
||||
}
|
||||
}
|
||||
|
||||
public void DestroyPlayer() {
|
||||
IEnumerator DestroyPlayer() {
|
||||
playerIsAlive = false;
|
||||
|
||||
// animate
|
||||
animator.Play("Die");
|
||||
yield return new WaitForSeconds(animator.GetCurrentAnimatorStateInfo(0).length);
|
||||
|
||||
this.stateController.SetDeathCanvasActive(true);
|
||||
|
||||
// destroy all tambourines
|
||||
@ -200,6 +211,7 @@ public class PlayerBehavior : MonoBehaviour
|
||||
tambourine.GetComponent<TambourineBehavior>().DestroySelf();
|
||||
}
|
||||
|
||||
yield return new WaitForSeconds(2f);
|
||||
Destroy(this.gameObject);
|
||||
}
|
||||
}
|
||||
|
@ -58,12 +58,16 @@ public class PlayerMovement : MonoBehaviour
|
||||
|
||||
[Header("Layers & Tags")]
|
||||
[SerializeField] private LayerMask _groundLayer;
|
||||
|
||||
[HideInInspector] private PlayerBehavior playerBehavior;
|
||||
#endregion
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
RB = GetComponent<Rigidbody2D>();
|
||||
grapplingRope = this.gameObject.GetComponent<PlayerBehavior>().grapplingRope;
|
||||
playerBehavior = this.gameObject.GetComponent<PlayerBehavior>();
|
||||
grapplingRope = playerBehavior.grapplingRope;
|
||||
|
||||
}
|
||||
|
||||
private void Start()
|
||||
@ -74,13 +78,17 @@ public class PlayerMovement : MonoBehaviour
|
||||
|
||||
void OnMove(InputValue value)
|
||||
{
|
||||
if (playerBehavior.playerIsAlive) {
|
||||
this._moveInput = value.Get<Vector2>();
|
||||
}
|
||||
}
|
||||
|
||||
void OnJump()
|
||||
{
|
||||
if (playerBehavior.playerIsAlive) {
|
||||
OnJumpInput();
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
|
BIN
Assets/Sprites/Characters/Death-Sheet.png
Normal file
BIN
Assets/Sprites/Characters/Death-Sheet.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
432
Assets/Sprites/Characters/Death-Sheet.png.meta
Normal file
432
Assets/Sprites/Characters/Death-Sheet.png.meta
Normal file
@ -0,0 +1,432 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ef839c6d1bbb746a8a3f399806a935a5
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 0
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 2
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 32
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 0
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 1
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites:
|
||||
- serializedVersion: 2
|
||||
name: Death-Sheet_0
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 2
|
||||
y: 0
|
||||
width: 12
|
||||
height: 14
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 5a6cda1adaa9c4717b27053bbec04a3f
|
||||
internalID: -122338556
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Death-Sheet_1
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 35
|
||||
y: 0
|
||||
width: 10
|
||||
height: 14
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: c403411146a66465ca0e6108729d144d
|
||||
internalID: 189834051
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Death-Sheet_2
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 66
|
||||
y: 0
|
||||
width: 11
|
||||
height: 14
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: aaff234f802814ed69a3df2842d8e8fd
|
||||
internalID: -2024555392
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Death-Sheet_3
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 99
|
||||
y: 0
|
||||
width: 10
|
||||
height: 14
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 28d1f48d6f01d46dcb5788ba89048516
|
||||
internalID: 1086045528
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Death-Sheet_4
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 130
|
||||
y: 0
|
||||
width: 12
|
||||
height: 14
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 6375ec11194c24a6d944b350793db612
|
||||
internalID: 884718321
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Death-Sheet_5
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 163
|
||||
y: 0
|
||||
width: 10
|
||||
height: 14
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 798e3137a7cdc499c9a70ad2b80ae280
|
||||
internalID: -460163578
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Death-Sheet_6
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 195
|
||||
y: 0
|
||||
width: 11
|
||||
height: 14
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 9f6ad7b48237a4271a5a543117bc48be
|
||||
internalID: -990243943
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Death-Sheet_7
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 226
|
||||
y: 0
|
||||
width: 11
|
||||
height: 14
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 108a0bb1e00764fd387dca5eb1d8660f
|
||||
internalID: -625216433
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Death-Sheet_8
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 258
|
||||
y: 0
|
||||
width: 11
|
||||
height: 14
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: b4134958e897a44b49c60c0ee071cda9
|
||||
internalID: 323212427
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Death-Sheet_9
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 291
|
||||
y: 0
|
||||
width: 11
|
||||
height: 14
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 27f762f92f016429daa4856df5773742
|
||||
internalID: 565888814
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Death-Sheet_10
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 324
|
||||
y: 0
|
||||
width: 11
|
||||
height: 14
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 0aaa5d5bf792e4931be5043e19318044
|
||||
internalID: 315249131
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Death-Sheet_11
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 359
|
||||
y: 0
|
||||
width: 14
|
||||
height: 10
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 992aa75ecfba744548fabb040a45ae40
|
||||
internalID: -318639155
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Death-Sheet_12
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 391
|
||||
y: 0
|
||||
width: 14
|
||||
height: 10
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: c950b488d79424e76899ad34b9d723dc
|
||||
internalID: 478881412
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Death-Sheet_13
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 423
|
||||
y: 0
|
||||
width: 14
|
||||
height: 10
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 6167d594a48a945f6a3451f4ef804368
|
||||
internalID: 1253964676
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable:
|
||||
Death-Sheet_0: -122338556
|
||||
Death-Sheet_1: 189834051
|
||||
Death-Sheet_10: 315249131
|
||||
Death-Sheet_11: -318639155
|
||||
Death-Sheet_12: 478881412
|
||||
Death-Sheet_13: 1253964676
|
||||
Death-Sheet_2: -2024555392
|
||||
Death-Sheet_3: 1086045528
|
||||
Death-Sheet_4: 884718321
|
||||
Death-Sheet_5: -460163578
|
||||
Death-Sheet_6: -990243943
|
||||
Death-Sheet_7: -625216433
|
||||
Death-Sheet_8: 323212427
|
||||
Death-Sheet_9: 565888814
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Sprites/Items/.DS_Store
vendored
BIN
Assets/Sprites/Items/.DS_Store
vendored
Binary file not shown.
Loading…
Reference in New Issue
Block a user