display

package
v0.0.0-...-db4c50c Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2020 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BeingSpriteInit

func BeingSpriteInit() error

BeingSpriteInit initializes the being sprites out of beings already present in the world

func FoodSpriteInit

func FoodSpriteInit() error

func Run

func Run(goworld GoWorld.World)

Run draws the initial terrain Provide screen width and height and a initialized world

Types

type BeingSprite

type BeingSprite struct {
	Being *GoWorld.Being // The Being this sprite belongs to
	// contains filtered or unexported fields
}

BeingSprite is the image representing a being on the display

func (*BeingSprite) New

func (bs *BeingSprite) New(id uuid.UUID)

New creates a new being sprite based on being with ID

func (*BeingSprite) Update

func (bs *BeingSprite) Update()

Update on a being Sprite moves it in the world und updates its coordinates

type BeingSprites

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

BeingSprites is and array of BeingSprite

func (*BeingSprites) Update

func (bss *BeingSprites) Update()

Update on BeingSprites calls the update function for every individual sprite

type FoodSprite

type FoodSprite struct {
	Food *GoWorld.Food // The food object the sprite belongs to
	// contains filtered or unexported fields
}

func (*FoodSprite) New

func (fs *FoodSprite) New(id uuid.UUID)

New creates a new food sprite based on ID from GoWorld.Food

func (*FoodSprite) Update

func (fs *FoodSprite) Update()

type FoodSprites

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

FoodSprites is an array of FoodSprite

Jump to

Keyboard shortcuts

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