Equipment

Manages equipment, weapons, etc. Parses inputs from the player to the weapon presets to do operations like Fire/Swap/Reload.

Relevant Components

AgentEquipment, WeaponBase, Inventory

Typical Setup

An AgentEquipment component is on your Player Avatar Object and reading the inventory for changes that are weapons. Inventories have specific slots that hold weapons only, so the Equipment class is looking at those specifically and watching changes to them. AgentEquipment will read the current inputs on the Agent and react to things like Fire1, Swap and Reload, then run Fire(), Swap(), or Reload() on the data preset as well as manage cooldowns for that weapon.

Scenario A (ideal)

  • Scene GameObject "Player Bob" (AgentEquipment) (Inventory)

  • Inventory contains weapons in the slots defined as weapon-only.

  • Equipment can cycle between those and fire/swap/reload them.

Last updated