mob

package
v0.0.0-...-e6da677 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2013 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package mob defines the types for the creatures in Teratogen.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fov

type Fov struct {
	// contains filtered or unexported fields
}

A field of view for mobs.

func NewFov

func NewFov() (result *Fov)

func (*Fov) ClearFov

func (f *Fov) ClearFov()

func (*Fov) FovChart

func (f *Fov) FovChart() space.Chart

func (*Fov) Init

func (f *Fov) Init()

func (*Fov) MarkFov

func (f *Fov) MarkFov(pt image.Point, loc space.Location)

func (*Fov) MoveFovOrigin

func (f *Fov) MoveFovOrigin(vec image.Point)

type Mob

type Mob struct {
	// contains filtered or unexported fields
}

func New

func New(w *world.World, spec Spec) (result *Mob)

func (*Mob) AddHealth

func (m *Mob) AddHealth(amount int)

func (*Mob) AddShield

func (m *Mob) AddShield(amount int)

func (*Mob) BlocksMove

func (m *Mob) BlocksMove() bool

func (*Mob) Damage

func (m *Mob) Damage(amount int)

func (*Mob) Footprint

func (m *Mob) Footprint() *space.FootprintTemplate

func (*Mob) Health

func (m *Mob) Health() int

func (*Mob) Icon

func (m *Mob) Icon() gfx.ImageSpec

func (*Mob) Init

func (m *Mob) Init(w *world.World, spec Spec)

func (*Mob) MaxHealth

func (m *Mob) MaxHealth() int

func (*Mob) Shield

func (m *Mob) Shield() int

func (*Mob) Sprite

func (m *Mob) Sprite(offset image.Point) gfx.Sprite

type PC

type PC struct {
	Mob
	Fov
}

func NewPC

func NewPC(w *world.World, spec Spec) (result *PC)

type Spec

type Spec struct {
	Icon      gfx.ImageSpec
	MaxHealth int
	IsBig     bool
}

Jump to

Keyboard shortcuts

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