From 4109a4d6cd1cab2dd74fe6d31223be56a6edd60b Mon Sep 17 00:00:00 2001 From: Adam P Skawinski Date: Thu, 5 Mar 2020 17:12:26 -0500 Subject: [PATCH] Its goin Its goin --- RPG/Assets/Animations/P_Death.anim | 2 +- RPG/Assets/Animations/P_Heal.anim | 2 +- RPG/Assets/Animations/P_Hurt.anim | 2 +- .../{P_Ember.anim => P_QuickAttack.anim} | 2 +- ...mber.anim.meta => P_QuickAttack.anim.meta} | 0 RPG/Assets/Animations/P_Run.anim | 89 -------------- RPG/Assets/Animations/P_Run.anim.meta | 8 -- RPG/Assets/Animations/P_Tackle.anim | 2 +- RPG/Assets/Animations/Player.controller | 112 +++++------------- RPG/Assets/Scenes/Main.unity | 52 +++++++- RPG/Assets/Scripts/BattleSystem.cs | 40 +++++-- 11 files changed, 110 insertions(+), 201 deletions(-) rename RPG/Assets/Animations/{P_Ember.anim => P_QuickAttack.anim} (99%) rename RPG/Assets/Animations/{P_Ember.anim.meta => P_QuickAttack.anim.meta} (100%) delete mode 100644 RPG/Assets/Animations/P_Run.anim delete mode 100644 RPG/Assets/Animations/P_Run.anim.meta diff --git a/RPG/Assets/Animations/P_Death.anim b/RPG/Assets/Animations/P_Death.anim index effb386..f677038 100644 --- a/RPG/Assets/Animations/P_Death.anim +++ b/RPG/Assets/Animations/P_Death.anim @@ -78,7 +78,7 @@ AnimationClip: m_Level: 0 m_CycleOffset: 0 m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 + m_LoopTime: 0 m_LoopBlend: 0 m_LoopBlendOrientation: 0 m_LoopBlendPositionY: 0 diff --git a/RPG/Assets/Animations/P_Heal.anim b/RPG/Assets/Animations/P_Heal.anim index e28daf2..e5e745d 100644 --- a/RPG/Assets/Animations/P_Heal.anim +++ b/RPG/Assets/Animations/P_Heal.anim @@ -66,7 +66,7 @@ AnimationClip: m_Level: 0 m_CycleOffset: 0 m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 + m_LoopTime: 0 m_LoopBlend: 0 m_LoopBlendOrientation: 0 m_LoopBlendPositionY: 0 diff --git a/RPG/Assets/Animations/P_Hurt.anim b/RPG/Assets/Animations/P_Hurt.anim index fbad3ec..0b1a92e 100644 --- a/RPG/Assets/Animations/P_Hurt.anim +++ b/RPG/Assets/Animations/P_Hurt.anim @@ -60,7 +60,7 @@ AnimationClip: m_Level: 0 m_CycleOffset: 0 m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 + m_LoopTime: 0 m_LoopBlend: 0 m_LoopBlendOrientation: 0 m_LoopBlendPositionY: 0 diff --git a/RPG/Assets/Animations/P_Ember.anim b/RPG/Assets/Animations/P_QuickAttack.anim similarity index 99% rename from RPG/Assets/Animations/P_Ember.anim rename to RPG/Assets/Animations/P_QuickAttack.anim index 74a95d9..f930cc1 100644 --- a/RPG/Assets/Animations/P_Ember.anim +++ b/RPG/Assets/Animations/P_QuickAttack.anim @@ -72,7 +72,7 @@ AnimationClip: m_Level: 0 m_CycleOffset: 0 m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 + m_LoopTime: 0 m_LoopBlend: 0 m_LoopBlendOrientation: 0 m_LoopBlendPositionY: 0 diff --git a/RPG/Assets/Animations/P_Ember.anim.meta b/RPG/Assets/Animations/P_QuickAttack.anim.meta similarity index 100% rename from RPG/Assets/Animations/P_Ember.anim.meta rename to RPG/Assets/Animations/P_QuickAttack.anim.meta diff --git a/RPG/Assets/Animations/P_Run.anim b/RPG/Assets/Animations/P_Run.anim deleted file mode 100644 index ab56740..0000000 --- a/RPG/Assets/Animations/P_Run.anim +++ /dev/null @@ -1,89 +0,0 @@ -%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: P_Run - 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: 21300000, guid: 557821c0b2219cf4da72a05e94b51b5f, type: 3} - - time: 0.1 - value: {fileID: 21300000, guid: 2b1e98da62868a848ba19504d73e9e71, type: 3} - - time: 0.2 - value: {fileID: 21300000, guid: 3c86dea0c0088744591cb92c38ac55f5, type: 3} - - time: 0.3 - value: {fileID: 21300000, guid: 5d7da9768b68b464b9c3b87878e9cc50, type: 3} - - time: 0.4 - value: {fileID: 21300000, guid: 073be82b0e9bcc94bae10a19bc3f0d0b, type: 3} - - time: 0.5 - value: {fileID: 21300000, guid: 62336ffdd817f974eb7711570a31b884, type: 3} - - time: 0.6 - value: {fileID: 21300000, guid: c2b9d7f0840191b4a8da64cd8ad4be37, type: 3} - - time: 0.7 - value: {fileID: 21300000, guid: 63a6e249f870c5143b2315084b88ab98, type: 3} - attribute: m_Sprite - path: - classID: 212 - script: {fileID: 0} - m_SampleRate: 10 - 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: 21300000, guid: 557821c0b2219cf4da72a05e94b51b5f, type: 3} - - {fileID: 21300000, guid: 2b1e98da62868a848ba19504d73e9e71, type: 3} - - {fileID: 21300000, guid: 3c86dea0c0088744591cb92c38ac55f5, type: 3} - - {fileID: 21300000, guid: 5d7da9768b68b464b9c3b87878e9cc50, type: 3} - - {fileID: 21300000, guid: 073be82b0e9bcc94bae10a19bc3f0d0b, type: 3} - - {fileID: 21300000, guid: 62336ffdd817f974eb7711570a31b884, type: 3} - - {fileID: 21300000, guid: c2b9d7f0840191b4a8da64cd8ad4be37, type: 3} - - {fileID: 21300000, guid: 63a6e249f870c5143b2315084b88ab98, type: 3} - m_AnimationClipSettings: - serializedVersion: 2 - m_AdditiveReferencePoseClip: {fileID: 0} - m_AdditiveReferencePoseTime: 0 - m_StartTime: 0 - m_StopTime: 0.8 - 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: [] - m_EulerEditorCurves: [] - m_HasGenericRootTransform: 0 - m_HasMotionFloatCurves: 0 - m_Events: [] diff --git a/RPG/Assets/Animations/P_Run.anim.meta b/RPG/Assets/Animations/P_Run.anim.meta deleted file mode 100644 index c553cb0..0000000 --- a/RPG/Assets/Animations/P_Run.anim.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: ba8e97d026b43f8478bdeb9a45e42119 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 7400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/RPG/Assets/Animations/P_Tackle.anim b/RPG/Assets/Animations/P_Tackle.anim index b51c5b5..eaf2519 100644 --- a/RPG/Assets/Animations/P_Tackle.anim +++ b/RPG/Assets/Animations/P_Tackle.anim @@ -84,7 +84,7 @@ AnimationClip: m_Level: 0 m_CycleOffset: 0 m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 + m_LoopTime: 0 m_LoopBlend: 0 m_LoopBlendOrientation: 0 m_LoopBlendPositionY: 0 diff --git a/RPG/Assets/Animations/Player.controller b/RPG/Assets/Animations/Player.controller index aa6ac9e..d021a7f 100644 --- a/RPG/Assets/Animations/Player.controller +++ b/RPG/Assets/Animations/Player.controller @@ -15,6 +15,12 @@ AnimatorController: m_DefaultInt: 0 m_DefaultBool: 0 m_Controller: {fileID: 0} + - m_Name: QuickAttack + m_Type: 4 + m_DefaultFloat: 0 + m_DefaultInt: 0 + m_DefaultBool: 0 + m_Controller: {fileID: 0} m_AnimatorLayers: - serializedVersion: 5 m_Name: Base Layer @@ -28,7 +34,7 @@ AnimatorController: m_IKPass: 0 m_SyncedLayerAffectsTiming: 0 m_Controller: {fileID: 9100000} ---- !u!1101 &1101493965354743250 +--- !u!1101 &1101645478638438140 AnimatorStateTransition: m_ObjectHideFlags: 1 m_CorrespondingSourceObject: {fileID: 0} @@ -37,10 +43,10 @@ AnimatorStateTransition: m_Name: m_Conditions: - m_ConditionMode: 1 - m_ConditionEvent: Run + m_ConditionEvent: QuickAttack m_EventTreshold: 0 m_DstStateMachine: {fileID: 0} - m_DstState: {fileID: 1102248514777427172} + m_DstState: {fileID: 1102571751961851502} m_Solo: 0 m_Mute: 0 m_IsExit: 0 @@ -53,79 +59,53 @@ AnimatorStateTransition: m_InterruptionSource: 0 m_OrderedInterruption: 1 m_CanTransitionToSelf: 1 ---- !u!1101 &1101952481130829154 +--- !u!1101 &1101706361848916376 AnimatorStateTransition: m_ObjectHideFlags: 1 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: - m_Conditions: [] + m_Conditions: + - m_ConditionMode: 2 + m_ConditionEvent: QuickAttack + m_EventTreshold: 0 m_DstStateMachine: {fileID: 0} - m_DstState: {fileID: 1102124773476174550} + m_DstState: {fileID: 1102779875948788416} m_Solo: 0 m_Mute: 0 m_IsExit: 0 serializedVersion: 3 - m_TransitionDuration: 0.25 + m_TransitionDuration: 0 m_TransitionOffset: 0 m_ExitTime: 0.75 - m_HasExitTime: 1 - m_HasFixedDuration: 1 + m_HasExitTime: 0 + m_HasFixedDuration: 0 m_InterruptionSource: 0 m_OrderedInterruption: 1 m_CanTransitionToSelf: 1 ---- !u!1101 &1101962941386886002 +--- !u!1101 &1101952481130829154 AnimatorStateTransition: m_ObjectHideFlags: 1 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: - m_Conditions: - - m_ConditionMode: 2 - m_ConditionEvent: Run - m_EventTreshold: 0 + m_Conditions: [] m_DstStateMachine: {fileID: 0} - m_DstState: {fileID: 1102779875948788416} + m_DstState: {fileID: 1102124773476174550} m_Solo: 0 m_Mute: 0 m_IsExit: 0 serializedVersion: 3 - m_TransitionDuration: 0 + m_TransitionDuration: 0.25 m_TransitionOffset: 0 - m_ExitTime: 0.6875 - m_HasExitTime: 0 - m_HasFixedDuration: 0 + m_ExitTime: 0.75 + m_HasExitTime: 1 + m_HasFixedDuration: 1 m_InterruptionSource: 0 m_OrderedInterruption: 1 m_CanTransitionToSelf: 1 ---- !u!1102 &1102124773476174550 -AnimatorState: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: P_Tackle - 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: 1831ac87bd69c3747a5edec553e5237d, type: 2} - m_Tag: - m_SpeedParameter: - m_MirrorParameter: - m_CycleOffsetParameter: - m_TimeParameter: --- !u!1102 &1102202413945558032 AnimatorState: serializedVersion: 5 @@ -152,33 +132,6 @@ AnimatorState: m_MirrorParameter: m_CycleOffsetParameter: m_TimeParameter: ---- !u!1102 &1102248514777427172 -AnimatorState: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: P_Run - m_Speed: 1 - m_CycleOffset: 0 - m_Transitions: - - {fileID: 1101962941386886002} - 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: ba8e97d026b43f8478bdeb9a45e42119, type: 2} - m_Tag: - m_SpeedParameter: - m_MirrorParameter: - m_CycleOffsetParameter: - m_TimeParameter: --- !u!1102 &1102270305872944342 AnimatorState: serializedVersion: 5 @@ -215,7 +168,8 @@ AnimatorState: m_Name: P_Ember m_Speed: 1 m_CycleOffset: 0 - m_Transitions: [] + m_Transitions: + - {fileID: 1101706361848916376} m_StateMachineBehaviours: [] m_Position: {x: 50, y: 50, z: 0} m_IKOnFeet: 0 @@ -268,7 +222,7 @@ AnimatorState: m_Speed: 1 m_CycleOffset: 0 m_Transitions: - - {fileID: 1101493965354743250} + - {fileID: 1101645478638438140} m_StateMachineBehaviours: [] m_Position: {x: 50, y: 50, z: 0} m_IKOnFeet: 0 @@ -296,30 +250,24 @@ AnimatorStateMachine: - serializedVersion: 1 m_State: {fileID: 1102779875948788416} m_Position: {x: -12, y: 144, z: 0} - - serializedVersion: 1 - m_State: {fileID: 1102124773476174550} - m_Position: {x: 456, y: -84, z: 0} - serializedVersion: 1 m_State: {fileID: 1102761255378921292} m_Position: {x: 384, y: 168, z: 0} - serializedVersion: 1 m_State: {fileID: 1102571751961851502} - m_Position: {x: 420, y: 60, z: 0} + m_Position: {x: 0, y: 36, z: 0} - serializedVersion: 1 m_State: {fileID: 1102202413945558032} m_Position: {x: 456, y: 324, z: 0} - serializedVersion: 1 m_State: {fileID: 1102270305872944342} m_Position: {x: 276, y: 276, z: 0} - - serializedVersion: 1 - m_State: {fileID: 1102248514777427172} - m_Position: {x: -12, y: 60, z: 0} m_ChildStateMachines: [] m_AnyStateTransitions: [] m_EntryTransitions: [] m_StateMachineTransitions: {} m_StateMachineBehaviours: [] - m_AnyStatePosition: {x: -72, y: -72, z: 0} + m_AnyStatePosition: {x: -156, y: -84, z: 0} m_EntryPosition: {x: -192, y: 132, z: 0} m_ExitPosition: {x: 800, y: 120, z: 0} m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} diff --git a/RPG/Assets/Scenes/Main.unity b/RPG/Assets/Scenes/Main.unity index 2951c7f..92d8877 100644 --- a/RPG/Assets/Scenes/Main.unity +++ b/RPG/Assets/Scenes/Main.unity @@ -1328,8 +1328,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 350, y: -79.3} - m_SizeDelta: {x: -853.2, y: -684.9} + m_AnchoredPosition: {x: 111.399994, y: -79.3} + m_SizeDelta: {x: -852.39996, y: -684.9} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &530814535 MonoBehaviour: @@ -2807,6 +2807,7 @@ MonoBehaviour: enemyPrefab: {fileID: 5496076527738379959} playerBattleStation: {fileID: 0} enemyBattleStation: {fileID: 0} + speed: 5 animator: {fileID: 2941739106146785020} dialogueText: {fileID: 1527616797} playerHUD: {fileID: 788420864} @@ -4098,7 +4099,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!212 &5496076527738379960 SpriteRenderer: m_ObjectHideFlags: 0 @@ -4207,13 +4208,15 @@ GameObject: - component: {fileID: 5739334669602764028} - component: {fileID: 5739334669602764026} - component: {fileID: 2941739106146785020} + - component: {fileID: 5739334669602764031} + - component: {fileID: 5739334669602764030} m_Layer: 0 m_Name: Player - m_TagString: Untagged + m_TagString: Player m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!114 &5739334669602764028 MonoBehaviour: m_ObjectHideFlags: 0 @@ -4248,6 +4251,43 @@ Transform: m_Father: {fileID: 917018502} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!70 &5739334669602764030 +CapsuleCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5739334669602764027} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 1 + m_UsedByEffector: 0 + m_UsedByComposite: 0 + m_Offset: {x: -0.1963665, y: -0.16556369} + m_Size: {x: 0.5176369, y: 0.6254458} + m_Direction: 0 +--- !u!50 &5739334669602764031 +Rigidbody2D: + serializedVersion: 4 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5739334669602764027} + m_BodyType: 0 + m_Simulated: 0 + m_UseFullKinematicContacts: 0 + m_UseAutoMass: 0 + m_Mass: 1 + m_LinearDrag: 0 + m_AngularDrag: 0.05 + m_GravityScale: 1 + m_Material: {fileID: 0} + m_Interpolate: 0 + m_SleepingMode: 1 + m_CollisionDetection: 0 + m_Constraints: 0 --- !u!4 &8706353574450535620 Transform: m_ObjectHideFlags: 0 @@ -4256,7 +4296,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 5496076527738379959} m_LocalRotation: {x: 0, y: -1, z: 0, w: 0} - m_LocalPosition: {x: 22.73, y: -2.6209838, z: 1.8805058} + m_LocalPosition: {x: 20.25, y: -2.6, z: 1.8805058} m_LocalScale: {x: 2.5, y: 2.5, z: 1} m_Children: [] m_Father: {fileID: 917018502} diff --git a/RPG/Assets/Scripts/BattleSystem.cs b/RPG/Assets/Scripts/BattleSystem.cs index 27f7c43..8de381b 100644 --- a/RPG/Assets/Scripts/BattleSystem.cs +++ b/RPG/Assets/Scripts/BattleSystem.cs @@ -20,6 +20,8 @@ public class BattleSystem : MonoBehaviour Unit playerUnit; Unit enemyUnit; + public float speed = 5f; + public Animator animator; public Text dialogueText; @@ -119,21 +121,24 @@ public class BattleSystem : MonoBehaviour - IEnumerator PlayerAttack() + IEnumerator PlayerAttack() //QuickAttack { //Run to enemy - animator.SetBool("Run", true); - yield return new WaitForSeconds(2.0f); + playerPrefab.transform.Translate(speed * 1, 0, 0); + dialogueText.text = "quick attack!"; + animator.SetBool("QuickAttack", true); + yield return new WaitForSeconds(.50f); //Tackle Enemy - animator.SetBool("QuickAttack", true); bool isDead = enemyUnit.TakeDamage(playerUnit.damage); - enemyHUD.SetHP(enemyUnit.currentHP); - yield return new WaitForSeconds(2.5f); dialogueText.text = "The quick attack is successful!"; + enemyHUD.SetHP(enemyUnit.currentHP); + yield return new WaitForSeconds(1f); + + //return animator.SetBool("QuickAttack", false); - animator.SetBool("Run", false); + playerPrefab.transform.Translate(-speed, 0, 0); yield return new WaitForSeconds(1f); //check if enemy dead @@ -159,16 +164,29 @@ public class BattleSystem : MonoBehaviour StartCoroutine(PlayerAttack2()); } - IEnumerator PlayerAttack2() + IEnumerator PlayerAttack2() //Tackle { + //Run to Enemy + playerPrefab.transform.Translate(speed * 1, 0, 0); + dialogueText.text = "Tackle!"; + //swing + animator.SetBool("Tackle", true); + yield return new WaitForSeconds(1.5f); + animator.SetBool("Tackle", false); + //Stop Swinging and reuturn + playerPrefab.transform.Translate(-speed, 0, 0); + + + + + //see if hit or miss float i = Random.Range(0f, 10f); if (i <= 7) + { //Damage enemy bool isDead = enemyUnit.TakeDamage(playerUnit.damage2); enemyHUD.SetHP(enemyUnit.currentHP); - //animate here - yield return new WaitForSeconds(1.0f); dialogueText.text = "The Tackle is successful!"; yield return new WaitForSeconds(1f); @@ -189,7 +207,7 @@ public class BattleSystem : MonoBehaviour else { bool isDead = enemyUnit.TakeDamage(playerUnit.damage0); - yield return new WaitForSeconds(1.0f); + yield return new WaitForSeconds(.10f); dialogueText.text = "The Tackle missed"; yield return new WaitForSeconds(1f);