Combat Components - kgrav/Nite-Basik-Code-Samples GitHub Wiki

Damage Receiving

Damage Causing

Root Classes:

The -Interface Group

These classes manage the logical status of equipped weapons. For projectile weapons, it handles the spawning and activation of projectiles. Includes procedures for cancelling attacks, and the Combat Interface allows for special collision mask states.

The -Weapon Group

Turned off/on by the Combat Interface, these classes handle collision with and damage to world objects and characters.

Fist

This is used alternatively by the Projectile Interface and the Manipulator. The Projectile Interface uses it as a parent point for spawned Projectile Weapons.

Mortality/HitZone/Number Card/Number Panel

Mortality handles actual damage caused, and can provide physical feedback, an 'invul flash' effect, and floating damage indicators (Number Card/Panel functionality). If attached to an AI Character, it will call the AI Character hit or death methods. HitZones are placed in the child object (with collider) which represents a discrete area in which a character can be damaged. They can also be placed in the root of the object, and will use the root object's collider.