Explosion effect
This commit is contained in:
parent
ab0f1fccd2
commit
bbf61229ad
@ -72,12 +72,12 @@ SpriteRenderer:
|
|||||||
m_SortingLayerID: 0
|
m_SortingLayerID: 0
|
||||||
m_SortingLayer: 0
|
m_SortingLayer: 0
|
||||||
m_SortingOrder: 0
|
m_SortingOrder: 0
|
||||||
m_Sprite: {fileID: -1807468758588214948, guid: fc9a004f37844d541878fe6e00978d9e, type: 3}
|
m_Sprite: {fileID: 21300000, guid: 1ea3e1dc227afc0768a58ae84d17e6c5, type: 3}
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
m_FlipX: 0
|
m_FlipX: 0
|
||||||
m_FlipY: 0
|
m_FlipY: 0
|
||||||
m_DrawMode: 0
|
m_DrawMode: 0
|
||||||
m_Size: {x: 1, y: 1}
|
m_Size: {x: 1.16, y: 1.15}
|
||||||
m_AdaptiveModeThreshold: 0.5
|
m_AdaptiveModeThreshold: 0.5
|
||||||
m_SpriteTileMode: 0
|
m_SpriteTileMode: 0
|
||||||
m_WasSpriteAssigned: 1
|
m_WasSpriteAssigned: 1
|
||||||
@ -178,6 +178,7 @@ MonoBehaviour:
|
|||||||
damage: 10
|
damage: 10
|
||||||
moveSpeed: 0.02
|
moveSpeed: 0.02
|
||||||
characterSprite: {fileID: 1199223373439478175}
|
characterSprite: {fileID: 1199223373439478175}
|
||||||
|
characterAnimator: {fileID: 0}
|
||||||
--- !u!50 &3826968412464473223
|
--- !u!50 &3826968412464473223
|
||||||
Rigidbody2D:
|
Rigidbody2D:
|
||||||
serializedVersion: 4
|
serializedVersion: 4
|
||||||
|
@ -74,6 +74,7 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
characterObject: {fileID: 0}
|
characterObject: {fileID: 0}
|
||||||
overMind: {fileID: 0}
|
overMind: {fileID: 0}
|
||||||
|
mobSprite: {fileID: 6540482753690656168}
|
||||||
moveSpeed: 0
|
moveSpeed: 0
|
||||||
health: 0
|
health: 0
|
||||||
damage: 0
|
damage: 0
|
||||||
|
@ -9,8 +9,8 @@ public class Mob : MonoBehaviour
|
|||||||
{
|
{
|
||||||
[SerializeField] private GameObject characterObject;
|
[SerializeField] private GameObject characterObject;
|
||||||
[SerializeField] private OverMind overMind;
|
[SerializeField] private OverMind overMind;
|
||||||
[SerializeField] private Sprite mobAnimController;
|
[SerializeField] private GameObject mobSprite;
|
||||||
[SerializeField] private Sprite mobDeathAnimController;
|
private Animator mobAnimator;
|
||||||
|
|
||||||
[SerializeField] private float moveSpeed;
|
[SerializeField] private float moveSpeed;
|
||||||
[SerializeField] private float health;
|
[SerializeField] private float health;
|
||||||
@ -21,6 +21,11 @@ public class Mob : MonoBehaviour
|
|||||||
|
|
||||||
[SerializeField] private TextMesh healthText;
|
[SerializeField] private TextMesh healthText;
|
||||||
|
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
mobAnimator = mobSprite.GetComponent<Animator>();
|
||||||
|
}
|
||||||
|
|
||||||
public void ApplyDamage(float damage)
|
public void ApplyDamage(float damage)
|
||||||
{
|
{
|
||||||
health -= damage;
|
health -= damage;
|
||||||
@ -84,14 +89,21 @@ void OnTriggerEnter2D(Collider2D col)
|
|||||||
if (col.gameObject.CompareTag("Character"))
|
if (col.gameObject.CompareTag("Character"))
|
||||||
{
|
{
|
||||||
characterObject.GetComponent<Character>().SendMessage("ApplyDamage", damage);
|
characterObject.GetComponent<Character>().SendMessage("ApplyDamage", damage);
|
||||||
|
|
||||||
// mobAnimController = mobDeathAnimController;
|
mobAnimator.SetBool("IsDeath", true);
|
||||||
overMind.DeathGoToPull(gameObject);
|
StartCoroutine(waiter());
|
||||||
|
//overMind.DeathGoToPull(gameObject);
|
||||||
}
|
}
|
||||||
// Debug.Log("PIZDAAAAAA");
|
// Debug.Log("PIZDAAAAAA");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IEnumerator waiter()
|
||||||
|
{
|
||||||
|
yield return new WaitForSecondsRealtime(0.5f);
|
||||||
|
overMind.DeathGoToPull(gameObject);
|
||||||
|
}
|
||||||
|
|
||||||
public void SetupMob(OverMind.MobParameters mobParameters)
|
public void SetupMob(OverMind.MobParameters mobParameters)
|
||||||
{
|
{
|
||||||
characterObject = mobParameters.Character;
|
characterObject = mobParameters.Character;
|
||||||
|
@ -70,7 +70,7 @@ TextureImporter:
|
|||||||
spriteMeshType: 1
|
spriteMeshType: 1
|
||||||
alignment: 0
|
alignment: 0
|
||||||
spritePivot: {x: 0.5, y: 0.5}
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
spritePixelsToUnits: 100
|
spritePixelsToUnits: 32
|
||||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
spriteGenerateFallbackPhysicsShape: 1
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
alphaUsage: 1
|
alphaUsage: 1
|
||||||
|
89
ldjam50/Assets/Sprites/Effects/ExplAnimation.anim
Normal file
89
ldjam50/Assets/Sprites/Effects/ExplAnimation.anim
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
%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: ExplAnimation
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Legacy: 0
|
||||||
|
m_Compressed: 0
|
||||||
|
m_UseHighQualityCurve: 1
|
||||||
|
m_RotationCurves: []
|
||||||
|
m_CompressedRotationCurves: []
|
||||||
|
m_EulerCurves: []
|
||||||
|
m_PositionCurves: []
|
||||||
|
m_ScaleCurves: []
|
||||||
|
m_FloatCurves: []
|
||||||
|
m_PPtrCurves:
|
||||||
|
- curve:
|
||||||
|
- time: 0
|
||||||
|
value: {fileID: 4455830272222587326, guid: f9067497a04eb314cb36ade16f7816c0, type: 3}
|
||||||
|
- time: 0.06666667
|
||||||
|
value: {fileID: 8855754954285246910, guid: f9067497a04eb314cb36ade16f7816c0, type: 3}
|
||||||
|
- time: 0.13333334
|
||||||
|
value: {fileID: -5608497299007999723, guid: f9067497a04eb314cb36ade16f7816c0, type: 3}
|
||||||
|
- time: 0.2
|
||||||
|
value: {fileID: 5140774079673320405, guid: f9067497a04eb314cb36ade16f7816c0, type: 3}
|
||||||
|
- time: 0.26666668
|
||||||
|
value: {fileID: -7448463022687376513, guid: f9067497a04eb314cb36ade16f7816c0, type: 3}
|
||||||
|
- time: 0.33333334
|
||||||
|
value: {fileID: 7781227294636230676, guid: f9067497a04eb314cb36ade16f7816c0, type: 3}
|
||||||
|
- time: 0.4
|
||||||
|
value: {fileID: -5688838636644343198, guid: f9067497a04eb314cb36ade16f7816c0, type: 3}
|
||||||
|
- time: 0.46666667
|
||||||
|
value: {fileID: 5139373333517102986, guid: f9067497a04eb314cb36ade16f7816c0, type: 3}
|
||||||
|
attribute: m_Sprite
|
||||||
|
path:
|
||||||
|
classID: 212
|
||||||
|
script: {fileID: 0}
|
||||||
|
m_SampleRate: 60
|
||||||
|
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
|
||||||
|
pptrCurveMapping:
|
||||||
|
- {fileID: 4455830272222587326, guid: f9067497a04eb314cb36ade16f7816c0, type: 3}
|
||||||
|
- {fileID: 8855754954285246910, guid: f9067497a04eb314cb36ade16f7816c0, type: 3}
|
||||||
|
- {fileID: -5608497299007999723, guid: f9067497a04eb314cb36ade16f7816c0, type: 3}
|
||||||
|
- {fileID: 5140774079673320405, guid: f9067497a04eb314cb36ade16f7816c0, type: 3}
|
||||||
|
- {fileID: -7448463022687376513, guid: f9067497a04eb314cb36ade16f7816c0, type: 3}
|
||||||
|
- {fileID: 7781227294636230676, guid: f9067497a04eb314cb36ade16f7816c0, type: 3}
|
||||||
|
- {fileID: -5688838636644343198, guid: f9067497a04eb314cb36ade16f7816c0, type: 3}
|
||||||
|
- {fileID: 5139373333517102986, guid: f9067497a04eb314cb36ade16f7816c0, type: 3}
|
||||||
|
m_AnimationClipSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||||
|
m_AdditiveReferencePoseTime: 0
|
||||||
|
m_StartTime: 0
|
||||||
|
m_StopTime: 0.48333335
|
||||||
|
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
ldjam50/Assets/Sprites/Effects/ExplAnimation.anim.meta
Normal file
8
ldjam50/Assets/Sprites/Effects/ExplAnimation.anim.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f4b517d0e48d6aaa5ae0b063c62202e7
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 7400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -10,7 +10,8 @@ AnimatorState:
|
|||||||
m_Name: Run
|
m_Name: Run
|
||||||
m_Speed: 1
|
m_Speed: 1
|
||||||
m_CycleOffset: 0
|
m_CycleOffset: 0
|
||||||
m_Transitions: []
|
m_Transitions:
|
||||||
|
- {fileID: 319439843011162356}
|
||||||
m_StateMachineBehaviours: []
|
m_StateMachineBehaviours: []
|
||||||
m_Position: {x: 50, y: 50, z: 0}
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
m_IKOnFeet: 0
|
m_IKOnFeet: 0
|
||||||
@ -34,7 +35,13 @@ AnimatorController:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_Name: StandartEnemyAnimController
|
m_Name: StandartEnemyAnimController
|
||||||
serializedVersion: 5
|
serializedVersion: 5
|
||||||
m_AnimatorParameters: []
|
m_AnimatorParameters:
|
||||||
|
- m_Name: IsDeath
|
||||||
|
m_Type: 4
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 0}
|
||||||
m_AnimatorLayers:
|
m_AnimatorLayers:
|
||||||
- serializedVersion: 5
|
- serializedVersion: 5
|
||||||
m_Name: Base Layer
|
m_Name: Base Layer
|
||||||
@ -48,6 +55,57 @@ AnimatorController:
|
|||||||
m_IKPass: 0
|
m_IKPass: 0
|
||||||
m_SyncedLayerAffectsTiming: 0
|
m_SyncedLayerAffectsTiming: 0
|
||||||
m_Controller: {fileID: 9100000}
|
m_Controller: {fileID: 9100000}
|
||||||
|
--- !u!1101 &319439843011162356
|
||||||
|
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: IsDeath
|
||||||
|
m_EventTreshold: 0
|
||||||
|
m_DstStateMachine: {fileID: 0}
|
||||||
|
m_DstState: {fileID: 1633349003487912558}
|
||||||
|
m_Solo: 0
|
||||||
|
m_Mute: 0
|
||||||
|
m_IsExit: 0
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TransitionDuration: 0.25
|
||||||
|
m_TransitionOffset: 0
|
||||||
|
m_ExitTime: 0.5
|
||||||
|
m_HasExitTime: 1
|
||||||
|
m_HasFixedDuration: 1
|
||||||
|
m_InterruptionSource: 0
|
||||||
|
m_OrderedInterruption: 1
|
||||||
|
m_CanTransitionToSelf: 1
|
||||||
|
--- !u!1102 &1633349003487912558
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 6
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: ExplAnimation
|
||||||
|
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: f4b517d0e48d6aaa5ae0b063c62202e7, type: 2}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
--- !u!1107 &8214928845230017319
|
--- !u!1107 &8214928845230017319
|
||||||
AnimatorStateMachine:
|
AnimatorStateMachine:
|
||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
@ -60,6 +118,9 @@ AnimatorStateMachine:
|
|||||||
- serializedVersion: 1
|
- serializedVersion: 1
|
||||||
m_State: {fileID: -1351690705070559544}
|
m_State: {fileID: -1351690705070559544}
|
||||||
m_Position: {x: 280, y: 110, z: 0}
|
m_Position: {x: 280, y: 110, z: 0}
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1633349003487912558}
|
||||||
|
m_Position: {x: 280, y: -40, z: 0}
|
||||||
m_ChildStateMachines: []
|
m_ChildStateMachines: []
|
||||||
m_AnyStateTransitions: []
|
m_AnyStateTransitions: []
|
||||||
m_EntryTransitions: []
|
m_EntryTransitions: []
|
||||||
|
Loading…
Reference in New Issue
Block a user