twinStick/twinStickCrawler/Assets/Scripts/Creatures/Player/PlayerAttack.cs
2024-12-20 15:21:20 +01:00

24 lines
560 B
C#

using System;
using UnityEngine;
public class PlayerAttack : MonoBehaviour
{
private Animate _animate;
private InputManager _inputManager;
private LayerMask _enemyLayermask;
public void initialize(InputManager inputManager, LayerMask enemyLayermask, Animate animate)
{
_inputManager = inputManager;
_enemyLayermask = enemyLayermask;
_animate = animate;
}
public void Attack()
{
if (_inputManager.attackPerformed)
{
_animate.TriggerAnimation("Attack");
}
}
}