Shield spell enter and exit animation

This commit is contained in:
joonasp 2022-05-02 12:15:46 +03:00
parent 9e3bb66973
commit ea08d2704f
14 changed files with 1088 additions and 755 deletions

View File

@ -0,0 +1,134 @@
%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: Shield_exit_anim
serializedVersion: 6
m_Legacy: 1
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: {x: 1, y: 1, z: 1}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
weightedMode: 0
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
- serializedVersion: 3
time: 0.25
value: {x: 0, y: 0, z: 1}
inSlope: {x: -6.4939423, y: -6.575429, z: 0}
outSlope: {x: -6.4939423, y: -6.575429, z: 0}
tangentMode: 0
weightedMode: 0
inWeight: {x: 0.108208954, y: 0.08768654, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
path:
m_FloatCurves: []
m_PPtrCurves: []
m_SampleRate: 60
m_WrapMode: 1
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings: []
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 0.25
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 1
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:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.25
value: 0
inSlope: -6.4939423
outSlope: -6.4939423
tangentMode: 0
weightedMode: 0
inWeight: 0.108208954
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalScale.x
path:
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.25
value: 0
inSlope: -6.575429
outSlope: -6.575429
tangentMode: 0
weightedMode: 0
inWeight: 0.08768654
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalScale.y
path:
classID: 4
script: {fileID: 0}
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_Events: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: cd1512060f5701d43ac6357d4bcafd06
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,161 @@
%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: Shield_init_anim
serializedVersion: 6
m_Legacy: 1
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: {x: 0, y: 0, z: 1}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
weightedMode: 0
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
- serializedVersion: 3
time: 0.33333334
value: {x: 1.1, y: 1.1, z: 1}
inSlope: {x: 9.488643, y: 0, z: 0}
outSlope: {x: -5.271774, y: 0, z: 0}
tangentMode: 0
weightedMode: 0
inWeight: {x: 0.03731346, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.124067195, y: 0.33333334, z: 0.33333334}
- serializedVersion: 3
time: 0.5
value: {x: 1, y: 1, z: 1}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
weightedMode: 0
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
path:
m_FloatCurves: []
m_PPtrCurves: []
m_SampleRate: 60
m_WrapMode: 1
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings: []
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 0.5
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 1
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:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 1.1
inSlope: 9.488643
outSlope: -5.271774
tangentMode: 1
weightedMode: 0
inWeight: 0.03731346
outWeight: 0.124067195
- serializedVersion: 3
time: 0.5
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalScale.x
path:
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.33333334
value: 1.1
inSlope: 0
outSlope: 0
tangentMode: 1
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.5
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalScale.y
path:
classID: 4
script: {fileID: 0}
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_Events: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 23150fe44169b164cb20023a6fe36bd4
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -46,6 +46,7 @@ GameObject:
- component: {fileID: 3268723311598239928}
- component: {fileID: 7564575873016353892}
- component: {fileID: 3597675138378626114}
- component: {fileID: 5089910899482564357}
m_Layer: 0
m_Name: shield_spell
m_TagString: Untagged
@ -63,7 +64,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0.7071068, z: 0.7071068, w: 0}
m_LocalPosition: {x: 26.388, y: 4.077, z: 49.415}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_ConstrainProportionsScale: 1
m_Children:
- {fileID: 8009436372187810761}
m_Father: {fileID: 0}
@ -147,6 +148,23 @@ MonoBehaviour:
health: 5
startColor: {r: 0.019607844, g: 0.77254903, b: 0.77254903, a: 0}
endColor: {r: 0.8666667, g: 0.43137255, b: 0.13333334, a: 0}
--- !u!111 &5089910899482564357
Animation:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3917053023338471789}
m_Enabled: 1
serializedVersion: 3
m_Animation: {fileID: 0}
m_Animations:
- {fileID: 7400000, guid: 23150fe44169b164cb20023a6fe36bd4, type: 2}
- {fileID: 7400000, guid: cd1512060f5701d43ac6357d4bcafd06, type: 2}
m_WrapMode: 0
m_PlayAutomatically: 0
m_AnimatePhysics: 0
m_CullingType: 0
--- !u!1 &4435714647248106357
GameObject:
m_ObjectHideFlags: 0

View File

@ -13,7 +13,7 @@ public class ShieldController : MonoBehaviour
// Start is called before the first frame update
void Start()
{
GetComponent<Animation>().Play("Shield_init_anim");
}
// Update is called once per frame
@ -21,6 +21,10 @@ public class ShieldController : MonoBehaviour
{
health -= Time.deltaTime;
GetComponent<Renderer>().material.SetColor("_Color0", Color.Lerp(endColor, startColor, health / 5));
if (health <= 0) Destroy(gameObject);
if (health <= 0)
{
GetComponent<Animation>().Play("Shield_exit_anim");
Destroy(gameObject, 0.25f);
}
}
}

File diff suppressed because one or more lines are too long

View File

@ -90,19 +90,19 @@ Material:
- _HorizonCloudSize: 4.91
- _HorizonCloudStartPosition: -0.1
- _HorizonCloudStep: 25
- _HorizonExponent: 4.1691785
- _HorizonExponent: 3.448133
- _HorizonStep: 500
- _HorizonThickness: 1
- _MoonGlow: 0
- _MoonLightIntensity: 0.00017622078
- _MoonLightIntensity: 0.000015899539
- _MoonSize: 0
- _MoonSoftEdge: 0
- _OverheadCloudAltitude: 1000
- _OverheadCloudAnimationSpeed: 50
- _OverheadCloudFlowDirectionX: 1
- _OverheadCloudFlowDirectionZ: 1
- _OverheadCloudRemapMax: 1.4958706
- _OverheadCloudRemapMin: 0.3526882
- _OverheadCloudRemapMax: 1.0972334
- _OverheadCloudRemapMin: 0.12990488
- _OverheadCloudSize: 10
- _OverheadCloudStep: 2
- _StarsDensity0: 0.4
@ -121,25 +121,25 @@ Material:
- _StarsTwinkle1: 6
- _StarsTwinkle2: 2
- _SunGlow: 0.45
- _SunLightIntensity: 0.62095404
- _SunLightIntensity: 0.25083867
- _SunSize: 0.1
- _SunSoftEdge: 0.5
m_Colors:
- _DetailOverlayTintColor: {r: 0, g: 0, b: 0, a: 0}
- _FogColor: {r: 0, g: 0, b: 0, a: 0}
- _GroundColor: {r: 0.4457633, g: 0.4334339, b: 0.45731536, a: 1}
- _GroundColor: {r: 0.41291976, g: 0.39312416, b: 0.4314673, a: 1}
- _HorizonCloudColor: {r: 1, g: 1, b: 1, a: 1}
- _HorizonColor: {r: 0.8762395, g: 0.81486887, b: 0.77355707, a: 1}
- _HorizonColor: {r: 0.90433806, g: 0.85606474, b: 0.74898267, a: 1}
- _MoonColor: {r: 1, g: 1, b: 1, a: 0}
- _MoonDirection: {r: 1, g: 1, b: 1, a: 0}
- _MoonLightColor: {r: 0, g: 0, b: 0, a: 0}
- _OverheadCloudColor: {r: 1, g: 1, b: 1, a: 0.97012275}
- _SkyColor: {r: 0.25902987, g: 0.4917671, b: 0.74635017, a: 1}
- _OverheadCloudColor: {r: 1, g: 1, b: 1, a: 0.96808887}
- _SkyColor: {r: 0.21055394, g: 0.36771357, b: 0.60376364, a: 1}
- _StarsColor0: {r: 0.96470594, g: 0.9450981, b: 0.76470596, a: 1}
- _StarsColor1: {r: 1, g: 0.5294118, b: 0.93725497, a: 1}
- _StarsColor2: {r: 0, g: 0.92549026, b: 1, a: 1}
- _SunColor: {r: 0.9716981, g: 0.9210394, b: 0.8350939, a: 1}
- _SunDirection: {r: 0, g: -0.70404243, b: -0.7101579, a: 0}
- _SunColor: {r: 0.97367364, g: 0.9302338, b: 0.85855806, a: 1}
- _SunDirection: {r: 0, g: -0.29832366, b: 0.9544648, a: 0}
- _SunLightColor: {r: 1, g: 0.9929226, b: 0.9009434, a: 1}
m_BuildTextureStacks: []
--- !u!114 &11400000

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -27,17 +27,17 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ColorBlend:
m_Texture: {fileID: 7456290685125856298, guid: b6bbea2e1167a7346822545139402874,
m_Texture: {fileID: 7949313181305387792, guid: b6bbea2e1167a7346822545139402874,
type: 2}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ColorByHeight:
m_Texture: {fileID: 2248768272629647636, guid: b6bbea2e1167a7346822545139402874,
m_Texture: {fileID: 6125799598916057514, guid: b6bbea2e1167a7346822545139402874,
type: 2}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ColorByNormal:
m_Texture: {fileID: -7938075955928687590, guid: b6bbea2e1167a7346822545139402874,
m_Texture: {fileID: 2224532881430876303, guid: b6bbea2e1167a7346822545139402874,
type: 2}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}

View File

@ -40,17 +40,17 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ColorBlend:
m_Texture: {fileID: 767291628836685161, guid: 726ce83d589353742be6b48ff467fc48,
m_Texture: {fileID: -8934127479932439888, guid: 726ce83d589353742be6b48ff467fc48,
type: 2}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ColorByHeight:
m_Texture: {fileID: 7997353186840245270, guid: 726ce83d589353742be6b48ff467fc48,
m_Texture: {fileID: -1855763798676332792, guid: 726ce83d589353742be6b48ff467fc48,
type: 2}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ColorByNormal:
m_Texture: {fileID: 6872799764589425766, guid: 726ce83d589353742be6b48ff467fc48,
m_Texture: {fileID: -4675251007966098766, guid: 726ce83d589353742be6b48ff467fc48,
type: 2}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}

View File

@ -40,17 +40,17 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ColorBlend:
m_Texture: {fileID: -8847798395119912451, guid: 7f589c682d367b442b8cf75918f5aa55,
m_Texture: {fileID: 5328951821386129616, guid: 7f589c682d367b442b8cf75918f5aa55,
type: 2}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ColorByHeight:
m_Texture: {fileID: 1851559862776582919, guid: 7f589c682d367b442b8cf75918f5aa55,
m_Texture: {fileID: 7890751047339745244, guid: 7f589c682d367b442b8cf75918f5aa55,
type: 2}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ColorByNormal:
m_Texture: {fileID: 7196581625871503670, guid: 7f589c682d367b442b8cf75918f5aa55,
m_Texture: {fileID: 2157036223387729760, guid: 7f589c682d367b442b8cf75918f5aa55,
type: 2}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}