.. _shell: Shell =========== .. code-block:: csharp public sealed class Shell Runtime state and behaviour of a bullet/rocket/projectile. Unlike some other gameplay classes in this asset, ``Shell`` is a plain C# object, not a ``MonoBehaviour`` and not an injectable service — you don't add it to a prefab, and you don't get a reference to it via ``GetComponent``. Instead, you get a reference to it as the return value of :ref:`shell_service`'s ``SpawnShell``, which spawns the (purely visual, mesh/particles) shell prefab instance and initializes it via ``Setup``. Once spawned, a shell is tracked by ``ShellService`` and ticked every frame by ``ShellSystem`` (its ``Tick`` method), which advances the shell's flight, checks for hits and removes it from ``ShellService`` once it is finished (hit something, expired, or its target died). Damage, fly speed, hit FX, splash damage, artillery trajectory (``IsArtilleryShell``, ``MaxHeight``) and hit check radius (``HitCheckRadius``) all come from the owner unit's ``ShellAttackData`` (``owner.Data.Attack``), applied automatically in ``Setup`` method. Hit detection is done in code, sweeping the shell's movement this frame against nearby units (see ``HitTestUtils``). So, no physics components required. .. toctree:: :glob: *