Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
MouthEnabled = false
)
Functions ¶
This section is empty.
Types ¶
type DirectionT ¶
type DirectionT uint8
const ( DirectionUp DirectionT = iota DirectionDown DirectionLeft DirectionRight DirectionTotal )
func (DirectionT) IsVertical ¶
func (d DirectionT) IsVertical() bool
type Snake ¶
type Snake struct { Speed float64 UnitHead *Unit FoodEaten uint8 // contains filtered or unexported fields }
func NewSnakeRandDir ¶
func NewSnakeRandDirLoc ¶
func (*Snake) LastDirection ¶
func (s *Snake) LastDirection() DirectionT
type Turn ¶
type Turn struct {
// contains filtered or unexported fields
}
func NewTurn ¶
func NewTurn(directionFrom, directionTo DirectionT) *Turn
type Unit ¶
type Unit struct { HeadCenter c.Vec64 Direction DirectionT CompCollision c.TeleComp CompBody c.TeleCompImage CompTriangDebug c.TeleCompTriang CompTriangHead c.TeleCompTriang CompTriangTail c.TeleCompTriang Next *Unit // contains filtered or unexported fields }
func (*Unit) CollEnabled ¶
Implement collidable interface ------------------------------
func (*Unit) CollisionRects ¶
func (*Unit) DrawDebugInfo ¶
func (u *Unit) DrawDebugInfo(dst *ebiten.Image)
Click to show internal directories.
Click to hide internal directories.