New damage system, much easier to understand Splash damage support Hardpoint armor consolidated with hull armor Minimap shows view cone New industry standard palette for temperature display Temperature range display contains palette Restoring loadouts now ignores temperature and armor Items can ignore thermal mass when adding heat Burst weapons can consume single ammo (mainly shotguns) New missile type that follows crosshairs New airburst projectile type that deals splash damage Auto Shotgun and Charged Shotgun
59 lines
No EOL
1.6 KiB
C#
59 lines
No EOL
1.6 KiB
C#
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 Subject<HullSplashEventArgs> Splash = new Subject<HullSplashEventArgs>();
|
|
|
|
public Entity Entity { get; set; }
|
|
|
|
public void SendHit(float damage, float penetration, float spread, DamageType damageType, Entity source, RaycastHit hit, Vector3 direction)
|
|
{
|
|
Hit.OnNext(new HullHitEventArgs
|
|
{
|
|
Damage = damage,
|
|
Penetration = penetration,
|
|
Spread = spread,
|
|
DamageType = damageType,
|
|
Source = source,
|
|
Hit = hit,
|
|
Direction = direction
|
|
});
|
|
}
|
|
|
|
public void SendSplash(float damage, DamageType damageType, Entity source, Vector3 direction)
|
|
{
|
|
Splash.OnNext(new HullSplashEventArgs
|
|
{
|
|
Damage = damage,
|
|
DamageType = damageType,
|
|
Source = source,
|
|
Direction = direction
|
|
});
|
|
}
|
|
|
|
public class HullHitEventArgs
|
|
{
|
|
public float Damage;
|
|
public float Penetration;
|
|
public float Spread;
|
|
public DamageType DamageType;
|
|
public Entity Source;
|
|
public RaycastHit Hit;
|
|
public float3 Direction;
|
|
}
|
|
|
|
public class HullSplashEventArgs
|
|
{
|
|
public float Damage;
|
|
public DamageType DamageType;
|
|
public Entity Source;
|
|
public float3 Direction;
|
|
}
|
|
} |