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,56 @@
|
||||
using ProjectM.Simulation;
|
||||
using Unity.Entities;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ProjectM.Authoring
|
||||
{
|
||||
/// <summary>
|
||||
/// Authoring for the Husk enemy prefab. Bakes the gameplay components onto a prefab whose ghost setup
|
||||
/// (GhostAuthoringComponent: interpolated, ownerless) is inherited by DUPLICATING an existing interpolated
|
||||
/// ghost (UpgradePickup.prefab) — so the Husk replicates to all clients with no hand-written <c>[GhostField]</c>
|
||||
/// (the stock LocalTransform variant carries its server-driven position). Damageable exactly like the training
|
||||
/// dummy (Health/HitRadius/DamageEvent) plus the Husk AI tunables. <c>GetEntity(Dynamic)</c> gives a
|
||||
/// runtime-mutable LocalTransform for server-authoritative movement and hit tests.
|
||||
/// </summary>
|
||||
public class EnemyAuthoring : MonoBehaviour
|
||||
{
|
||||
[Min(0f), Tooltip("Starting and maximum health for the Husk.")]
|
||||
public float MaxHealth = 30f;
|
||||
|
||||
[Min(0f), Tooltip("World-unit radius used by the projectile hit test.")]
|
||||
public float HitRadius = 0.7f;
|
||||
|
||||
[Min(0f), Tooltip("Planar seek speed toward the nearest player, units/second.")]
|
||||
public float MoveSpeed = 3.5f;
|
||||
|
||||
[Min(0f), Tooltip("Centre-to-centre distance at which the Husk can strike a player.")]
|
||||
public float AttackRange = 1.6f;
|
||||
|
||||
[Min(0f), Tooltip("Damage dealt per strike.")]
|
||||
public float AttackDamage = 8f;
|
||||
|
||||
[Min(1), Tooltip("Simulation ticks between strikes (~60 ticks/sec).")]
|
||||
public int AttackCooldownTicks = 36;
|
||||
|
||||
private class EnemyBaker : Baker<EnemyAuthoring>
|
||||
{
|
||||
public override void Bake(EnemyAuthoring authoring)
|
||||
{
|
||||
var entity = GetEntity(authoring, TransformUsageFlags.Dynamic);
|
||||
|
||||
AddComponent<EnemyTag>(entity);
|
||||
AddComponent(entity, new Health { Current = authoring.MaxHealth, Max = authoring.MaxHealth });
|
||||
AddComponent(entity, new HitRadius { Value = authoring.HitRadius });
|
||||
AddBuffer<DamageEvent>(entity);
|
||||
AddComponent(entity, new EnemyStats
|
||||
{
|
||||
MoveSpeed = authoring.MoveSpeed,
|
||||
AttackRange = authoring.AttackRange,
|
||||
AttackDamage = authoring.AttackDamage,
|
||||
AttackCooldownTicks = authoring.AttackCooldownTicks,
|
||||
});
|
||||
AddComponent(entity, new EnemyAttackCooldown { NextAttackTick = 0 });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6b014797e9092694b9568c5b66d34a55
|
||||
@@ -0,0 +1,63 @@
|
||||
using ProjectM.Simulation;
|
||||
using Unity.Entities;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ProjectM.Authoring
|
||||
{
|
||||
/// <summary>
|
||||
/// Authoring for the Husk wave/threat director (singleton). Place on one GameObject in the gameplay subscene;
|
||||
/// the server-only <c>WaveSystem</c> reads it. Bakes a <see cref="WaveDirector"/> config + a
|
||||
/// <see cref="WaveEnemyPrefab"/> pool (the assigned Husk variant prefabs, spawned round-robin) + the initial
|
||||
/// <see cref="WaveState"/>. The entity carries no transform; only the referenced prefabs need a runtime transform.
|
||||
/// </summary>
|
||||
public class WaveDirectorAuthoring : MonoBehaviour
|
||||
{
|
||||
[Tooltip("Husk variant prefabs to spawn (round-robin). Each must carry EnemyAuthoring + an interpolated GhostAuthoringComponent.")]
|
||||
public GameObject[] EnemyPrefabs;
|
||||
|
||||
[Min(0f)] public float RingRadius = 16f;
|
||||
[Min(1)] public int RingSlots = 10;
|
||||
|
||||
[Min(1), Tooltip("Husks in wave 1.")] public int BaseCount = 4;
|
||||
[Min(0), Tooltip("Additional Husks per subsequent wave.")] public int CountPerWave = 2;
|
||||
[Min(1), Tooltip("Ticks between individual spawns within a wave (~60/sec).")] public int SpawnIntervalTicks = 24;
|
||||
[Min(1), Tooltip("Ticks of calm between waves (~60/sec).")] public int LullTicks = 240;
|
||||
|
||||
private class WaveDirectorBaker : Baker<WaveDirectorAuthoring>
|
||||
{
|
||||
public override void Bake(WaveDirectorAuthoring authoring)
|
||||
{
|
||||
var entity = GetEntity(authoring, TransformUsageFlags.None);
|
||||
|
||||
AddComponent(entity, new WaveDirector
|
||||
{
|
||||
RingRadius = authoring.RingRadius,
|
||||
RingSlots = authoring.RingSlots,
|
||||
BaseCount = authoring.BaseCount,
|
||||
CountPerWave = authoring.CountPerWave,
|
||||
SpawnIntervalTicks = authoring.SpawnIntervalTicks,
|
||||
LullTicks = authoring.LullTicks,
|
||||
});
|
||||
|
||||
var buffer = AddBuffer<WaveEnemyPrefab>(entity);
|
||||
if (authoring.EnemyPrefabs != null)
|
||||
{
|
||||
foreach (var prefab in authoring.EnemyPrefabs)
|
||||
{
|
||||
if (prefab != null)
|
||||
buffer.Add(new WaveEnemyPrefab { Prefab = GetEntity(prefab, TransformUsageFlags.Dynamic) });
|
||||
}
|
||||
}
|
||||
|
||||
AddComponent(entity, new WaveState
|
||||
{
|
||||
WaveNumber = 0,
|
||||
Phase = WavePhase.Lull,
|
||||
NextActionTick = 0,
|
||||
RemainingToSpawn = 0,
|
||||
SpawnCounter = 0,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f0c287a066ae43b42b2bf1e1ccaa48bc
|
||||
@@ -28,6 +28,14 @@ namespace ProjectM.Authoring
|
||||
/// <summary>Projectile hit-test radius for the player as a damageable target, in world units.</summary>
|
||||
[Min(0f)] public float HitRadius = 0.6f;
|
||||
|
||||
[Min(1)]
|
||||
[Tooltip("Ticks the player stays down before respawning at base (~60 ticks/sec).")]
|
||||
public int RespawnDelayTicks = 180;
|
||||
|
||||
[Min(0)]
|
||||
[Tooltip("Ticks of post-respawn damage immunity (~60 ticks/sec).")]
|
||||
public int RespawnInvulnTicks = 120;
|
||||
|
||||
private class PlayerBaker : Baker<PlayerAuthoring>
|
||||
{
|
||||
public override void Bake(PlayerAuthoring authoring)
|
||||
@@ -66,6 +74,13 @@ namespace ProjectM.Authoring
|
||||
AddComponent(entity, new HitRadius { Value = authoring.HitRadius });
|
||||
AddComponent<AbilityCooldown>(entity);
|
||||
AddBuffer<DamageEvent>(entity);
|
||||
|
||||
// Death gate (enableable, derived from Health by PlayerDeathStateSystem) baked DISABLED = alive;
|
||||
// plus the server-only respawn timer.
|
||||
AddComponent<Dead>(entity);
|
||||
SetComponentEnabled<Dead>(entity, false);
|
||||
AddComponent(entity, new RespawnState { RespawnTick = 0, DelayTicks = authoring.RespawnDelayTicks, InvulnTicks = authoring.RespawnInvulnTicks });
|
||||
AddComponent(entity, new RespawnInvuln { UntilTick = 0 });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user