Photon Bolt Engine API
Networking Middleware
Properties | List of all members
BoltHitboxBody Class Reference

Defines a body of hitboxes to be tracked More...

Inheritance diagram for BoltHitboxBody:

Properties

BoltHitbox proximity [get, set]
 A hitbox which should contain all other hitboxes on this entity More...
 
BoltHitbox [] hitboxes [get, set]
 An array of hitbox components that compose this body More...
 

Detailed Description

Defines a body of hitboxes to be tracked

Example: Adding a hitbox body to a character pre-configured with BoltHitbox components

void AddHitboxBody(BoltEntity entity) {
BoltHitbox[] hitboxes = entity.GetComponentsInChildren<BoltHitbox>();
BoltHitboxBody body = entity.AddComponent<BoltHitboxBody>();
body.hitboxes = hitboxes;
}

Property Documentation

◆ hitboxes

BoltHitbox [] BoltHitboxBody.hitboxes
getset

An array of hitbox components that compose this body

Example: Finding all hitbox components on an entity and adding them to a hitbox body

void AddHitboxBody(BoltEntity entity) {
BoltHitbox[] hitboxes = entity.gameObject.GetComponentsInChildren<BoltHitbox>();
BoltHitboxBody body = entity.AddComponent<BoltHitboxBody>();
body.hitboxes = hitboxes;
}

◆ proximity

BoltHitbox BoltHitboxBody.proximity
getset

A hitbox which should contain all other hitboxes on this entity