weapon

package
v0.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2024 License: MIT, BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExplosionDistanceScale   = 1.5
	ExplosionSelfDamageScale = 0.5
)

Variables

Functions

func FlattenAmmo

func FlattenAmmo(m map[ID]int32) (values []int32)

Flattens m into a slice

Types

type ID

type ID int32
const (
	Saw ID = iota
	Shotgun
	Minigun
	RocketLauncher
	Rifle
	GrenadeLauncher
	Pistol
)

type Weapon

type Weapon struct {
	ID              ID
	Sound           sound.ID
	ReloadTime      int32
	Damage          int32
	Spread          int32
	ProjectileSpeed int32
	Recoil          int32
	Range           float64
	Rays            int32
	HitPush         int32
	ExplosionRadius float64
	TimeToLive      int32
	AmmoPickUpSize  int32
}

func ByID

func ByID(id ID) Weapon

func SpawnAmmoCapture

func SpawnAmmoCapture() (map[ID]int32, Weapon)

func SpawnAmmoEffic

func SpawnAmmoEffic() (map[ID]int32, Weapon)

func SpawnAmmoFFA

func SpawnAmmoFFA() (map[ID]int32, Weapon)

func SpawnAmmoInsta

func SpawnAmmoInsta() (map[ID]int32, Weapon)

func SpawnAmmoTactics

func SpawnAmmoTactics() (map[ID]int32, Weapon)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL