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

1 void AddHitboxBody(BoltEntity entity) {
2  BoltHitbox[] hitboxes = entity.GetComponentsInChildren<BoltHitbox>();
3 
4  BoltHitboxBody body = entity.AddComponent<BoltHitboxBody>();
5  body.hitboxes = hitboxes;
6 }

Property Documentation

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

1 void AddHitboxBody(BoltEntity entity) {
2  BoltHitbox[] hitboxes = entity.gameObject.GetComponentsInChildren<BoltHitbox>();
3 
4  BoltHitboxBody body = entity.AddComponent<BoltHitboxBody>();
5  body.hitboxes = hitboxes;
6 }
BoltHitbox BoltHitboxBody.proximity
getset

A hitbox which should contain all other hitboxes on this entity