Method IsInAttackRange
IsInAttackRange(RideID, RideID, RideID)
Returns true if the the target position is in the attack range of the weapon being used from position start, and if the target is within attack range of the attacker.
Declaration
public bool IsInAttackRange(RideID attacker, RideID attackee, RideID weapon)
Parameters
Type | Name | Description |
---|---|---|
RideID | attacker | The agent that wants to attack, it's word position is used |
RideID | attackee | The agent being attacked, it's world position is used |
RideID | weapon | The weapon being used |
Returns
Type | Description |
---|---|
System.Boolean | True if target is in the weapon's range |
Implements
IsInAttackRange(RideVector3, RideVector3, RideID)
Returns true if the the target position is in the attack range of the weapon being used from position start
Declaration
public bool IsInAttackRange(RideVector3 start, RideVector3 target, RideID weapon)
Parameters
Type | Name | Description |
---|---|---|
RideVector3 | start | World position of the weapon |
RideVector3 | target | World position of the target the weapon is being used on |
RideID | weapon | The weapon being used |
Returns
Type | Description |
---|---|
System.Boolean | True if target is in the weapon's range |
Implements
IsInAttackRange(RideVector3, RideVector3, Single)
Returns true if the the target position is in the attack range of the weapon being used from position start
Declaration
public bool IsInAttackRange(RideVector3 start, RideVector3 target, float range)
Parameters
Type | Name | Description |
---|---|---|
RideVector3 | start | World position of the weapon |
RideVector3 | target | World position of the target the weapon is being used on |
System.Single | range | The range of the weapon |
Returns
Type | Description |
---|---|
System.Boolean | True if the target is in the weapon's range |