Shiny shiny golem animations + attack

This commit is contained in:
Crizomb 2025-01-16 01:48:50 +01:00
parent c74ebe3225
commit ffb1f1caa1
14 changed files with 169 additions and 38 deletions

View file

@ -17,6 +17,12 @@ public class ArrowHandler : MonoBehaviour
_rigidBody = GetComponent<Rigidbody>();
}
void Start()
{
// Destroy after 8s, in all case
Destroy(this.gameObject, 8.0f);
}
void Update()
{
// Align with speed

View file

@ -56,6 +56,14 @@ public class AttackHandler : MonoBehaviour
MinecraftUnit minecraftTarget = (MinecraftUnit)targetUnit;
minecraftTarget.StartCoroutine(minecraftTarget.MovementHandler.TakeImpulse(knockbackVector));
}
// Attack animation
if (_minecraftUnit.Animator)
{
_minecraftUnit.Animator.SetTrigger("Attack");
}
}
return true;
}