Documentation
¶
Index ¶
- Constants
- func ComponentPtr[T any](e Entity, t Compotype) *T
- func ContainsComponent(e Entity, t Compotype) bool
- func DestroyComponent(e Entity, t Compotype)
- func GetDescriptor(v net.Conn) uintptr
- func InitNetModule() errnov1.Code
- func LocationOf(i int, j int) location
- func NewComponent[T any](e Entity, t Compotype, buff *Component) *T
- func NewComponentB[T any](e Entity, t Compotype) *T
- func SystemExists[T any]() bool
- func SystemPtr[T any]() *T
- func SystemRegister[T any](allocFn func(*System)) bool
- type ActivateFn
- type Component
- type ComponentManager
- func (x *ComponentManager) Components() [][]unsafe.Pointer
- func (x *ComponentManager) Contains(v Component) bool
- func (x *ComponentManager) ContainsA(e Entity, t Compotype) bool
- func (x *ComponentManager) Destroy(v Component)
- func (x *ComponentManager) FindFirstEntity(t Compotype, buff *Entity, condFn func(Entity, unsafe.Pointer) bool) bool
- func (x *ComponentManager) Get(v Component) unsafe.Pointer
- func (x *ComponentManager) Init() errnov1.Code
- func (x *ComponentManager) IterateB(v Compotype, fn func(Entity, unsafe.Pointer))
- func (x *ComponentManager) IterateC(e Entity, handlerFn func(t Compotype, ptr unsafe.Pointer))
- func (x *ComponentManager) Iterator(v Compotype) *Iterator[unsafe.Pointer]
- func (x *ComponentManager) Len(v Compotype) int
- func (x *ComponentManager) Navigate2(i location, buff *Component) errnov1.Code
- func (x *ComponentManager) New(e Entity, t Compotype, buff *Component) errnov1.Code
- func (x *ComponentManager) OnActivate()
- func (x *ComponentManager) OnAllLoaded()
- func (x *ComponentManager) OnPreLoad()
- func (x *ComponentManager) OnUnLoad()
- type ComponentMask
- func (x ComponentMask) Get(id int) byte
- func (x ComponentMask) Get64(id int) uint64
- func (x ComponentMask) Has(v Compotype) bool
- func (x ComponentMask) IsEmpty() bool
- func (x ComponentMask) Len() int
- func (x ComponentMask) Reset()
- func (x ComponentMask) Set64(id int, v uint64) ComponentMask
- func (x ComponentMask) String() string
- func (x ComponentMask) With(i Compotype) ComponentMask
- func (x ComponentMask) With8(id int, v uint8) ComponentMask
- func (x ComponentMask) With16(id int, v uint16) ComponentMask
- func (x ComponentMask) With32(id int, v uint32) ComponentMask
- func (x ComponentMask) With64(id int, v uint64) ComponentMask
- func (x ComponentMask) WithB(v ...Compotype) ComponentMask
- func (x ComponentMask) Without(i Compotype) ComponentMask
- type Compotype
- type CompotypeAllocator
- type CompotypeManager
- type DeactivateFn
- type DestroyFn
- type Entity
- type EntityManager
- func (x *EntityManager) Cleanup()
- func (x *EntityManager) Count() int
- func (x *EntityManager) Create() Entity
- func (x *EntityManager) Destroy(v Entity)
- func (x *EntityManager) Has(e Entity, t Compotype) bool
- func (x *EntityManager) HasComponent(e Entity, t Compotype) bool
- func (x *EntityManager) HasComponentB(e Entity, t Compotype) bool
- func (x *EntityManager) Init() errnov1.Code
- func (x *EntityManager) IsAlive(v Entity) bool
- func (x *EntityManager) Iterator() *Iterator[Entity]
- func (x *EntityManager) Mask(v Entity) ComponentMask
- func (x *EntityManager) Masks() []ComponentMask
- func (x *EntityManager) SetMask(e Entity, v ComponentMask)
- func (x *EntityManager) WithComponent(e Entity, v Compotype)
- func (x *EntityManager) WithComponents(e Entity, v ...Compotype)
- func (x *EntityManager) WithoutComponent(e Entity, v Compotype)
- type Event
- type EventManager
- func (x *EventManager) Count() int
- func (x *EventManager) Destroy()
- func (x *EventManager) Init() errnov1.Code
- func (x *EventManager) PostPublisherRun()
- func (x *EventManager) Publish(n string, v any)
- func (x *EventManager) PublishAsync(n string, v any)
- func (x *EventManager) Subscribe(k string, v ListenerFn) uint64
- func (x *EventManager) Unsubscribe(id uint64)
- type InitFn
- type Iterator
- func (x *Iterator[T]) Count() int
- func (x *Iterator[T]) First(buff *T, fn func(T) bool) bool
- func (x *Iterator[T]) ForEach(fn func(T))
- func (x *Iterator[T]) ForEachB(condFn func(T) bool) bool
- func (x *Iterator[T]) Get() T
- func (x *Iterator[T]) HasNext() bool
- func (x Iterator[T]) Next()
- func (x *Iterator[T]) Reset()
- type ListenerEntry
- type ListenerFn
- type NetConn
- type NetConnType
- type NetConnTypeManager
- type NetHandlerFn
- type NetHandlerManager
- func (x *NetHandlerManager) Exist(v NetworkHandler) bool
- func (x *NetHandlerManager) Get(v NetworkHandler) NetHandlerFn
- func (x *NetHandlerManager) Init() errnov1.Code
- func (x *NetHandlerManager) Register(nett NetConnType, msgt NetMessageType, fn NetHandlerFn) bool
- func (x *NetHandlerManager) Unregister(v NetworkHandler)
- type NetMessage
- func (x *NetMessage) Builder() *NetMessageBuilder
- func (x *NetMessage) Bytes(len int) []byte
- func (x *NetMessage) BytesB(offset, len int) []byte
- func (x *NetMessage) Closer() *byte
- func (x *NetMessage) Flags() NetMessageFlag
- func (x *NetMessage) Header() *byte
- func (x *NetMessage) HeaderChecksum() uint32
- func (x *NetMessage) HeaderRealChecksum() uint32
- func (x *NetMessage) KeyID() uint8
- func (x *NetMessage) Magic() uint32
- func (x *NetMessage) Payload() *byte
- func (x *NetMessage) PayloadChecksum() uint32
- func (x *NetMessage) PayloadLen() uint32
- func (x *NetMessage) PayloadRealChecksum() uint32
- func (x *NetMessage) Reserved() *byte
- func (x *NetMessage) Sequence() uint32
- func (x *NetMessage) SessionID() uint64
- func (x *NetMessage) String() string
- func (x *NetMessage) Timestamp() uint64
- func (x *NetMessage) TotalLen() uint32
- func (x *NetMessage) Type() NetMessageType
- func (x *NetMessage) Version() uint16
- type NetMessageBuilder
- func (x *NetMessageBuilder) Build()
- func (x *NetMessageBuilder) PutFlags(v NetMessageFlag) *NetMessageBuilder
- func (x *NetMessageBuilder) PutKeyID(v uint8) *NetMessageBuilder
- func (x *NetMessageBuilder) PutPayloadChecksum(v uint32) *NetMessageBuilder
- func (x *NetMessageBuilder) PutPayloadLen(v uint32) *NetMessageBuilder
- func (x *NetMessageBuilder) PutSequence(v uint32) *NetMessageBuilder
- func (x *NetMessageBuilder) PutSessionID(v uint64) *NetMessageBuilder
- func (x *NetMessageBuilder) PutTimestamp(v uint64) *NetMessageBuilder
- func (x *NetMessageBuilder) PutType(v uint32) *NetMessageBuilder
- func (x *NetMessageBuilder) ReserveBytes(offset int, v *byte, len int) *NetMessageBuilder
- type NetMessageFlag
- type NetMessageType
- type NetworkHandler
- type NetworkManager
- func (x *NetworkManager) Addr(v NetConn) net.Addr
- func (x *NetworkManager) Connect(conn net.Conn, typ NetConnType, buff *NetConn) errnov1.Code
- func (x *NetworkManager) Connection(v NetConn) net.Conn
- func (x *NetworkManager) Count() int
- func (x *NetworkManager) Destroy(v NetConn)
- func (x *NetworkManager) Handle(v NetConn, buff *uintptr) bool
- func (x *NetworkManager) Init() errnov1.Code
- func (x NetworkManager) IsAlive(v NetConn) bool
- func (x *NetworkManager) TCPAddr(v NetConn) *net.TCPAddr
- func (x *NetworkManager) Type(v NetConn) NetConnType
- type System
- type SystemManager
- func (x *SystemManager) Activate() bool
- func (x *SystemManager) Contains(v uintptr) bool
- func (x *SystemManager) Count() int
- func (x *SystemManager) Deactivate()
- func (x *SystemManager) Destroy()
- func (x *SystemManager) Init() errnov1.Code
- func (x *SystemManager) Load() errnov1.Code
- func (x *SystemManager) Register(allocFn func(*System) uintptr) bool
- func (x *SystemManager) System(v uintptr) *System
- func (x *SystemManager) Update(dt time.Duration)
- type UpdateFn
- type WorkerManager
- type World
- func (x *World) Activate() bool
- func (x *World) CreateCompotype(allocFn CompotypeAllocator, buff *Compotype) bool
- func (x *World) CreateEntity() Entity
- func (x *World) Deactivate()
- func (x *World) Destroy()
- func (x *World) Init() errnov1.Code
- func (x *World) Ticks() uint64
- func (x *World) Update(dt time.Duration)
Constants ¶
View Source
const ( NETMSG_MAGIC_VALUE = uint32(0xBEEEAAA3) NETMSG_VERSION = 1 NETMSG_HEADER_SIZE = 64 NETMSG_PAYLOAD_MAX_LENGTH = 1 << 20 NETMSG_GCM_SIZE = 16 NETMSG_RESERVE_SIZE = 16 NETMSG_PAYLOAD_WITH_GCM_SIZE = NETMSG_PAYLOAD_MAX_LENGTH + NETMSG_GCM_SIZE NETMSG_SIZE = NETMSG_HEADER_SIZE + NETMSG_PAYLOAD_MAX_LENGTH + NETMSG_GCM_SIZE // + gcm tag (16) )
View Source
const ConnectionsMax = uint64(0xFFFF_FFFF_FFFF_0000)
View Source
const MaxCompotypes = 1<<8 - 1
View Source
const MaxNetConnTypes = math.MaxUint8
Variables ¶
This section is empty.
Functions ¶
func ComponentPtr ¶
func ContainsComponent ¶
func DestroyComponent ¶
func GetDescriptor ¶
func InitNetModule ¶
func LocationOf ¶
func NewComponentB ¶
func SystemExists ¶
func SystemRegister ¶
Types ¶
type ActivateFn ¶
type ActivateFn = func() bool
type ComponentManager ¶
type ComponentManager struct {
// contains filtered or unexported fields
}
func Components ¶
func Components() *ComponentManager
func (*ComponentManager) Components ¶
func (x *ComponentManager) Components() [][]unsafe.Pointer
func (*ComponentManager) Contains ¶
func (x *ComponentManager) Contains(v Component) bool
func (*ComponentManager) ContainsA ¶
func (x *ComponentManager) ContainsA(e Entity, t Compotype) bool
func (*ComponentManager) Destroy ¶
func (x *ComponentManager) Destroy(v Component)
func (*ComponentManager) FindFirstEntity ¶
func (*ComponentManager) Init ¶
func (x *ComponentManager) Init() errnov1.Code
func (*ComponentManager) IterateB ¶
func (x *ComponentManager) IterateB(v Compotype, fn func(Entity, unsafe.Pointer))
func (*ComponentManager) IterateC ¶
func (x *ComponentManager) IterateC(e Entity, handlerFn func(t Compotype, ptr unsafe.Pointer))
func (*ComponentManager) Iterator ¶
func (x *ComponentManager) Iterator(v Compotype) *Iterator[unsafe.Pointer]
func (*ComponentManager) Len ¶
func (x *ComponentManager) Len(v Compotype) int
func (*ComponentManager) Navigate2 ¶
func (x *ComponentManager) Navigate2(i location, buff *Component) errnov1.Code
func (*ComponentManager) OnActivate ¶
func (x *ComponentManager) OnActivate()
OnActivate implements [ISystemComponent].
func (*ComponentManager) OnAllLoaded ¶
func (x *ComponentManager) OnAllLoaded()
func (*ComponentManager) OnPreLoad ¶
func (x *ComponentManager) OnPreLoad()
OnPreLoad implements [ISystemComponent].
func (*ComponentManager) OnUnLoad ¶
func (x *ComponentManager) OnUnLoad()
OnUnLoad implements [ISystemComponent].
type ComponentMask ¶
type ComponentMask [32]byte
func CreateComponentMask ¶
func CreateComponentMask() ComponentMask
func (ComponentMask) Get ¶
func (x ComponentMask) Get(id int) byte
func (ComponentMask) Get64 ¶
func (x ComponentMask) Get64(id int) uint64
func (ComponentMask) Has ¶
func (x ComponentMask) Has(v Compotype) bool
func (ComponentMask) IsEmpty ¶
func (x ComponentMask) IsEmpty() bool
func (ComponentMask) Reset ¶
func (x ComponentMask) Reset()
func (ComponentMask) Set64 ¶
func (x ComponentMask) Set64(id int, v uint64) ComponentMask
func (ComponentMask) String ¶
func (x ComponentMask) String() string
func (ComponentMask) With ¶
func (x ComponentMask) With(i Compotype) ComponentMask
func (ComponentMask) With8 ¶
func (x ComponentMask) With8(id int, v uint8) ComponentMask
func (ComponentMask) With16 ¶
func (x ComponentMask) With16(id int, v uint16) ComponentMask
func (ComponentMask) With32 ¶
func (x ComponentMask) With32(id int, v uint32) ComponentMask
func (ComponentMask) With64 ¶
func (x ComponentMask) With64(id int, v uint64) ComponentMask
func (ComponentMask) WithB ¶
func (x ComponentMask) WithB(v ...Compotype) ComponentMask
func (ComponentMask) Without ¶
func (x ComponentMask) Without(i Compotype) ComponentMask
type CompotypeAllocator ¶
type CompotypeManager ¶
type CompotypeManager struct {
// contains filtered or unexported fields
}
func Compotypes ¶
func Compotypes() *CompotypeManager
func (*CompotypeManager) Init ¶
func (x *CompotypeManager) Init() errnov1.Code
func (*CompotypeManager) Register ¶
func (x *CompotypeManager) Register(allocFn CompotypeAllocator, buff *Compotype) bool
type DeactivateFn ¶
type DeactivateFn = func()
type EntityManager ¶
type EntityManager struct {
// contains filtered or unexported fields
}
func Entities ¶
func Entities() *EntityManager
func (*EntityManager) Cleanup ¶
func (x *EntityManager) Cleanup()
func (*EntityManager) Count ¶
func (x *EntityManager) Count() int
func (*EntityManager) Create ¶
func (x *EntityManager) Create() Entity
func (*EntityManager) Destroy ¶
func (x *EntityManager) Destroy(v Entity)
DestroyEntitySystem -> ent.Destroy -> sync Publish("entity.destroy")
func (*EntityManager) HasComponent ¶
func (x *EntityManager) HasComponent(e Entity, t Compotype) bool
func (*EntityManager) HasComponentB ¶
func (x *EntityManager) HasComponentB(e Entity, t Compotype) bool
func (*EntityManager) Init ¶
func (x *EntityManager) Init() errnov1.Code
func (*EntityManager) IsAlive ¶
func (x *EntityManager) IsAlive(v Entity) bool
func (*EntityManager) Iterator ¶
func (x *EntityManager) Iterator() *Iterator[Entity]
func (*EntityManager) Mask ¶
func (x *EntityManager) Mask(v Entity) ComponentMask
func (*EntityManager) Masks ¶
func (x *EntityManager) Masks() []ComponentMask
func (*EntityManager) SetMask ¶
func (x *EntityManager) SetMask(e Entity, v ComponentMask)
func (*EntityManager) WithComponent ¶
func (x *EntityManager) WithComponent(e Entity, v Compotype)
func (*EntityManager) WithComponents ¶
func (x *EntityManager) WithComponents(e Entity, v ...Compotype)
func (*EntityManager) WithoutComponent ¶
func (x *EntityManager) WithoutComponent(e Entity, v Compotype)
type EventManager ¶
type EventManager struct {
// contains filtered or unexported fields
}
func Events ¶
func Events() *EventManager
func (*EventManager) Count ¶
func (x *EventManager) Count() int
func (*EventManager) Destroy ¶
func (x *EventManager) Destroy()
func (*EventManager) Init ¶
func (x *EventManager) Init() errnov1.Code
func (*EventManager) PostPublisherRun ¶
func (x *EventManager) PostPublisherRun()
func (*EventManager) Publish ¶
func (x *EventManager) Publish(n string, v any)
func (*EventManager) PublishAsync ¶
func (x *EventManager) PublishAsync(n string, v any)
PublishAsync implements [IManager].
func (*EventManager) Subscribe ¶
func (x *EventManager) Subscribe(k string, v ListenerFn) uint64
func (*EventManager) Unsubscribe ¶
func (x *EventManager) Unsubscribe(id uint64)
type Iterator ¶
type Iterator[T comparable] struct { // contains filtered or unexported fields }
func NewIterator ¶
func NewIterator[T comparable](v []T) *Iterator[T]
type ListenerEntry ¶
type ListenerEntry struct {
Id uint64
Lis ListenerFn
}
type ListenerFn ¶
type NetConn ¶
type NetConn uint64
func MakeNetConn ¶
func MakeNetConn() NetConn
func (NetConn) SetType ¶
func (x NetConn) SetType(v NetConnType) NetConn
func (NetConn) Type ¶
func (x NetConn) Type() NetConnType
type NetConnType ¶
type NetConnType uint8
func (NetConnType) Closer ¶
func (x NetConnType) Closer() uint8
func (NetConnType) Int ¶
func (x NetConnType) Int() int
type NetConnTypeManager ¶
type NetConnTypeManager struct {
// contains filtered or unexported fields
}
func NetConnTypes ¶
func NetConnTypes() *NetConnTypeManager
func (*NetConnTypeManager) Count ¶
func (x *NetConnTypeManager) Count() int
func (*NetConnTypeManager) Init ¶
func (x *NetConnTypeManager) Init() errnov1.Code
func (*NetConnTypeManager) Register ¶
func (x *NetConnTypeManager) Register(buff *NetConnType) bool
func (*NetConnTypeManager) Reset ¶
func (x *NetConnTypeManager) Reset()
type NetHandlerManager ¶
type NetHandlerManager struct {
// contains filtered or unexported fields
}
func NetworkHandlers ¶
func NetworkHandlers() *NetHandlerManager
func (*NetHandlerManager) Exist ¶
func (x *NetHandlerManager) Exist(v NetworkHandler) bool
func (*NetHandlerManager) Get ¶
func (x *NetHandlerManager) Get(v NetworkHandler) NetHandlerFn
func (*NetHandlerManager) Init ¶
func (x *NetHandlerManager) Init() errnov1.Code
func (*NetHandlerManager) Register ¶
func (x *NetHandlerManager) Register(nett NetConnType, msgt NetMessageType, fn NetHandlerFn) bool
func (*NetHandlerManager) Unregister ¶
func (x *NetHandlerManager) Unregister(v NetworkHandler)
type NetMessage ¶
type NetMessage byte
NetMessage
func NetMessageOf ¶
func NetMessageOf(v []byte) *NetMessage
func (*NetMessage) Builder ¶
func (x *NetMessage) Builder() *NetMessageBuilder
func (*NetMessage) Bytes ¶
func (x *NetMessage) Bytes(len int) []byte
func (*NetMessage) BytesB ¶
func (x *NetMessage) BytesB(offset, len int) []byte
func (*NetMessage) Closer ¶
func (x *NetMessage) Closer() *byte
func (*NetMessage) Flags ¶
func (x *NetMessage) Flags() NetMessageFlag
func (*NetMessage) Header ¶
func (x *NetMessage) Header() *byte
func (*NetMessage) HeaderChecksum ¶
func (x *NetMessage) HeaderChecksum() uint32
func (*NetMessage) HeaderRealChecksum ¶
func (x *NetMessage) HeaderRealChecksum() uint32
func (*NetMessage) KeyID ¶
func (x *NetMessage) KeyID() uint8
func (*NetMessage) Magic ¶
func (x *NetMessage) Magic() uint32
func (*NetMessage) Payload ¶
func (x *NetMessage) Payload() *byte
func (*NetMessage) PayloadChecksum ¶
func (x *NetMessage) PayloadChecksum() uint32
func (*NetMessage) PayloadLen ¶
func (x *NetMessage) PayloadLen() uint32
func (*NetMessage) PayloadRealChecksum ¶
func (x *NetMessage) PayloadRealChecksum() uint32
func (*NetMessage) Reserved ¶
func (x *NetMessage) Reserved() *byte
func (*NetMessage) Sequence ¶
func (x *NetMessage) Sequence() uint32
func (*NetMessage) SessionID ¶
func (x *NetMessage) SessionID() uint64
func (*NetMessage) String ¶
func (x *NetMessage) String() string
func (*NetMessage) Timestamp ¶
func (x *NetMessage) Timestamp() uint64
func (*NetMessage) TotalLen ¶
func (x *NetMessage) TotalLen() uint32
func (*NetMessage) Type ¶
func (x *NetMessage) Type() NetMessageType
func (*NetMessage) Version ¶
func (x *NetMessage) Version() uint16
type NetMessageBuilder ¶
type NetMessageBuilder byte
NetMessageBuilder
func (*NetMessageBuilder) Build ¶
func (x *NetMessageBuilder) Build()
func (*NetMessageBuilder) PutFlags ¶
func (x *NetMessageBuilder) PutFlags(v NetMessageFlag) *NetMessageBuilder
func (*NetMessageBuilder) PutKeyID ¶
func (x *NetMessageBuilder) PutKeyID(v uint8) *NetMessageBuilder
func (*NetMessageBuilder) PutPayloadChecksum ¶
func (x *NetMessageBuilder) PutPayloadChecksum(v uint32) *NetMessageBuilder
func (*NetMessageBuilder) PutPayloadLen ¶
func (x *NetMessageBuilder) PutPayloadLen(v uint32) *NetMessageBuilder
func (*NetMessageBuilder) PutSequence ¶
func (x *NetMessageBuilder) PutSequence(v uint32) *NetMessageBuilder
func (*NetMessageBuilder) PutSessionID ¶
func (x *NetMessageBuilder) PutSessionID(v uint64) *NetMessageBuilder
func (*NetMessageBuilder) PutTimestamp ¶
func (x *NetMessageBuilder) PutTimestamp(v uint64) *NetMessageBuilder
func (*NetMessageBuilder) PutType ¶
func (x *NetMessageBuilder) PutType(v uint32) *NetMessageBuilder
func (*NetMessageBuilder) ReserveBytes ¶
func (x *NetMessageBuilder) ReserveBytes(offset int, v *byte, len int) *NetMessageBuilder
type NetMessageFlag ¶
type NetMessageFlag byte
NetMessageFlag
const ( FlagNone NetMessageFlag = 0x00 FlagCompressed NetMessageFlag = 0x01 FlagEncrypted NetMessageFlag = 0x02 FlagSigned NetMessageFlag = 0x04 )
func (NetMessageFlag) Closer ¶
func (x NetMessageFlag) Closer() byte
func (NetMessageFlag) Contains ¶
func (x NetMessageFlag) Contains(v NetMessageFlag) bool
func (NetMessageFlag) Is ¶
func (x NetMessageFlag) Is(v NetMessageFlag) bool
func (NetMessageFlag) With ¶
func (x NetMessageFlag) With(v NetMessageFlag) NetMessageFlag
func (NetMessageFlag) Without ¶
func (x NetMessageFlag) Without(v NetMessageFlag) NetMessageFlag
type NetMessageType ¶
type NetMessageType uint32
NetMessageType
func (NetMessageType) Closer ¶
func (x NetMessageType) Closer() uint32
type NetworkHandler ¶
type NetworkHandler [5]byte
func MakeNetworkHandler ¶
func MakeNetworkHandler(nett NetConnType, msgt NetMessageType) NetworkHandler
func (NetworkHandler) Closer ¶
func (x NetworkHandler) Closer() [5]byte
func (NetworkHandler) ConnType ¶
func (x NetworkHandler) ConnType() NetConnType
func (NetworkHandler) MsgType ¶
func (x NetworkHandler) MsgType() NetMessageType
type NetworkManager ¶
type NetworkManager struct {
// contains filtered or unexported fields
}
func Networks ¶
func Networks() *NetworkManager
func (*NetworkManager) Connect ¶
func (x *NetworkManager) Connect(conn net.Conn, typ NetConnType, buff *NetConn) errnov1.Code
func (*NetworkManager) Connection ¶
func (x *NetworkManager) Connection(v NetConn) net.Conn
func (*NetworkManager) Count ¶
func (x *NetworkManager) Count() int
func (*NetworkManager) Destroy ¶
func (x *NetworkManager) Destroy(v NetConn)
func (*NetworkManager) Init ¶
func (x *NetworkManager) Init() errnov1.Code
func (NetworkManager) IsAlive ¶
func (x NetworkManager) IsAlive(v NetConn) bool
func (*NetworkManager) Type ¶
func (x *NetworkManager) Type(v NetConn) NetConnType
type System ¶
type System struct {
Instance unsafe.Pointer
Init InitFn
Activate ActivateFn
Update UpdateFn
Deactivate DeactivateFn
Destroy DestroyFn
}
type SystemManager ¶
type SystemManager struct {
// contains filtered or unexported fields
}
func Systems ¶
func Systems() *SystemManager
func (*SystemManager) Activate ¶
func (x *SystemManager) Activate() bool
func (*SystemManager) Contains ¶
func (x *SystemManager) Contains(v uintptr) bool
func (*SystemManager) Count ¶
func (x *SystemManager) Count() int
func (*SystemManager) Deactivate ¶
func (x *SystemManager) Deactivate()
OnDeActivate implements [ISystem].
func (*SystemManager) Destroy ¶
func (x *SystemManager) Destroy()
func (*SystemManager) Init ¶
func (x *SystemManager) Init() errnov1.Code
func (*SystemManager) Load ¶
func (x *SystemManager) Load() errnov1.Code
func (*SystemManager) Register ¶
func (x *SystemManager) Register(allocFn func(*System) uintptr) bool
func (*SystemManager) System ¶
func (x *SystemManager) System(v uintptr) *System
func (*SystemManager) Update ¶
func (x *SystemManager) Update(dt time.Duration)
type WorkerManager ¶
type WorkerManager struct {
// contains filtered or unexported fields
}
func Workers ¶
func Workers() *WorkerManager
func (*WorkerManager) Cancel ¶
func (x *WorkerManager) Cancel(v string) bool
func (*WorkerManager) Close ¶
func (x *WorkerManager) Close()
func (*WorkerManager) Destroy ¶
func (x *WorkerManager) Destroy(v string)
func (*WorkerManager) Init ¶
func (x *WorkerManager) Init() errnov1.Code
type World ¶
type World struct {
// contains filtered or unexported fields
}
func (*World) CreateCompotype ¶
func (x *World) CreateCompotype(allocFn CompotypeAllocator, buff *Compotype) bool
func (*World) CreateEntity ¶
func (*World) Deactivate ¶
func (x *World) Deactivate()
Source Files
¶
- Component.go
- ComponentManager.go
- ComponentMask.go
- ComponentUtils.go
- Compotype.go
- CompotypeManager.go
- Entity.go
- EntityManager.go
- EventManager.go
- Iterator.go
- NetConn.go
- NetConnType.go
- NetConnTypeManager.go
- NetHandler.go
- NetHandlerManager.go
- NetManager.go
- NetMessage.go
- NetModule.go
- NetUtils.go
- System.go
- SystemManager.go
- SystemManagerUtils.go
- Workers.go
- World.go
Click to show internal directories.
Click to hide internal directories.