Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DrawableInformation ¶
type DrawableInformation struct { // Width of image Width uint32 // Height of image Height uint32 // IsFlipped image flipped horizontally ? IsFlipped bool // TextureData about image TextureData *data.TextureData // FontData about text FontData *data.FontData // Color modifier Color *Color // Text name of object, or simple UI text in the screen Text *Text }
DrawableInformation asset data
type Position ¶
type Position struct { // X coordinate on the screen X int32 // Y coordinate on the screen Y int32 sync.Mutex }
Position in screen
type SceneObject ¶
type SceneObject interface { // OnUpdate event called on each tick to update state // Make actual data updates for object here OnUpdate() // GetDrawableInformation about object GetDrawableInformation() *DrawableInformation // GetPosition in the scene GetPosition() *Position }
SceneObject interface represents as actor in the scene, can be anything
type StaticObject ¶
type StaticObject struct { Position *Position DrawableInformation *DrawableInformation }
StaticObject not movable, not intractable just image on screen
func NewStaticObject ¶
func NewStaticObject(position *Position, drawableInformation *DrawableInformation) *StaticObject
NewStaticObject simple static object, can image, can be building
func (*StaticObject) GetDrawableInformation ¶
func (s *StaticObject) GetDrawableInformation() *DrawableInformation
GetDrawableInformation about object
func (*StaticObject) GetPosition ¶
func (s *StaticObject) GetPosition() *Position
GetPosition in the scene
func (*StaticObject) OnUpdate ¶
func (s *StaticObject) OnUpdate()
OnUpdate will do nothing, it's static object
type TextObject ¶
type TextObject struct { Position *Position DrawableInformation *DrawableInformation // contains filtered or unexported fields }
TextObject simple letter object
func NewTextObject ¶
func NewTextObject(position *Position, font *data.FontData, color *Color) *TextObject
NewTextObject to show in scene
func (*TextObject) GetDrawableInformation ¶
func (t *TextObject) GetDrawableInformation() *DrawableInformation
GetDrawableInformation about object
func (*TextObject) GetPosition ¶
func (t *TextObject) GetPosition() *Position
GetPosition in the scene
func (*TextObject) SetTextField ¶
func (t *TextObject) SetTextField(textField string)
SetTextField of object
Click to show internal directories.
Click to hide internal directories.