Show / Hide Table of Contents

Class WeaponCollection

Collection of weapons, triggering event when changes are made

Inheritance
object
WeaponCollection
Implements
IEnumerable<Weapon>
IEnumerable
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: SlipeServer.Server.Collections
Assembly: SlipeServer.Server.dll
Syntax
public class WeaponCollection : IEnumerable<Weapon>, IEnumerable

Constructors

| Edit this page View Source

WeaponCollection()

Declaration
public WeaponCollection()

Methods

| Edit this page View Source

Add(Weapon)

Declaration
public void Add(Weapon weapon)
Parameters
Type Name Description
Weapon weapon
| Edit this page View Source

Clear(bool)

Declaration
public void Clear(bool triggersUpdates = true)
Parameters
Type Name Description
bool triggersUpdates
| Edit this page View Source

Get(WeaponSlot)

Declaration
public Weapon? Get(WeaponSlot slot)
Parameters
Type Name Description
WeaponSlot slot
Returns
Type Description
Weapon
| Edit this page View Source

GetEnumerator()

Returns an enumerator that iterates through the collection.

Declaration
public IEnumerator<Weapon> GetEnumerator()
Returns
Type Description
IEnumerator<Weapon>

An enumerator that can be used to iterate through the collection.

| Edit this page View Source

Remove(Weapon)

Declaration
public void Remove(Weapon weapon)
Parameters
Type Name Description
Weapon weapon
| Edit this page View Source

Remove(WeaponSlot)

Declaration
public void Remove(WeaponSlot slot)
Parameters
Type Name Description
WeaponSlot slot
| Edit this page View Source

Remove(WeaponId)

Declaration
public void Remove(WeaponId type)
Parameters
Type Name Description
WeaponId type
| Edit this page View Source

SilentAdd(Weapon)

Adds a weapon without triggering the WeaponAdded event

Declaration
public void SilentAdd(Weapon weapon)
Parameters
Type Name Description
Weapon weapon

Events

| Edit this page View Source

WeaponAdded

Declaration
public event EventHandler<Weapon>? WeaponAdded
Event Type
Type Description
EventHandler<Weapon>
| Edit this page View Source

WeaponAmmoUpdated

Declaration
public event EventHandler<Weapon>? WeaponAmmoUpdated
Event Type
Type Description
EventHandler<Weapon>
| Edit this page View Source

WeaponRemoved

Declaration
public event EventHandler<Weapon>? WeaponRemoved
Event Type
Type Description
EventHandler<Weapon>

Implements

IEnumerable<T>
IEnumerable
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX