From c31747bc198050a7ea53b82395f84dc1f13ef067 Mon Sep 17 00:00:00 2001 From: henriquenakashima Date: Fri, 25 Sep 2020 20:45:12 -0400 Subject: [PATCH] Add hit animation --- Assets/Battle/BattleController.cs | 10 +- Assets/Battle/BattleParticipant.cs | 8 + Assets/Battle/BattleParticipantSprite.cs | 22 +- Assets/Battle/BattleScene.unity | 3 + Assets/Battle/Graphics.meta | 8 + Assets/Battle/Graphics/HitAnimation.anim | 152 +++++++++++ Assets/Battle/Graphics/HitAnimation.anim.meta | 8 + Assets/Battle/Graphics/HitEffectMaterial.mat | 246 ++++++++++++++++++ .../Graphics/HitEffectMaterial.mat.meta | 8 + .../ParticipantAnimationController.controller | 124 +++++++++ ...icipantAnimationController.controller.meta | 8 + 11 files changed, 592 insertions(+), 5 deletions(-) create mode 100644 Assets/Battle/Graphics.meta create mode 100644 Assets/Battle/Graphics/HitAnimation.anim create mode 100644 Assets/Battle/Graphics/HitAnimation.anim.meta create mode 100644 Assets/Battle/Graphics/HitEffectMaterial.mat create mode 100644 Assets/Battle/Graphics/HitEffectMaterial.mat.meta create mode 100644 Assets/Battle/Graphics/ParticipantAnimationController.controller create mode 100644 Assets/Battle/Graphics/ParticipantAnimationController.controller.meta diff --git a/Assets/Battle/BattleController.cs b/Assets/Battle/BattleController.cs index c654245..60b487a 100644 --- a/Assets/Battle/BattleController.cs +++ b/Assets/Battle/BattleController.cs @@ -11,6 +11,8 @@ public class BattleController : MonoBehaviour, IBattleEffectApplier, IBattleEffe public BattlePlayerControls battlePlayerControls; public EnergyUI heroEnergyUI; public EnergyUI monsterEnergyUI; + public Material hitEffectMaterial; + public RuntimeAnimatorController runtimeAnimatorController; // Private private HeroCardDatabase heroCardDatabase; @@ -98,7 +100,7 @@ public class BattleController : MonoBehaviour, IBattleEffectApplier, IBattleEffe this.monsterCardDatabase = new MonsterCardDatabase(); this.state = new BattleState(); - + this.heroEnergy = new EnergyPool(); this.heroEnergyUI.Init(this.heroEnergy); this.heroEnergy.OnEnergyChanged += this.heroEnergyUI.NotifyEnergyChanged; @@ -123,8 +125,9 @@ public class BattleController : MonoBehaviour, IBattleEffectApplier, IBattleEffe sprite.name = "Hero" + i + "_Sprite"; PositionSprite(TeamChoice.Heroes, sprite, i); BattleParticipantSprite bps = sprite.AddComponent(); - bps.Init(battlePlayerControls, hero); + bps.Init(battlePlayerControls, hero, this.hitEffectMaterial, this.runtimeAnimatorController); bps.OnSpriteClicked += battlePlayerControls.NotifyParticipantSpriteClicked; + hero.OnHit += bps.NotifyHit; hero.OnDeath += bps.NotifyDeath; HeroInfoUI heroUI = (HeroInfoUI) Instantiate(this.heroUIPrefab.gameObject, this.uiCanvas.transform).GetComponent(typeof(HeroInfoUI)); @@ -147,8 +150,9 @@ public class BattleController : MonoBehaviour, IBattleEffectApplier, IBattleEffe sprite.name = "Monster" + i + "_Sprite"; PositionSprite(TeamChoice.Monsters, sprite, i); BattleParticipantSprite bps = sprite.AddComponent(); - bps.Init(battlePlayerControls, monster); + bps.Init(battlePlayerControls, monster, this.hitEffectMaterial, this.runtimeAnimatorController); bps.OnSpriteClicked += battlePlayerControls.NotifyParticipantSpriteClicked; + monster.OnHit += bps.NotifyHit; monster.OnDeath += bps.NotifyDeath; HeroInfoUI monsterUI = (HeroInfoUI) Instantiate(this.heroUIPrefab.gameObject, this.uiCanvas.transform).GetComponent(typeof(HeroInfoUI)); diff --git a/Assets/Battle/BattleParticipant.cs b/Assets/Battle/BattleParticipant.cs index 8c4befe..977b6b9 100644 --- a/Assets/Battle/BattleParticipant.cs +++ b/Assets/Battle/BattleParticipant.cs @@ -6,6 +6,7 @@ using UnityEngine; public class BattleParticipant { public delegate void BattleParticipantUpdateAction(BattleParticipant participant); + public event BattleParticipantUpdateAction OnHit; public event BattleParticipantUpdateAction OnDeath; public event BattleParticipantUpdateAction OnStatusChanged; @@ -50,6 +51,7 @@ public class BattleParticipant } damage = Math.Min(this.hp, damage); this.hp -= damage; + TriggerOnHit(); return damage; } @@ -94,6 +96,12 @@ public class BattleParticipant } } + private void TriggerOnHit() { + if (this.OnHit != null) { + this.OnHit(this); + } + } + private void TriggerOnDeath() { if (this.OnDeath != null) { this.OnDeath(this); diff --git a/Assets/Battle/BattleParticipantSprite.cs b/Assets/Battle/BattleParticipantSprite.cs index 3326124..66ae56d 100644 --- a/Assets/Battle/BattleParticipantSprite.cs +++ b/Assets/Battle/BattleParticipantSprite.cs @@ -9,17 +9,24 @@ public class BattleParticipantSprite : MonoBehaviour private BattlePlayerControls playerControls; private BattleParticipant participant; + private RuntimeAnimatorController animatorController; + private bool removedFromBattle; - public void Init(BattlePlayerControls playerControls, BattleParticipant participant) { + public void Init(BattlePlayerControls playerControls, BattleParticipant participant, + Material hitEffectMaterial, RuntimeAnimatorController animatorController) { this.playerControls = playerControls; this.participant = participant; + this.animatorController = animatorController; this.removedFromBattle = false; + this.GetComponent().material = hitEffectMaterial; } // Start is called before the first frame update void Start() { gameObject.AddComponent(); + Animator animator = gameObject.AddComponent(); + animator.runtimeAnimatorController = this.animatorController; } // Update is called once per frame @@ -58,7 +65,7 @@ public class BattleParticipantSprite : MonoBehaviour public void NotifyDeath(BattleParticipant deadParticipant) { if (deadParticipant != this.participant) { throw new System.InvalidOperationException( - "BattleParticipantSprite received NotifyDeath from another battle participant."); + "BattleParticipantSprite received NotifyDeath for another battle participant."); } if (!this.removedFromBattle) { @@ -69,4 +76,15 @@ public class BattleParticipantSprite : MonoBehaviour this.removedFromBattle = true; } } + public void NotifyHit(BattleParticipant deadParticipant) { + if (deadParticipant != this.participant) { + throw new System.InvalidOperationException( + "BattleParticipantSprite received NotifyHit for another battle participant."); + } + + if (!this.removedFromBattle) { + Animator animator = gameObject.GetComponent(); + animator.Play("Hit"); + } + } } diff --git a/Assets/Battle/BattleScene.unity b/Assets/Battle/BattleScene.unity index 0885e25..070a4bb 100644 --- a/Assets/Battle/BattleScene.unity +++ b/Assets/Battle/BattleScene.unity @@ -309,6 +309,9 @@ MonoBehaviour: battlePlayerControls: {fileID: 1436154611} heroEnergyUI: {fileID: 24180901} monsterEnergyUI: {fileID: 431798876} + hitEffectMaterial: {fileID: 2100000, guid: 84af70f1d60046647beff4822e5ff5f5, type: 2} + runtimeAnimatorController: {fileID: 9100000, guid: 3a09330fb418c6143b71858d1f2a4255, + type: 2} --- !u!4 &359124401 Transform: m_ObjectHideFlags: 0 diff --git a/Assets/Battle/Graphics.meta b/Assets/Battle/Graphics.meta new file mode 100644 index 0000000..6e3af36 --- /dev/null +++ b/Assets/Battle/Graphics.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 98ab50d19cd6c2a479e8ec62c8387065 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Battle/Graphics/HitAnimation.anim b/Assets/Battle/Graphics/HitAnimation.anim new file mode 100644 index 0000000..3312db3 --- /dev/null +++ b/Assets/Battle/Graphics/HitAnimation.anim @@ -0,0 +1,152 @@ +%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: HitAnimation + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: [] + m_ScaleCurves: [] + m_FloatCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.003175307 + inSlope: 6.6172843 + outSlope: Infinity + tangentMode: 97 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.033333335 + value: 0.99937946 + inSlope: 0.15729958 + outSlope: 0.15729958 + tangentMode: 1 + weightedMode: 0 + inWeight: 0.10925299 + outWeight: 0.020041859 + - serializedVersion: 3 + time: 0.21666667 + value: 0.012205221 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.33333334 + value: 0.0027275383 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: material._HitEffectBlend + path: + classID: 212 + script: {fileID: 0} + m_PPtrCurves: [] + 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: 2333048903 + script: {fileID: 0} + typeID: 212 + customType: 22 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 0.33333334 + 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.003175307 + inSlope: 6.6172843 + outSlope: Infinity + tangentMode: 97 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.033333335 + value: 0.99937946 + inSlope: 0.15729958 + outSlope: 0.15729958 + tangentMode: 1 + weightedMode: 0 + inWeight: 0.10925299 + outWeight: 0.020041859 + - serializedVersion: 3 + time: 0.21666667 + value: 0.012205221 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.33333334 + value: 0.0027275383 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: material._HitEffectBlend + path: + classID: 212 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/Battle/Graphics/HitAnimation.anim.meta b/Assets/Battle/Graphics/HitAnimation.anim.meta new file mode 100644 index 0000000..c5a6ed2 --- /dev/null +++ b/Assets/Battle/Graphics/HitAnimation.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e3c3cd15801c823429e6633a50e9afc3 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Battle/Graphics/HitEffectMaterial.mat b/Assets/Battle/Graphics/HitEffectMaterial.mat new file mode 100644 index 0000000..e42347b --- /dev/null +++ b/Assets/Battle/Graphics/HitEffectMaterial.mat @@ -0,0 +1,246 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: HitEffectMaterial + m_Shader: {fileID: 4800000, guid: a36b7719ff0465b42ab1407d67672c5f, type: 3} + m_ShaderKeywords: ETC1_EXTERNAL_ALPHA HITEFFECT_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ColorRampTex: + m_Texture: {fileID: 2800000, guid: 279657edc397ece4b8029c727adf6ddc, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ColorSwapTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortTex: + m_Texture: {fileID: 2800000, guid: 7aad8c583ef292e48b06af0d1f2fab97, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FadeBurnTex: + m_Texture: {fileID: 2800000, guid: 677cca399782dea41aedc1d292ecb67d, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FadeTex: + m_Texture: {fileID: 2800000, guid: 7aad8c583ef292e48b06af0d1f2fab97, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlowTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OutlineDistortTex: + m_Texture: {fileID: 2800000, guid: 7aad8c583ef292e48b06af0d1f2fab97, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OutlineTex: + m_Texture: {fileID: 2800000, guid: 74087f6d03f233e4a8a142fa01f9e5cf, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ShineMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _Alpha: 1 + - _AlphaCutoffValue: 0.25 + - _BillboardY: 0 + - _BlurHD: 0 + - _BlurIntensity: 10 + - _BumpScale: 1 + - _ChromAberrAlpha: 0.4 + - _ChromAberrAmount: 1 + - _ClipUvDown: 0 + - _ClipUvLeft: 0 + - _ClipUvRight: 0 + - _ClipUvUp: 0 + - _ColorChangeLuminosity: 0 + - _ColorChangeTolerance: 0.25 + - _ColorRampLuminosity: 0 + - _ColorRampOutline: 0 + - _ColorSwapBlueLuminosity: 0.5 + - _ColorSwapGreenLuminosity: 0.5 + - _ColorSwapRedLuminosity: 0.5 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DistortAmount: 0.5 + - _DistortTexXSpeed: 5 + - _DistortTexYSpeed: 5 + - _DstBlend: 0 + - _FadeAmount: -0.1 + - _FadeBurnGlow: 2 + - _FadeBurnTransition: 0.075 + - _FadeBurnWidth: 0.025 + - _FishEyeUvAmount: 0.35 + - _FlickerAlpha: 0 + - _FlickerFreq: 0.2 + - _FlickerPercent: 0.05 + - _GhostColorBoost: 1 + - _GhostTransparency: 0 + - _GlitchAmount: 3 + - _GlitchSize: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Glow: 10 + - _GlowTexUsed: 0 + - _GradBlend: 1 + - _GrassManualAnim: 1 + - _GrassManualToggle: 0 + - _GrassSpeed: 2 + - _GrassWind: 20 + - _GreyscaleLuminosity: 0 + - _GreyscaleOutline: 0 + - _HandDrawnAmount: 10 + - _HandDrawnSpeed: 5 + - _HitEffectBlend: 0 + - _HitEffectGlow: 5 + - _HologramMaxAlpha: 1 + - _HologramMinAlpha: 0 + - _HologramStripesAmount: 0.2 + - _HologramStripesSpeed: 5 + - _HologramUnmodAmount: 0.4 + - _HsvBright: 1 + - _HsvSaturation: 1 + - _HsvShift: 180 + - _InnerOutlineAlpha: 1 + - _InnerOutlineGlow: 1 + - _InnerOutlineThickness: 1 + - _MaxXUV: 1 + - _MaxYUV: 1 + - _Metallic: 0 + - _MinXUV: 0 + - _MinYUV: 0 + - _Mode: 0 + - _MotionBlurAngle: 0.1 + - _MotionBlurDist: 1.25 + - _MyDstMode: 10 + - _MySrcMode: 5 + - _NegativeAmount: 1 + - _OcclusionStrength: 1 + - _OffsetUvX: 0 + - _OffsetUvY: 0 + - _OnlyInnerOutline: 0 + - _OnlyOutline: 0 + - _Outline8Directions: 0 + - _OutlineAlpha: 1 + - _OutlineDistortAmount: 0.5 + - _OutlineDistortTexXSpeed: 5 + - _OutlineDistortTexYSpeed: 5 + - _OutlineDistortToggle: 0 + - _OutlineGlow: 1.5 + - _OutlineIsPixel: 0 + - _OutlinePixelWidth: 1 + - _OutlineTexGrey: 0 + - _OutlineTexToggle: 0 + - _OutlineTexXSpeed: 10 + - _OutlineTexYSpeed: 0 + - _OutlineWidth: 0.004 + - _Parallax: 0.02 + - _PinchUvAmount: 0.35 + - _PixelateSize: 32 + - _PosterizeGamma: 0.75 + - _PosterizeNumColors: 8 + - _PosterizeOutline: 0 + - _RandomSeed: 0 + - _RectSize: 1 + - _RotateUvAmount: 0 + - _RoundWaveSpeed: 2 + - _RoundWaveStrength: 0.7 + - _ShadowAlpha: 0.5 + - _ShadowX: 0.1 + - _ShadowY: -0.05 + - _ShakeUvSpeed: 2.5 + - _ShakeUvX: 1.5 + - _ShakeUvY: 1 + - _ShineGlow: 1 + - _ShineLocation: 0.5 + - _ShineWidth: 0.1 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _TextureScrollXSpeed: 1 + - _TextureScrollYSpeed: 0 + - _TwistUvAmount: 1 + - _TwistUvPosX: 0.5 + - _TwistUvPosY: 0.5 + - _TwistUvRadius: 0.75 + - _UVSec: 0 + - _WaveAmount: 7 + - _WaveSpeed: 10 + - _WaveStrength: 7.5 + - _WaveX: 0 + - _WaveY: 0.5 + - _ZTestMode: 4 + - _ZWrite: 1 + - _ZoomUvAmount: 0.5 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _ColorChangeNewCol: {r: 1, g: 1, b: 0, a: 1} + - _ColorChangeTarget: {r: 1, g: 0, b: 0, a: 1} + - _ColorSwapBlue: {r: 1, g: 1, b: 1, a: 1} + - _ColorSwapGreen: {r: 1, g: 1, b: 1, a: 1} + - _ColorSwapRed: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _FadeBurnColor: {r: 1, g: 1, b: 0, a: 1} + - _GlowColor: {r: 1, g: 1, b: 1, a: 1} + - _GradBotLeftCol: {r: 0, g: 0, b: 1, a: 1} + - _GradBotRightCol: {r: 0, g: 0, b: 1, a: 1} + - _GradTopLeftCol: {r: 1, g: 0, b: 0, a: 1} + - _GradTopRightCol: {r: 1, g: 0, b: 0, a: 1} + - _GreyscaleTintColor: {r: 1, g: 1, b: 1, a: 1} + - _HitEffectColor: {r: 1, g: 0.5067591, b: 0, a: 1} + - _InnerOutlineColor: {r: 1, g: 0, b: 0, a: 1} + - _OutlineColor: {r: 1, g: 1, b: 1, a: 1} + - _ShadowColor: {r: 0, g: 0, b: 0, a: 1} + - _ShineColor: {r: 1, g: 1, b: 1, a: 1} diff --git a/Assets/Battle/Graphics/HitEffectMaterial.mat.meta b/Assets/Battle/Graphics/HitEffectMaterial.mat.meta new file mode 100644 index 0000000..dcdf238 --- /dev/null +++ b/Assets/Battle/Graphics/HitEffectMaterial.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 84af70f1d60046647beff4822e5ff5f5 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Battle/Graphics/ParticipantAnimationController.controller b/Assets/Battle/Graphics/ParticipantAnimationController.controller new file mode 100644 index 0000000..32da6b7 --- /dev/null +++ b/Assets/Battle/Graphics/ParticipantAnimationController.controller @@ -0,0 +1,124 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1102 &-3062327043324421231 +AnimatorState: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Hit + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: + - {fileID: 6931447952296926660} + 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: e3c3cd15801c823429e6633a50e9afc3, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: ParticipantAnimationController + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 5152661557568070138} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1102 &903733480165419173 +AnimatorState: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Idle + 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: 0} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1107 &5152661557568070138 +AnimatorStateMachine: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: -3062327043324421231} + m_Position: {x: 350, y: 40, z: 0} + - serializedVersion: 1 + m_State: {fileID: 903733480165419173} + m_Position: {x: 350, y: 140, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 80, y: 140, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 903733480165419173} +--- !u!1101 &6931447952296926660 +AnimatorStateTransition: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: + m_Conditions: [] + m_DstStateMachine: {fileID: 0} + m_DstState: {fileID: 903733480165419173} + m_Solo: 0 + m_Mute: 0 + m_IsExit: 0 + serializedVersion: 3 + m_TransitionDuration: 0 + m_TransitionOffset: 0.49910924 + m_ExitTime: 0.9982185 + m_HasExitTime: 1 + m_HasFixedDuration: 1 + m_InterruptionSource: 0 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 1 diff --git a/Assets/Battle/Graphics/ParticipantAnimationController.controller.meta b/Assets/Battle/Graphics/ParticipantAnimationController.controller.meta new file mode 100644 index 0000000..26c6da2 --- /dev/null +++ b/Assets/Battle/Graphics/ParticipantAnimationController.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3a09330fb418c6143b71858d1f2a4255 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: