entity

package
v0.0.0-...-b952f1b Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetComponent

func GetComponent[T any](e IEntity) T

Types

type Entity

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

func NewEntity

func NewEntity() *Entity

func (*Entity) AddComponent

func (o *Entity) AddComponent(obj interface{})

func (*Entity) Close

func (o *Entity) Close()

func (*Entity) GetComponent

func (o *Entity) GetComponent(obj interface{}) interface{}

func (*Entity) RemoveComponent

func (o *Entity) RemoveComponent(obj interface{})

func (*Entity) Start

func (o *Entity) Start()

type IEntity

type IEntity interface {
	AddComponent(obj interface{})
	GetComponent(interface{}) interface{}
	RemoveComponent(obj interface{})
	Start()
	Close()
}

Jump to

Keyboard shortcuts

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