14 lines
351 B
C#
14 lines
351 B
C#
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
namespace BITKit.Entities
|
||
|
{
|
||
|
public class EntityImpact : EntityComponent, IPhysicsImpact
|
||
|
{
|
||
|
public void AddImpact(Vector3 force)
|
||
|
{
|
||
|
var damage = (int)(-force.sqrMagnitude);
|
||
|
entity.Invoke<int>("AddHP", damage);
|
||
|
}
|
||
|
}
|
||
|
}
|