Documentation ¶
Index ¶
- type CollFunc
- type CollisionEvent
- type FontOptions
- type IBgColor
- type ICamera
- type ICollider
- type IGOMap
- type IGameBase
- type IRigidbody
- type IScene
- type ISprite
- type ISpriteOptions
- type ITileMap
- type ITransform
- type IUIButton
- type IUIText
- type SceneF
- type UIButtonClickEvent
- type UIButtonClickF
- type UIButtonHoverEvent
- type UIButtonHoverF
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CollFunc ¶
type CollFunc func(coll CollisionEvent) error
type CollisionEvent ¶
type CollisionEvent struct { GameBase IGameBase OtherRB IRigidbody Tags *ctags.CTags }
type ICamera ¶
type ICamera interface { GetTransform() ITransform GetViewRange() float64 SetViewRange(viewRange float64) GetResolutionWidth() int GetResolutionHeight() int GetResolutionVector() *vector2.Vector2 SetResolution(width int, height int) SetResolutionWidth(width int) SetResolutionHeight(height int) GetOffset() *vector2.Vector2 SetOffset(offset *vector2.Vector2) GetID() string }
type IGOMap ¶
type IGOMap interface { // Must be called before all the operations. SetupGame(gameBase IGameBase) // Tries to get the game object by given name. Get(name string) (i interface{}, ok bool) // Registers a new game object. If Awake() function implemented, // it will be called. This will be applied to all the components // of the game object. Register(name string, gameObject interface{}) error // Unregisters the game object. If Destroy() function implemented, // it will be called. This will be applied to all the components // of the game object. Unregister(name string) error // Calls Update(), PhysUpdate() functions. Update() error // Calls Draw(), DrawUI() functions, previously sorts it by // priority. Draw(screen *ebiten.Image) error // One-time function, that must be called from Scene.Enter() // only once. Starts all the queued startables, that implements // StartableQueued interface. StartQueuedStartables() error // Unregisters all the game objects. UnregisterAll() error }
Not full implementation of the GOMap interface.
type IRigidbody ¶
type IRigidbody interface { GetTransform() ITransform GetColliders() []ICollider SetColliders(colliders []ICollider) GetMass() float64 SetMass(mass float64) GetCurrentVelocity() *vector2.Vector2 SetCurrentVelocity(velocity *vector2.Vector2) OnCollision(ocf CollFunc) ExitCollision(ecf CollFunc) Activate(gb IGameBase) Deactivate(gb IGameBase) GetID() string // Implement goi.Component }
type IScene ¶
type IScene interface { Enter() error Exit() error SetEnterF(enterF SceneF) SetExitF(exitF SceneF) SetMainCamera(cam ICamera) error GetMainCamera() ICamera GetGOMap() IGOMap SetCurrentRigidbodies([]IRigidbody) GetCurrentRigidbodies() []IRigidbody }
type ISprite ¶
type ISprite interface { GetTransform() ITransform GetImage() *ebiten.Image SetImage(image *ebiten.Image) GetOptions() ISpriteOptions SetOptions(opts ISpriteOptions) GetPivot() *vector2.Vector2 GetPivotOpposite() *vector2.Vector2 GetPivotScaled() *vector2.Vector2 GetPivotOppositeScaled() *vector2.Vector2 SetPivot(pivot *vector2.Vector2) GetImageSize() *vector2.Vector2 GetBoudingBox() (bbA, bbB *vector2.Vector2) GetID() string }
type ISpriteOptions ¶
type ITileMap ¶
type ITileMap[T any] interface { GetTransform() ITransform PlaceTile(localX, localY int, localRot, localLayer float64, tile T) ITransform RemoveTile(localX, localY int, localLayer float64) bool }
type ITransform ¶
type IUIButton ¶
type IUIButton interface { OnClick(onClickF UIButtonClickF) ExitClick(exitClickF UIButtonClickF) OnHover(onHover UIButtonHoverF) ExitHover(exitHover UIButtonHoverF) GetID() string }
type UIButtonClickEvent ¶
type UIButtonClickF ¶
type UIButtonClickF func(e UIButtonClickEvent) error
type UIButtonHoverEvent ¶
type UIButtonHoverF ¶
type UIButtonHoverF func(e UIButtonHoverEvent) error
Click to show internal directories.
Click to hide internal directories.