Class KaijuEverythingAttackActuator
KaijuAttackActuator based on transforms, allowing it to attack anything. You can optionally filter objects by name to limit what is returned. As transforms are directly returned by hits in the underlying class, this is actually quite efficient than compared to making a custom version to get a specific component type.
Inheritance
Inherited Members
Namespace: KaijuSolutions.Agents.Actuators
Syntax
public class KaijuEverythingAttackActuator : KaijuAttackActuator
Properties
Matcher
What to match names of the objects to provide extra filtering.
Declaration
public List<KaijuAgentsMultiMatcher> Matcher { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<KaijuAgentsMultiMatcher> |
Methods
HandleHit(RaycastHit, Transform)
Handle the hit logic.
Declaration
protected override bool HandleHit(RaycastHit hit, Transform t)
Parameters
| Type | Name | Description |
|---|---|---|
| RaycastHit | hit | The hit details. |
| Transform | t | The transform currently being checked. This may not be the same as the one in the hit parameter in the case of checking parents. |
Returns
| Type | Description |
|---|---|
| System.Boolean | If the attack was a success or not. |
Overrides
Operators
Implicit(GameObject to KaijuEverythingAttackActuator)
Implicit conversion from a GameObject.
Declaration
public static implicit operator KaijuEverythingAttackActuator(GameObject o)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | o | The GameObject. |
Returns
| Type | Description |
|---|---|
| KaijuEverythingAttackActuator | The everything attack actuator attached to the GameObject if there was one. |
Implicit(KaijuEverythingAttackActuator to KaijuAgent)
Implicit conversion to a KaijuAgent.
Declaration
public static implicit operator KaijuAgent(KaijuEverythingAttackActuator s)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuEverythingAttackActuator | s | The everything attack actuator. |
Returns
| Type | Description |
|---|---|
| KaijuAgent | The KaijuAgent attached to the everything attack actuator if there was one. |
Implicit(Transform to KaijuEverythingAttackActuator)
Implicit conversion from a transform.
Declaration
public static implicit operator KaijuEverythingAttackActuator(Transform t)
Parameters
| Type | Name | Description |
|---|---|---|
| Transform | t | The transform. |
Returns
| Type | Description |
|---|---|
| KaijuEverythingAttackActuator | The everything attack actuator attached to the transform if there was one. |