Documentation ¶
Index ¶
- Constants
- type Animation
- type Animations
- type Common
- type CommonsData
- type Frame
- func (bhvr *Frame) Anchor() r2.Point
- func (bhvr *Frame) Image() *ebiten.Image
- func (bhvr *Frame) Mask() *Mask
- func (bhvr *Frame) MaskType() MaskType
- func (bhvr *Frame) RemoveMask() *Frame
- func (bhvr *Frame) SetAnchor(p r2.Point) *Frame
- func (bhvr *Frame) SetAnchorToggle(pos FrameAnchorToggle) *Frame
- func (bhvr *Frame) SetImage(image *ebiten.Image) *Frame
- func (bhvr *Frame) SetMaskFill() *Frame
- func (bhvr *Frame) SetMaskRectangle(mask r2.Rect) *Frame
- type FrameAnchorToggle
- type InstanceData
- type Mask
- type MaskType
- type Sprite
Constants ¶
View Source
const (
DefaultAnimationName = "default"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Animations ¶
type Common ¶
type Common struct { gm.Instancer Sprite Sprite Position r2.Point // Position of the instance based on cartesian room Speed r2.Point // Velocity of the instance based on cartesian room Angle float64 // Angle of the instance based on sprite anchor Scale *r2.Point // Scale of the instance based on sprite anchor (Default (1, 1)) IsDrawMask bool // Draw instance's mask }
func (*Common) Data ¶
func (bhvr *Common) Data() gm.BehavioursData
func (*Common) TrasnformedMask ¶
type CommonsData ¶
var Data CommonsData
func (*CommonsData) Behaviour ¶
func (data *CommonsData) Behaviour() gm.Behaviour
func (*CommonsData) ByInstance ¶
func (data *CommonsData) ByInstance(indt gm.Object) *InstanceData
func (*CommonsData) DelInstance ¶
func (data *CommonsData) DelInstance(indt gm.Object)
func (*CommonsData) PostUpdate ¶
func (data *CommonsData) PostUpdate()
func (*CommonsData) PreUpdate ¶
func (data *CommonsData) PreUpdate()
type Frame ¶
type Frame struct {
// contains filtered or unexported fields
}
func (*Frame) RemoveMask ¶
func (*Frame) SetAnchorToggle ¶
func (bhvr *Frame) SetAnchorToggle(pos FrameAnchorToggle) *Frame
func (*Frame) SetMaskFill ¶
type FrameAnchorToggle ¶
type FrameAnchorToggle int
const ( Sprite_FrameAnchor_ToggleTopLeft FrameAnchorToggle = iota Sprite_FrameAnchor_ToggleTopCenter Sprite_FrameAnchor_ToggleTopRight Sprite_FrameAnchor_ToggleMiddleLeft Sprite_FrameAnchor_ToggleMiddleCenter Sprite_FrameAnchor_ToggleMiddleRight Sprite_FrameAnchor_ToggleBottomLeft Sprite_FrameAnchor_ToggleBottomCenter Sprite_FrameAnchor_ToggleBottomRight )
type InstanceData ¶
type InstanceData struct{}
type Mask ¶
type Mask struct {
// contains filtered or unexported fields
}
func (Mask) GeoTransform ¶
GeoTransform returns new Mask with already transformed by geoM
func (Mask) OuterRectangle ¶
OuterRectangle returns rectangle that contain this mask
type Sprite ¶
type Sprite struct { Animations Animations CurrentAnimation string CurrentFrame int }
func (*Sprite) GetCurrentFrame ¶
func (*Sprite) InsertFrame ¶
InsertFrame insert frame(s) at the end of the Animation named "animationName" by Image.
func (*Sprite) InsertFrameByImage ¶
InsertFrameByImage insert frame(s) at the end of the Animation named "animationName" by Image.
Click to show internal directories.
Click to hide internal directories.