component

package
v0.1.6-alpha4 Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FixedUpdate

type FixedUpdate struct {
	// contains filtered or unexported fields
}

FixedUpdate 是一个专门模拟物理动作的实现

func NewFixedUpdate

func NewFixedUpdate(ctx context.Context, u IUpdate, deltaTime float64, endIndex int32) *FixedUpdate

NewFixedUpdate 创建一个FixedUpdate

func (*FixedUpdate) IsRunning

func (f *FixedUpdate) IsRunning() bool

IsRunning 判断update是否正在运行

func (*FixedUpdate) Start

func (f *FixedUpdate) Start() error

Start 开始

func (*FixedUpdate) Stop

func (f *FixedUpdate) Stop()

Stop 停止

type IUpdate

type IUpdate interface {

	// Awake 唤醒
	Awake() error

	// Update 执行update
	Update(int32)

	// Destroy 销毁时动作
	Destroy()
}

IUpdate 一个Game Update接口定义

Jump to

Keyboard shortcuts

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