Class ShootingTargetToy
A wrapper class for AdminToys.ShootingTarget.
public class ShootingTargetToy : AdminToy, IWorldSpace, IPosition, IRotation, IWrapper<ShootingTarget>
- Inheritance
-
ShootingTargetToy
- Implements
-
IWrapper<ShootingTarget>
- Inherited Members
- Extension Methods
Properties
AutoResetTime
Gets or sets the remaining health of the target.
public int AutoResetTime { get; set; }
Property Value
Base
Gets the base-game AdminToys.ShootingTarget for this target.
public ShootingTarget Base { get; }
Property Value
- ShootingTarget
BinaryShootingTargetPrefab
Gets the prefab for Binary Shooting Target.
public static ShootingTarget BinaryShootingTargetPrefab { get; }
Property Value
- ShootingTarget
Bullseye
Gets the UnityEngine.GameObject of the bullseye.
public GameObject Bullseye { get; }
Property Value
- GameObject
BullseyePosition
Gets the bullseye location of the target.
public Vector3 BullseyePosition { get; }
Property Value
- Vector3
BullseyeRadius
Gets the bullseye radius of the target.
public float BullseyeRadius { get; }
Property Value
DboyShootingTargetPrefab
Gets the prefab for DBoy Shooting Target.
public static ShootingTarget DboyShootingTargetPrefab { get; }
Property Value
- ShootingTarget
GameObject
Gets the UnityEngine.GameObject of the toy.
public GameObject GameObject { get; }
Property Value
- GameObject
Health
Gets or sets the remaining health of the target.
public float Health { get; set; }
Property Value
IsSynced
Gets or sets a value indicating whether the target is in sync mode.
public bool IsSynced { get; set; }
Property Value
MaxHealth
Gets or sets the max health of the target.
public int MaxHealth { get; set; }
Property Value
Scale
Gets or sets the size scale of the target.
public Vector3 Scale { get; set; }
Property Value
- Vector3
SportShootingTargetPrefab
Gets the prefab for Sport Shooting Target.
public static ShootingTarget SportShootingTargetPrefab { get; }
Property Value
- ShootingTarget
Type
Gets the type of the target.
public ShootingTargetType Type { get; }
Property Value
VerificationRule
Gets the Interactables.Verification.IVerificationRule for this target.
public IVerificationRule VerificationRule { get; }
Property Value
- IVerificationRule
Methods
Clear()
Clears the target and resets its health.
public void Clear()
Create(ShootingTargetType, Vector3?, Vector3?, Vector3?, bool)
Creates a new ShootingTargetToy.
public static ShootingTargetToy Create(ShootingTargetType type, Vector3? position = null, Vector3? rotation = null, Vector3? scale = null, bool spawn = true)
Parameters
type
ShootingTargetTypeThe ShootingTargetType of the ShootingTargetToy.
position
Vector3?The position of the ShootingTargetToy.
rotation
Vector3?The rotation of the ShootingTargetToy.
scale
Vector3?The scale of the ShootingTargetToy.
spawn
boolWhether the ShootingTargetToy should be initially spawned.
Returns
- ShootingTargetToy
The new ShootingTargetToy.
Damage(float, DamageHandlerBase, Vector3)
Damages the target with the given damage, item, footprint, and hit location.
public bool Damage(float damage, DamageHandlerBase damageHandler, Vector3 exactHit)
Parameters
damage
floatThe damage to be dealt.
damageHandler
DamageHandlerBaseThe PlayerStatsSystem.DamageHandlerBase dealing the damage.
exactHit
Vector3The exact location of the hit.
Returns
- bool
Whether the damage was sent.
Get(ShootingTarget)
Gets the ShootingTargetToy belonging to the AdminToys.ShootingTarget.
public static ShootingTargetToy Get(ShootingTarget shootingTarget)
Parameters
shootingTarget
ShootingTargetThe AdminToys.ShootingTarget instance.
Returns
- ShootingTargetToy
The corresponding ShootingTargetToy instance.