Search Results for

    Show / Hide Table of Contents

    Class Projectile

    A wrapper class for Projectile.

    Inheritance
    System.Object
    TypeCastObject<Pickup>
    Pickup
    Projectile
    TimeGrenadeProjectile
    Implements
    IWrapper<InventorySystem.Items.Pickups.ItemPickupBase>
    IWorldSpace
    IPosition
    IRotation
    IWrapper<InventorySystem.Items.ThrowableProjectiles.ThrownProjectile>
    Inherited Members
    Pickup.List
    Pickup.GameObject
    Pickup.Transform
    Pickup.Rigidbody
    Pickup.Room
    Pickup.PhysicsModule
    Pickup.Serial
    Pickup.Scale
    Pickup.Weight
    Pickup.PickupTime
    Pickup.Type
    Pickup.IsLocked
    Pickup.Info
    Pickup.PreviousOwner
    Pickup.InUse
    Pickup.Position
    Pickup.RelativePosition
    Pickup.Rotation
    Pickup.IsSpawned
    Pickup.Get(ItemPickupBase)
    Pickup.Get(UInt16)
    Pickup.Get(GameObject)
    Pickup.Get(IEnumerable<ItemPickupBase>)
    Pickup.Get(ItemType)
    Pickup.Get(IEnumerable<GameObject>)
    Pickup.Get<T>(IEnumerable<ItemPickupBase>)
    Pickup.Get<T>(ItemType)
    Pickup.Get<T>(IEnumerable<GameObject>)
    Pickup.Create(ItemType)
    Pickup.CreateAndSpawn(ItemType, Vector3, Quaternion, Player)
    Pickup.Spawn(Pickup, Vector3, Quaternion, Player)
    Pickup.PickupTimeForPlayer(Player)
    Pickup.Spawn()
    Pickup.Spawn(Vector3, Quaternion, Player)
    Pickup.UnSpawn()
    Pickup.Destroy()
    Pickup.Clone()
    Pickup.InitializeProperties(ItemBase)
    TypeCastObject<Pickup>.Cast<TObject>()
    TypeCastObject<Pickup>.Cast<TObject>(TObject)
    TypeCastObject<Pickup>.As<TObject>()
    TypeCastObject<Pickup>.Is<TObject>(TObject)
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Exiled.API.Features.Pickups.Projectiles
    Assembly: Exiled.API.dll
    Syntax
    public class Projectile : Pickup, IWrapper<ItemPickupBase>, IWorldSpace, IPosition, IRotation, IWrapper<ThrownProjectile>

    Properties

    | Improve this Doc View Source

    Base

    Gets the InventorySystem.Items.ThrowableProjectiles.ThrownProjectile that this class is encapsulating.

    Declaration
    public ThrownProjectile Base { get; }
    Property Value
    Type Description
    InventorySystem.Items.ThrowableProjectiles.ThrownProjectile
    | Improve this Doc View Source

    ProjectileType

    Gets the ProjectileType of the item.

    Declaration
    public ProjectileType ProjectileType { get; }
    Property Value
    Type Description
    ProjectileType

    Methods

    | Improve this Doc View Source

    Activate()

    Activates the current Projectile.

    Declaration
    public void Activate()
    | Improve this Doc View Source

    Create(ProjectileType)

    Creates and returns a new Projectile with the proper inherited subclass.

    Based on the projectiletype, the returned Projectile can be casted into a subclass to gain more control over the object.
    The following have their own respective classes:
    - FragGrenade can be casted to ExplosionGrenadeProjectile.
    - Flashbang can be casted to FlashbangProjectile.
    - Scp018 A and B variants can be casted to Scp018Projectile.
    - Scp2176 can be casted to Scp2176Projectile.

    Projectile that are not listed will cause an Exception.

    Declaration
    public static Projectile Create(ProjectileType projectiletype)
    Parameters
    Type Name Description
    ProjectileType projectiletype

    The ProjectileType of the pickup.

    Returns
    Type Description
    Projectile

    The created Pickup.

    | Improve this Doc View Source

    CreateAndSpawn(ProjectileType, Vector3, Quaternion, Boolean, Player)

    Creates and spawns a Projectile.

    Declaration
    public static Projectile CreateAndSpawn(ProjectileType type, Vector3 position, Quaternion rotation, bool shouldBeActive = true, Player previousOwner = null)
    Parameters
    Type Name Description
    ProjectileType type

    The ItemType of the pickup.

    UnityEngine.Vector3 position

    The position to spawn the Projectile at.

    UnityEngine.Quaternion rotation

    The rotation to spawn the Projectile.

    System.Boolean shouldBeActive

    Whether the Projectile should be in active state after spawn.

    Player previousOwner

    An optional previous owner of the item.

    Returns
    Type Description
    Projectile

    The Projectile. See documentation of Create(ItemType) for more information on casting.

    | Improve this Doc View Source

    Spawn(Projectile, Vector3, Quaternion, Boolean, Player)

    Spawns a Projectile.

    Declaration
    [Obsolete("Use pickup.Spawn(Vector3, Quaternion, Player) instead of this", true)]
    public static Projectile Spawn(Projectile pickup, Vector3 position, Quaternion rotation, bool shouldBeActive = true, Player previousOwner = null)
    Parameters
    Type Name Description
    Projectile pickup

    The Projectile too spawn.

    UnityEngine.Vector3 position

    The position to spawn the Projectile at.

    UnityEngine.Quaternion rotation

    The rotation to spawn the Projectile.

    System.Boolean shouldBeActive

    Whether the Projectile should be in active state after spawn.

    Player previousOwner

    An optional previous owner of the item.

    Returns
    Type Description
    Projectile

    The Projectile Spawn.

    | Improve this Doc View Source

    Spawn(Vector3, Quaternion, Boolean, Player)

    Spawns a Projectile.

    Declaration
    public Projectile Spawn(Vector3 position, Quaternion rotation, bool shouldBeActive = true, Player previousOwner = null)
    Parameters
    Type Name Description
    UnityEngine.Vector3 position

    The position to spawn the Projectile at.

    UnityEngine.Quaternion rotation

    The rotation to spawn the Projectile.

    System.Boolean shouldBeActive

    Whether the Projectile should be in active state after spawn.

    Player previousOwner

    An optional previous owner of the item.

    Returns
    Type Description
    Projectile

    The spawned Projectile.

    | Improve this Doc View Source

    ToString()

    Returns the ProjectilePickup in a human readable format.

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String

    A string containing ProjectilePickup-related data.

    Overrides
    Pickup.ToString()

    Implements

    IWrapper<T>
    IWorldSpace
    IPosition
    IRotation
    IWrapper<T>

    Extension Methods

    ReflectionExtensions.CopyProperties(Object, Object)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX