npc

package
v0.0.0-...-e57d4e3 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller interface {
	Conn() mnet.Client
	Send(mpacket.Packet)
}

Controller of the npc

type Data

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

Data for an npc in a field

func CreateFromData

func CreateFromData(spawnID int32, life nx.Life) Data

CreateFromData - creates npc from nx data

func (Data) AcknowledgeController

func (d Data) AcknowledgeController(plr Controller, inst instance, data []byte)

AcknowledgeController movement data

func (Data) Controller

func (d Data) Controller() Controller

Controller of npc

func (Data) FaceLeft

func (d Data) FaceLeft() bool

FaceLeft - does npc face left direction

func (Data) ID

func (d Data) ID() int32

ID of npc

func (Data) Pos

func (d Data) Pos() pos.Data

Pos of npc

func (*Data) RemoveController

func (d *Data) RemoveController()

RemoveController from npc

func (Data) Rx0

func (d Data) Rx0() int16

Rx0 of npc

func (Data) Rx1

func (d Data) Rx1() int16

Rx1 of npc

func (*Data) SetController

func (d *Data) SetController(controller Controller)

SetController of npc

func (Data) SpawnID

func (d Data) SpawnID() int32

SpawnID of npc

Jump to

Keyboard shortcuts

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