Class ShootingTargetToy
A wrapper class for AdminToys.ShootingTarget.
Inherited Members
Namespace: Exiled.API.Features.Toys
Assembly: Exiled.API.dll
Syntax
public class ShootingTargetToy : AdminToy, IWorldSpace, IPosition, IRotation, IWrapper<ShootingTarget>
Properties
| Improve this Doc View SourceAutoResetTime
Gets or sets the remaining health of the target.
Declaration
public int AutoResetTime { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Base
Gets the base-game AdminToys.ShootingTarget for this target.
Declaration
public ShootingTarget Base { get; }
Property Value
Type | Description |
---|---|
AdminToys.ShootingTarget |
Bullseye
Gets the UnityEngine.GameObject of the bullseye.
Declaration
public GameObject Bullseye { get; }
Property Value
Type | Description |
---|---|
UnityEngine.GameObject |
BullseyePosition
Gets the bullseye location of the target.
Declaration
public Vector3 BullseyePosition { get; }
Property Value
Type | Description |
---|---|
UnityEngine.Vector3 |
BullseyeRadius
Gets the bullseye radius of the target.
Declaration
public float BullseyeRadius { get; }
Property Value
Type | Description |
---|---|
System.Single |
GameObject
Gets the UnityEngine.GameObject of the target.
Declaration
public GameObject GameObject { get; }
Property Value
Type | Description |
---|---|
UnityEngine.GameObject |
Health
Gets or sets the remaining health of the target.
Declaration
public float Health { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
IsSynced
Gets or sets a value indicating whether or not the target is in sync mode.
Declaration
public bool IsSynced { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
MaxHealth
Gets or sets the max health of the target.
Declaration
public int MaxHealth { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Scale
Gets or sets the size scale of the target.
Declaration
public Vector3 Scale { get; set; }
Property Value
Type | Description |
---|---|
UnityEngine.Vector3 |
Type
Gets the type of the target.
Declaration
public ShootingTargetType Type { get; }
Property Value
Type | Description |
---|---|
ShootingTargetType |
VerificationRule
Gets the Interactables.Verification.IVerificationRule for this target.
Declaration
public IVerificationRule VerificationRule { get; }
Property Value
Type | Description |
---|---|
Interactables.Verification.IVerificationRule |
Methods
| Improve this Doc View SourceClear()
Clears the target and resets its health.
Declaration
public void Clear()
Create(ShootingTargetType, Nullable<Vector3>, Nullable<Vector3>, Nullable<Vector3>, Boolean)
Creates a new ShootingTargetToy.
Declaration
public static ShootingTargetToy Create(ShootingTargetType type, Vector3? position = null, Vector3? rotation = null, Vector3? scale = null, bool spawn = true)
Parameters
Type | Name | Description |
---|---|---|
ShootingTargetType | type | The ShootingTargetType of the ShootingTargetToy. |
System.Nullable<UnityEngine.Vector3> | position | The position of the ShootingTargetToy. |
System.Nullable<UnityEngine.Vector3> | rotation | The rotation of the ShootingTargetToy. |
System.Nullable<UnityEngine.Vector3> | scale | The scale of the ShootingTargetToy. |
System.Boolean | spawn | Whether the ShootingTargetToy should be initially spawned. |
Returns
Type | Description |
---|---|
ShootingTargetToy | The new ShootingTargetToy. |
Damage(Single, DamageHandlerBase, Vector3)
Damages the target with the given damage, item, footprint, and hit location.
Declaration
public bool Damage(float damage, DamageHandlerBase damageHandler, Vector3 exactHit)
Parameters
Type | Name | Description |
---|---|---|
System.Single | damage | The damage to be dealt. |
PlayerStatsSystem.DamageHandlerBase | damageHandler | The PlayerStatsSystem.DamageHandlerBase dealing the damage. |
UnityEngine.Vector3 | exactHit | The exact location of the hit. |
Returns
Type | Description |
---|---|
System.Boolean | Whether or not the damage was sent. |
Get(ShootingTarget)
Gets the ShootingTargetToy belonging to the AdminToys.ShootingTarget.
Declaration
public static ShootingTargetToy Get(ShootingTarget shootingTarget)
Parameters
Type | Name | Description |
---|---|---|
AdminToys.ShootingTarget | shootingTarget | The AdminToys.ShootingTarget instance. |
Returns
Type | Description |
---|---|
ShootingTargetToy | The corresponding ShootingTargetToy instance. |