Show / Hide Table of Contents

Class Weapon

Equippable, drawable Item.

Inheritance
System.Object
Item
Equippable
Weapon
Inherited Members
Equippable.AddAllowedSlot(EEquipSlot)
Equippable.IsAllowedSlot(EEquipSlot)
Equippable.RemoveAllowedSlot(EEquipSlot)
Equippable.Visible
Equippable.BreaksDownTo
Equippable.WornTexture
Item.ID
Item.IsCloned
Item.InventoryTexture
Item.Name
Item.Description
Item.Type
Item.CanDrop
Item.IsStackable
Item.AvailableOnStartMenu
Item.HasTag(EItemTag)
Item.AddTag(EItemTag)
Item.RemoveTag(EItemTag)
Item.AddToGame(String)
Item.Clone()
Namespace: Mannequin.Bindings
Assembly: Collapse.dll
Syntax
public class Weapon : Equippable

Constructors

Weapon(String)

Create a new Weapon based on an existing game asset (see data/items/weapons)

Declaration
public Weapon(string asset)
Parameters
Type Name Description
System.String asset

Properties

AdditionalBulletsPerShot

The number of additional bullets to shoot per shot

Declaration
public int AdditionalBulletsPerShot { get; set; }
Property Value
Type Description
System.Int32

AdditionalBulletsSpread

The spread of the additional bullets defined in AdditionalBulletsPerShot

Declaration
public int AdditionalBulletsSpread { get; set; }
Property Value
Type Description
System.Int32

BaseDamage

This weapon's base damage amount

Declaration
public int BaseDamage { get; set; }
Property Value
Type Description
System.Int32

BulletSpeed

The speed of bullets fired from this Weapon

Declaration
public int BulletSpeed { get; set; }
Property Value
Type Description
System.Int32

BulletSprite

The sprite of bullets fired from this

Declaration
public Texture BulletSprite { get; set; }
Property Value
Type Description
Texture

CriticalChance

The chance of getting a critical hit

Declaration
public int CriticalChance { get; set; }
Property Value
Type Description
System.Int32

DamageVariance

Declaration
public int DamageVariance { get; set; }
Property Value
Type Description
System.Int32

HasBulletTrail

Whether this weapon's bullets have a trail or not

Declaration
public bool HasBulletTrail { get; set; }
Property Value
Type Description
System.Boolean

HitSFX

The Sound to play when this Weapon hits

Declaration
public Sound HitSFX { get; set; }
Property Value
Type Description
Sound

IdealAmmoCountToCarry

The amount of ammo each Survivor will attempt to pick up

Declaration
public int IdealAmmoCountToCarry { get; set; }
Property Value
Type Description
System.Int32

MagazineSize

The size of a magazine

Declaration
public int MagazineSize { get; set; }
Property Value
Type Description
System.Int32

MaxRange

This weapon's maximum range

Declaration
public int MaxRange { get; set; }
Property Value
Type Description
System.Int32

MaxRangeAccuracy

This weapon's accuracy at maximum range

Declaration
public float MaxRangeAccuracy { get; set; }
Property Value
Type Description
System.Single

MinRange

This weapon's minimum range

Declaration
public int MinRange { get; set; }
Property Value
Type Description
System.Int32

MinRangeAccuracy

This weapon's accuracy at minimum range

Declaration
public float MinRangeAccuracy { get; set; }
Property Value
Type Description
System.Single

RateOfFire

This weapon's fire rate

Declaration
public int RateOfFire { get; set; }
Property Value
Type Description
System.Int32

ReloadSFX

The Sound to play when this Weapon is reloading

Declaration
public Sound ReloadSFX { get; set; }
Property Value
Type Description
Sound

ReloadTime

The time it takes to reload this Weapon

Declaration
public int ReloadTime { get; set; }
Property Value
Type Description
System.Int32

ShootSFX

The Sound to play when this Weapon is fired.

Declaration
public Sound ShootSFX { get; set; }
Property Value
Type Description
Sound

SplashDamageLossFromDistance

Splash damage reduction. The target tile will receive the base damage, and then tiles around the target tile will receive the base damage - (SplashDamageLossFromDistance * number of tiles away)

Declaration
public int SplashDamageLossFromDistance { get; set; }
Property Value
Type Description
System.Int32

SplashDamageRange

The range splash damage has (i.e. with RPGs)

Declaration
public int SplashDamageRange { get; set; }
Property Value
Type Description
System.Int32

WeaponType

This weapon's type.

Declaration
public EWeaponType WeaponType { get; set; }
Property Value
Type Description
EWeaponType

Methods

Combine(Weapon)

Clones this Weapon and combines its stats with another.

Declaration
public Weapon Combine(Weapon added)
Parameters
Type Name Description
Weapon added

The weapon to combine with

Returns
Type Description
Weapon

A cloned Weapon with its stats combined.

IsReadyToFire(Agent)

Whether the Agent carrying this Weapon can be fire the Weapon or not.

Declaration
public bool IsReadyToFire(Agent agent)
Parameters
Type Name Description
Agent agent

The Agent carrying this weapon

Returns
Type Description
System.Boolean

Whether the Weapon can be fired or not

Reload(Agent)

Tell an Agent holding this Weapon to reload it.

Declaration
public bool Reload(Agent agent)
Parameters
Type Name Description
Agent agent

The Agent carrying this weapon

Returns
Type Description
System.Boolean

Whether this weapon was successfully reloaded or not

Back to top © 2020 Anarkis Gaming. All rights reserved. Generated by DocFX