piloop

package
v0.30.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package piloop defines events published during the game loop.

It enables adding logic from any component, including those created by third parties.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DebugTarget

func DebugTarget() pievent.Target[Event]

func Target

func Target() pievent.Target[Event]

Types

type Event

type Event string
const (
	EventGameStarted  Event = "game_started"  // just before first frame
	EventFrameStarted Event = "frame_started" // beginning of the frame
	EventUpdate       Event = "update"        // after pi.Update
	EventLateUpdate   Event = "late_draw"     // after EventUpdate
	EventDraw         Event = "draw"          // after pi.Draw
	EventLateDraw     Event = "late_draw"     // after EventDraw
	EventWindowClosed Event = "window_closed" // when user closes the window (desktop only)
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL