Documentation ¶
Index ¶
- Variables
- func Collision(x int, y int) bool
- func CollisionF(x float32, y float32) bool
- func Height() int
- func Height32() int32
- func InBounds(x int, y int) bool
- func Set(level *Level)
- func Width() int
- func Width32() int32
- type Level
- func (*Level) Descriptor() ([]byte, []int)deprecated
- func (self *Level) Enlarge(width int32, height int32)
- func (x *Level) GetCeilingTextures() []byte
- func (x *Level) GetCollision() []byte
- func (x *Level) GetFloorTextures() []byte
- func (x *Level) GetHeight() int32
- func (x *Level) GetWallTextures() []byte
- func (x *Level) GetWidth() int32
- func (self *Level) InBounds(x int, y int) bool
- func (*Level) ProtoMessage()
- func (x *Level) ProtoReflect() protoreflect.Message
- func (x *Level) Reset()
- func (self *Level) Save(path string) error
- func (self *Level) SaveCollision(x int, y int) bool
- func (self *Level) SetCollision(x int, y int, collision bool)
- func (x *Level) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var CollisionRound = float32(0.4921875)
View Source
var File_pkg_engine_level_level_proto protoreflect.FileDescriptor
Functions ¶
func CollisionF ¶
Types ¶
type Level ¶
type Level struct { Width int32 `protobuf:"varint,1,opt,name=width,proto3" json:"width,omitempty"` Height int32 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` Collision []byte `protobuf:"bytes,3,opt,name=collision,proto3" json:"collision,omitempty"` FloorTextures []byte `protobuf:"bytes,4,opt,name=floor_textures,json=floorTextures,proto3" json:"floor_textures,omitempty"` WallTextures []byte `protobuf:"bytes,5,opt,name=wall_textures,json=wallTextures,proto3" json:"wall_textures,omitempty"` CeilingTextures []byte `protobuf:"bytes,6,opt,name=ceiling_textures,json=ceilingTextures,proto3" json:"ceiling_textures,omitempty"` // contains filtered or unexported fields }
func (*Level) Descriptor
deprecated
func (*Level) Enlarge ¶
Enlarge the level to the given width and height. If the level is already larger than the given width and height, this function does nothing. If the level is smaller than the given width and height, the level is enlarged to the given width and height. The new cells are filled with the value 0. The object is modified in place.
func (*Level) GetCeilingTextures ¶
func (*Level) GetCollision ¶
func (*Level) GetFloorTextures ¶
func (*Level) GetWallTextures ¶
func (*Level) ProtoMessage ¶
func (*Level) ProtoMessage()
func (*Level) ProtoReflect ¶
func (x *Level) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.