character

package
v0.0.0-...-bf68151 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PlayerEventID = -1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Character

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

func NewEvent

func NewEvent(id int, x, y int) *Character

func NewPlayer

func NewPlayer(x, y int) *Character

func (*Character) BaseFrame

func (c *Character) BaseFrame() int

func (*Character) ChangeOpacity

func (c *Character) ChangeOpacity(opacity int, count int)

func (*Character) DecodeMsgpack

func (c *Character) DecodeMsgpack(dec *msgpack.Decoder) error

func (*Character) Dir

func (c *Character) Dir() data.Dir

func (*Character) DirCount

func (c *Character) DirCount() int

func (*Character) DirFix

func (c *Character) DirFix() bool

func (*Character) Draw

func (c *Character) Draw(screen *ebiten.Image, offsetX, offsetY int)

func (*Character) DrawFootPosition

func (c *Character) DrawFootPosition() (int, int)

func (*Character) DrawPosition

func (c *Character) DrawPosition() (int, int)

func (*Character) EncodeMsgpack

func (c *Character) EncodeMsgpack(enc *msgpack.Encoder) error

func (*Character) Erase

func (c *Character) Erase()

func (*Character) Erased

func (c *Character) Erased() bool

func (*Character) EventID

func (c *Character) EventID() int

func (*Character) FrameCount

func (c *Character) FrameCount() int

func (*Character) HasStoredState

func (c *Character) HasStoredState() bool

func (*Character) ImageSize

func (c *Character) ImageSize() (int, int)

func (*Character) IsChangingOpacity

func (c *Character) IsChangingOpacity() bool

func (*Character) IsMoving

func (c *Character) IsMoving() bool

func (*Character) Loop

func (c *Character) Loop() bool

func (*Character) Move

func (c *Character) Move(dir data.Dir)

func (*Character) Position

func (c *Character) Position() (int, int)

func (*Character) RestoreStoredState

func (c *Character) RestoreStoredState()

RestoreStoredState restores the last stored state. It is useful for reviving the character state after a temporary change.

func (*Character) SetDir

func (c *Character) SetDir(dir data.Dir)

func (*Character) SetDirFix

func (c *Character) SetDirFix(dirFix bool)

func (*Character) SetFrame

func (c *Character) SetFrame(frame int)

func (*Character) SetImage

func (c *Character) SetImage(imageType data.ImageType, imageName string)

func (*Character) SetSizeForTesting

func (c *Character) SetSizeForTesting(w, h int)

func (*Character) SetSpeed

func (c *Character) SetSpeed(speed data.Speed)

func (*Character) SetStepping

func (c *Character) SetStepping(stepping bool)

func (*Character) SetThrough

func (c *Character) SetThrough(through bool)

func (*Character) SetVisibility

func (c *Character) SetVisibility(visible bool)

func (*Character) SetWalking

func (c *Character) SetWalking(walking bool)

func (*Character) Size

func (c *Character) Size() (int, int)

func (*Character) Speed

func (c *Character) Speed() data.Speed

func (*Character) StoreState

func (c *Character) StoreState()

StoreState stores a subset of character state. It can be restored by calling RestoreStoredState.

func (*Character) Through

func (c *Character) Through() bool

func (*Character) TransferImmediately

func (c *Character) TransferImmediately(x, y int)

func (*Character) Turn

func (c *Character) Turn(dir data.Dir)

func (*Character) Update

func (c *Character) Update()

func (*Character) UpdateWithPage

func (c *Character) UpdateWithPage(page *data.Page)

type ImageInfo

type ImageInfo struct {
	SizeW int
	SizeH int
	Loop  bool
}

type StoredState

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

Jump to

Keyboard shortcuts

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