scr

package
v0.1.28 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: LGPL-2.1 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Name      = self.Name
	Using     = self.Using
	Install   = self.Install
	Uninstall = self.Uninstall
)
View Source
var With _Option

Functions

func ComponentWith

func ComponentWith(name, script string, nonRemovable bool, extra ...map[string]any) pt.ComponentAttribute

ComponentWith 创建脚本化组件原型属性,用于注册实体原型时自定义相关属性

func ComponentWithT

func ComponentWithT[T any](name, script string, nonRemovable bool, extra ...map[string]any) pt.ComponentAttribute

ComponentWithT 创建脚本化组件原型属性,用于注册实体原型时自定义相关属性

func EntityWith added in v0.1.28

func EntityWith(prototype, script string, scope *ec.Scope, componentAwakeOnFirstTouch, componentUniqueID *bool, extra ...map[string]any) pt.EntityAttribute

EntityWith 创建脚本化实体原型属性,用于注册实体原型时自定义相关属性

func EntityWithT added in v0.1.28

func EntityWithT[T any](prototype, script string, scope *ec.Scope, componentAwakeOnFirstTouch, componentUniqueID *bool, extra ...map[string]any) pt.EntityAttribute

EntityWithT 创建脚本化实体原型属性,用于注册实体原型时自定义相关属性

Types

type Component

type Component struct {
	framework.ComponentBehavior
}

Component 脚本化组件

func (*Component) Awake

func (c *Component) Awake()

Awake 生命周期Awake

func (*Component) Callee

func (c *Component) Callee(method string) reflect.Value

Callee 被调函数

func (*Component) Dispose

func (c *Component) Dispose()

Dispose 生命周期Dispose

func (*Component) Shut

func (c *Component) Shut()

Shut 生命周期Shut

func (*Component) Start

func (c *Component) Start()

Start 生命周期Start

type ComponentEnableLateUpdate

type ComponentEnableLateUpdate struct {
	Component
}

ComponentEnableLateUpdate 脚本化组件,支持LateUpdate

func (*ComponentEnableLateUpdate) LateUpdate

func (c *ComponentEnableLateUpdate) LateUpdate()

LateUpdate 生命周期LateUpdate

type ComponentEnableUpdate

type ComponentEnableUpdate struct {
	Component
}

ComponentEnableUpdate 脚本化组件,支持Update

func (*ComponentEnableUpdate) Update

func (c *ComponentEnableUpdate) Update()

Update 生命周期Update

type ComponentEnableUpdateAndLateUpdate

type ComponentEnableUpdateAndLateUpdate struct {
	Component
}

ComponentEnableUpdateAndLateUpdate 脚本化组件,支持Update、LateUpdate

func (*ComponentEnableUpdateAndLateUpdate) LateUpdate

func (c *ComponentEnableUpdateAndLateUpdate) LateUpdate()

LateUpdate 生命周期LateUpdate

func (*ComponentEnableUpdateAndLateUpdate) Update

Update 生命周期Update

type Entity added in v0.1.28

type Entity struct {
	framework.EntityBehavior
}

Entity 脚本化实体

func (*Entity) Awake added in v0.1.28

func (c *Entity) Awake()

Awake 生命周期Awake

func (*Entity) Callee added in v0.1.28

func (c *Entity) Callee(method string) reflect.Value

Callee 被调函数

func (*Entity) Dispose added in v0.1.28

func (c *Entity) Dispose()

Dispose 生命周期Dispose

func (*Entity) Shut added in v0.1.28

func (c *Entity) Shut()

Shut 生命周期Shut

func (*Entity) Start added in v0.1.28

func (c *Entity) Start()

Start 生命周期Start

type EntityEnableLateUpdate added in v0.1.28

type EntityEnableLateUpdate struct {
	Entity
}

EntityEnableLateUpdate 脚本化实体,支持LateUpdate

func (*EntityEnableLateUpdate) LateUpdate added in v0.1.28

func (c *EntityEnableLateUpdate) LateUpdate()

LateUpdate 生命周期LateUpdate

type EntityEnableUpdate added in v0.1.28

type EntityEnableUpdate struct {
	Entity
}

EntityEnableUpdate 脚本化实体,支持Update

func (*EntityEnableUpdate) Update added in v0.1.28

func (c *EntityEnableUpdate) Update()

Update 生命周期Update

type EntityEnableUpdateAndLateUpdate added in v0.1.28

type EntityEnableUpdateAndLateUpdate struct {
	Entity
}

EntityEnableUpdateAndLateUpdate 脚本化实体,支持Update、LateUpdate

func (*EntityEnableUpdateAndLateUpdate) LateUpdate added in v0.1.28

func (c *EntityEnableUpdateAndLateUpdate) LateUpdate()

LateUpdate 生命周期LateUpdate

func (*EntityEnableUpdateAndLateUpdate) Update added in v0.1.28

func (c *EntityEnableUpdateAndLateUpdate) Update()

Update 生命周期Update

type IScript

type IScript interface {
	// Hotfix 热更新
	Hotfix() error
	// Solution 解决方案
	Solution() *dynamic.Solution
}

IScript 脚本插件接口

type LoadedCB

LoadedCB 加载完成回调

type LoadingCB

LoadingCB 开始加载回调

type ScriptOptions

type ScriptOptions struct {
	PkgRoot    string             // 包根路径
	Projects   []*dynamic.Project // 脚本工程列表
	AutoHotFix bool               // 自动热更新
	LoadingCB  LoadingCB          // 加载完成回调
	LoadedCB   LoadedCB           // 加载完成回调
}

ScriptOptions 所有选项

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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