CombatTargetCollector

public class CombatTargetCollector implements ISensorEntityCollector

Class CombatTargetCollector. Provides combattargetcollector functionality for the Hytale server.

java.lang.Object > CombatTargetCollector

Field Summary

role

private Role role

Field role.

targetMemory

private TargetMemory targetMemory

Field targetMemory.

closestHostileDistanceSquared

private double closestHostileDistanceSquared

Field closestHostileDistanceSquared.

attitude

final Attitude attitude

Field attitude.

hostiles

final Int2FloatOpenHashMap hostiles

Field hostiles.

context

final HytaleLogger.Api context

Field context.

transformComponent

final TransformComponent transformComponent

Field transformComponent.

selfPos

final Vector3d selfPos

Field selfPos.

targetTransformComponent

final TransformComponent targetTransformComponent

Field targetTransformComponent.

targetPos

final Vector3d targetPos

Field targetPos.

distanceSquared

final double distanceSquared

Field distanceSquared.

friendlies

final Int2FloatOpenHashMap friendlies

Field friendlies.

Method Detail

CombatTargetCollector

public public CombatTargetCollector ()

Method CombatTargetCollector.

registerWithSupport

public void registerWithSupport (@Nonnull final Role role)

Method registerWithSupport.

Parameters:
@Nonnull final Role role

init

public void init (@Nonnull final Ref ref, @Nonnull final Role role, @Nonnull final ComponentAccessor componentAccessor)

Method init.

Parameters:
@Nonnull final Ref ref
@Nonnull final Role role
@Nonnull final ComponentAccessor componentAccessor

collectMatching

public void collectMatching (@Nonnull final Ref ref, @Nonnull final Ref targetRef, @Nonnull final ComponentAccessor componentAccessor)

Method collectMatching.

Parameters:
@Nonnull final Ref ref
@Nonnull final Ref targetRef
@Nonnull final ComponentAccessor componentAccessor

collectNonMatching

public void collectNonMatching (@Nonnull final Ref targetRef, @Nonnull final ComponentAccessor componentAccessor)

Method collectNonMatching.

Parameters:
@Nonnull final Ref targetRef
@Nonnull final ComponentAccessor componentAccessor

terminateOnFirstMatch

public boolean terminateOnFirstMatch ()

Method terminateOnFirstMatch.

cleanup

public void cleanup ()

Method cleanup.