using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using RPGCreationKit;
using RPGCreationKit.Player;
namespace RPGCreationKit
{
///
/// Defines a BlockingZone. Each of instance of this script is directly connected to a 'CombatSystem' component.
///
public class BlockingZone : MonoBehaviour, IHittable
{
[SerializeField] bool isPlayer = false;
public AI.AICombatSystem aiCombat;
public void GenerateDecal()
{
}
public void Hit(Vector3 hitDir, float forceAmount = 25, DamageContext damageContext = null)
{
if(isPlayer)
{
RckPlayer.instance.GetComponent().DamageBlocked(damageContext);
}
else
{
aiCombat.DamageBlocked(damageContext);
}
}
}
}