Professional Documents
Culture Documents
Collections;
using System.Collections.Generic;
using UnityEngine;
isAttacking = true;
curCooldown = cooldown;
}
}
}
//else if (isAttacking && getVectorToTarget().x < 1 && rb.velocity.y > 0) {
// rb.velocity = new Vector2(0, 0);
//}
else if (!isAttacking && curCooldown > 0) {
curCooldown -= Time.deltaTime;
}