Construct a PunchBehavior
How much damage should a punch do?
Optionalteam?: numberThe team this actor belongs to (default 0)
Protected Optional_The actor associated with this Behavior
How much damage does this punch do?
Which "team" this Behavior belongs to. A team is just a number, and for
the most part it's only when user code consults teams that teams have
meaning. The only exception is that HazardBehavior uses team to prevent
team attack damage.
The actor associated with this Behavior
Indicate that this Behavior should ignore collisions with some other property
ProtecteddisableTurn off physical collisions for actor. Used by Behaviors that are only
ever passed through, not physically collided with, like coins.
The actor being attached (may be undefined, if this Behavior is being detached)
Perform a punch: enable a temporary hitbox offset from this actor, for
cfg.duration seconds, then disable it automatically.
ProtectedrequireIf actor's body isn't dynamic, warn and upgrade it to dynamic. Used
by every Behavior whose whole point requires a dynamic body (e.g.
setVelocity/forces actually doing something).
The actor being attached (may be undefined, if this Behavior is being detached)
The name to use in the warning message
PunchBehavior gives an actor a temporary melee hitbox: a second, offset fixture on the actor's own body (see
RigidBodyComponent.enablePunch), active for a fixed duration, that moves rigidly with the actor.