GUNS GUNS GUNS

GUESS WHAT
This commit is contained in:
Reinier Vens 2021-01-05 02:56:17 +00:00
commit 8aaccac2b5
83 changed files with 15291 additions and 1291 deletions

33
Assets/HullCollider.cs Normal file
View file

@ -0,0 +1,33 @@
using System.Collections;
using System.Collections.Generic;
using UniRx;
using Unity.Mathematics;
using static Unity.Mathematics.math;
using UnityEngine;
using float2 = Unity.Mathematics.float2;
public class HullCollider : MonoBehaviour
{
public Subject<HullHitEventArgs> Hit = new Subject<HullHitEventArgs>();
public Entity Entity { get; set; }
public void SendHit(float damage, DamageType damageType, Entity source, RaycastHit hit)
{
Hit.OnNext(new HullHitEventArgs
{
Damage = damage,
DamageType = damageType,
Source = source,
Hit = hit
});
}
public class HullHitEventArgs
{
public float Damage;
public DamageType DamageType;
public Entity Source;
public RaycastHit Hit;
}
}