Import art/VFX asset packs + game-feel systems; normalize texture extensions to lowercase for LFS
Add BefourStudios SciFi environment packs, Gabriel Aguiar VFX, and the ShaderCrew Toon Shader embedded packages, plus combat/enemy/wave/death gameplay systems and supporting vault docs/screenshots. Rename 11 vendor textures from uppercase .PNG/.HDR to lowercase so the case-sensitive Git LFS filters (*.png/*.hdr) match on case-sensitive filesystems (Linux CI, case-sensitive macOS), not just locally where core.ignorecase=true masks the gap. Each .meta moved with its asset so GUID references are preserved. All ~1000 binaries tracked via LFS. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
using NUnit.Framework;
|
||||
using ProjectM.Simulation;
|
||||
using Unity.Mathematics;
|
||||
|
||||
namespace ProjectM.Tests
|
||||
{
|
||||
/// <summary>
|
||||
/// Pure-function tests for <see cref="EnemyAIMath"/> (no ECS world), mirroring PlayerSpawnRingTests /
|
||||
/// StatMathTests. Pins the deterministic Husk seek / strike / spawn-ring math the server AI relies on.
|
||||
/// </summary>
|
||||
public class EnemyAIMathTests
|
||||
{
|
||||
const float Eps = 1e-4f;
|
||||
|
||||
[Test]
|
||||
public void SeekVelocity_MovesTowardTarget_AtSpeed()
|
||||
{
|
||||
var v = EnemyAIMath.SeekVelocity(new float3(0, 1, 0), new float3(10, 1, 0), 4f, 0.5f);
|
||||
Assert.AreEqual(4f, math.length(v), Eps);
|
||||
Assert.Greater(v.x, 0f);
|
||||
Assert.AreEqual(0f, v.y, Eps);
|
||||
Assert.AreEqual(0f, v.z, Eps);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void SeekVelocity_IgnoresVerticalSeparation()
|
||||
{
|
||||
// Target directly above (same XZ) is within stop distance on the plane -> no movement.
|
||||
var v = EnemyAIMath.SeekVelocity(new float3(0, 0, 0), new float3(0, 50, 0), 4f, 0.5f);
|
||||
Assert.AreEqual(0f, math.length(v), Eps);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void SeekVelocity_ZeroWithinStopDistance()
|
||||
{
|
||||
var v = EnemyAIMath.SeekVelocity(new float3(0, 1, 0), new float3(0.3f, 1, 0), 4f, 0.5f);
|
||||
Assert.AreEqual(0f, math.length(v), Eps);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void InAttackRange_TrueInside_FalseOutside()
|
||||
{
|
||||
Assert.IsTrue(EnemyAIMath.InAttackRange(new float3(0, 1, 0), new float3(1.0f, 1, 0), 1.5f));
|
||||
Assert.IsFalse(EnemyAIMath.InAttackRange(new float3(0, 1, 0), new float3(2.0f, 1, 0), 1.5f));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void InAttackRange_IgnoresVertical()
|
||||
{
|
||||
// Same XZ, large Y gap -> still in range on the plane.
|
||||
Assert.IsTrue(EnemyAIMath.InAttackRange(new float3(0, 0, 0), new float3(0, 99, 0), 1.5f));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void RingPosition_OnRadius_AroundCenter()
|
||||
{
|
||||
var center = new float3(5, 1, -3);
|
||||
var p = EnemyAIMath.RingPosition(center, 0, 8, 6f);
|
||||
var d = p - center;
|
||||
Assert.AreEqual(6f, math.length(new float2(d.x, d.z)), Eps); // planar distance == radius
|
||||
Assert.AreEqual(center.y, p.y, Eps); // stays on the plane
|
||||
// index 0, slots 8 -> angle 0 -> offset (+radius, 0, 0)
|
||||
Assert.AreEqual(center.x + 6f, p.x, Eps);
|
||||
Assert.AreEqual(center.z, p.z, Eps);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void RingPosition_Deterministic_And_Distinct()
|
||||
{
|
||||
var c = float3.zero;
|
||||
var a = EnemyAIMath.RingPosition(c, 1, 8, 4f);
|
||||
var b = EnemyAIMath.RingPosition(c, 1, 8, 4f);
|
||||
Assert.AreEqual(a.x, b.x, Eps);
|
||||
Assert.AreEqual(a.z, b.z, Eps);
|
||||
var other = EnemyAIMath.RingPosition(c, 2, 8, 4f);
|
||||
Assert.Greater(math.distance(a, other), 1e-3f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d03b0dfede8436640a8bb615183d72b3
|
||||
@@ -0,0 +1,46 @@
|
||||
using NUnit.Framework;
|
||||
using ProjectM.Simulation;
|
||||
|
||||
namespace ProjectM.Tests
|
||||
{
|
||||
/// <summary>
|
||||
/// Pure-function tests for <see cref="RespawnMath"/> (no ECS world), mirroring PlayerSpawnRingTests /
|
||||
/// EnemyAIMathTests. Pins the deterministic player respawn-timer math.
|
||||
/// </summary>
|
||||
public class RespawnMathTests
|
||||
{
|
||||
[Test]
|
||||
public void RespawnTick_AddsDelay()
|
||||
{
|
||||
Assert.AreEqual(1180u, RespawnMath.RespawnTick(1000u, 180));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void RespawnTick_ClampsDelayToAtLeastOne()
|
||||
{
|
||||
Assert.AreEqual(1001u, RespawnMath.RespawnTick(1000u, 0));
|
||||
Assert.AreEqual(1001u, RespawnMath.RespawnTick(1000u, -5));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void RespawnTick_NeverReturnsZeroSentinel()
|
||||
{
|
||||
// A death exactly at tick 0 must still schedule a non-zero recovery tick.
|
||||
Assert.AreNotEqual(0u, RespawnMath.RespawnTick(0u, 1));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void IsDue_FalseBefore_TrueAtOrAfter()
|
||||
{
|
||||
Assert.IsFalse(RespawnMath.IsDue(1100u, 1180u));
|
||||
Assert.IsTrue(RespawnMath.IsDue(1180u, 1180u));
|
||||
Assert.IsTrue(RespawnMath.IsDue(1200u, 1180u));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void IsDue_FalseWhenNoneScheduled()
|
||||
{
|
||||
Assert.IsFalse(RespawnMath.IsDue(99999u, 0u));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 42b88f5fe0fffa844b6d71660244e2b1
|
||||
Reference in New Issue
Block a user