Documentation ¶
Index ¶
- Constants
- Variables
- func EntitiesToU32s(entities ...Entity) []uint32
- func MergeWorldWriteAheadLogs(patchs ...*ecspb.WorldPatch) *ecspb.WorldPatch
- func NewWorldPatch() *ecspb.WorldPatch
- func ResetWorldPatch(patch *ecspb.WorldPatch) *ecspb.WorldPatch
- type AlliedWith
- type AlliedWithReadIterator
- type AlliedWithWriteIterator
- type ChildOf
- type ChildOfReadIterator
- type ChildOfWriteIterator
- type Direction
- type DirectionReadIterator
- type DirectionWriteIterator
- type DockedTo
- type DockedToReadIterator
- type DockedToWriteIterator
- type Eats
- type EatsReadIterator
- type EatsWriteIterator
- type Enemy
- type EnemyReadIterator
- type EnemyWriteIterator
- type Entity
- func (e Entity) AlliedWithContains(other Entity) bool
- func (e Entity) Destroy()
- func (e Entity) GrowsContains(other Entity) bool
- func (e Entity) HasAlliedWith() bool
- func (e Entity) HasChildOf() bool
- func (e Entity) HasDirection() bool
- func (e Entity) HasDockedTo() bool
- func (e Entity) HasEats() bool
- func (e Entity) HasEnemyTag() bool
- func (e Entity) HasFaction() bool
- func (e Entity) HasGravity() bool
- func (e Entity) HasGrows() bool
- func (e Entity) HasIsA() bool
- func (e Entity) HasLikes() bool
- func (e Entity) HasName() bool
- func (e Entity) HasPlanetTag() bool
- func (e Entity) HasPosition() bool
- func (e Entity) HasRotation() bool
- func (e Entity) HasRuledBy() bool
- func (e Entity) HasSpaceshipTag() bool
- func (e Entity) HasSpacestationTag() bool
- func (e Entity) HasVelocity() bool
- func (e Entity) Index() int
- func (e Entity) IndexU32() uint32
- func (e Entity) IsAlive() bool
- func (e Entity) IsResourceEntity() bool
- func (e Entity) LikesContains(other Entity) bool
- func (e Entity) Raw() uint32
- func (e Entity) ReadAlliedWith() ([]Entity, bool)
- func (e Entity) ReadChildOf() (Entity, bool)
- func (e Entity) ReadDirection() (Direction, bool)
- func (e Entity) ReadDockedTo() (Entity, bool)
- func (e Entity) ReadEats() (Eats, bool)
- func (e Entity) ReadFaction() (Entity, bool)
- func (e Entity) ReadGravity() (Gravity, bool)
- func (e Entity) ReadGrows() ([]Entity, bool)
- func (e Entity) ReadIsA() (Entity, bool)
- func (e Entity) ReadLikes() ([]Entity, bool)
- func (e Entity) ReadName() (Name, bool)
- func (e Entity) ReadPosition() (Position, bool)
- func (e Entity) ReadRotation() (Rotation, bool)
- func (e Entity) ReadRuledBy() (Entity, bool)
- func (e Entity) ReadVelocity() (Velocity, bool)
- func (e Entity) RemoveAllAlliedWith() Entity
- func (e Entity) RemoveAllGrows() Entity
- func (e Entity) RemoveAllLikes() Entity
- func (e Entity) RemoveAlliedWith(toRemove ...Entity) Entity
- func (e Entity) RemoveChildOf() Entity
- func (e Entity) RemoveDirection() Entity
- func (e Entity) RemoveDockedTo() Entity
- func (e Entity) RemoveEats() Entity
- func (e Entity) RemoveEnemyTag() Entity
- func (e Entity) RemoveFaction() Entity
- func (e Entity) RemoveGravity() Entity
- func (e Entity) RemoveGrows(toRemove ...Entity) Entity
- func (e Entity) RemoveIsA() Entity
- func (e Entity) RemoveLikes(toRemove ...Entity) Entity
- func (e Entity) RemoveName() Entity
- func (e Entity) RemovePlanetTag() Entity
- func (e Entity) RemovePosition() Entity
- func (e Entity) RemoveRotation() Entity
- func (e Entity) RemoveRuledBy() Entity
- func (e Entity) RemoveSpaceshipTag() Entity
- func (e Entity) RemoveSpacestationTag() Entity
- func (e Entity) RemoveVelocity() Entity
- func (e Entity) SetAlliedWith(other ...Entity) Entity
- func (e Entity) SetChildOf(other Entity) Entity
- func (e Entity) SetDirection(other Direction) Entity
- func (e Entity) SetDockedTo(other Entity) Entity
- func (e Entity) SetEats(other Eats) Entity
- func (e Entity) SetEatsValues(entities0 []Entity, amounts1 []uint8) Entity
- func (e Entity) SetFaction(other Entity) Entity
- func (e Entity) SetGravity(other Gravity) Entity
- func (e Entity) SetGrows(other ...Entity) Entity
- func (e Entity) SetIsA(other Entity) Entity
- func (e Entity) SetLikes(other ...Entity) Entity
- func (e Entity) SetName(other Name) Entity
- func (e Entity) SetPosition(other Position) Entity
- func (e Entity) SetPositionValues(x0 float32, y1 float32, z2 float32) Entity
- func (e Entity) SetRotation(other Rotation) Entity
- func (e Entity) SetRotationValues(x0 float32, y1 float32, z2 float32, w3 float32) Entity
- func (e Entity) SetRuledBy(other Entity) Entity
- func (e Entity) SetVelocity(other Velocity) Entity
- func (e Entity) SetVelocityValues(x0 float32, y1 float32, z2 float32) Entity
- func (e Entity) TagWithEnemy() Entity
- func (e Entity) TagWithPlanet() Entity
- func (e Entity) TagWithSpaceship() Entity
- func (e Entity) TagWithSpacestation() Entity
- func (e Entity) UpdateVersion() Entity
- func (e Entity) Version() uint32
- func (e Entity) World() *World
- func (e Entity) WritableAlliedWith() (*AlliedWith, bool)
- func (e Entity) WritableChildOf() (*ChildOf, bool)
- func (e Entity) WritableDirection() (*Direction, bool)
- func (e Entity) WritableDockedTo() (*DockedTo, bool)
- func (e Entity) WritableEats() (*Eats, bool)
- func (e Entity) WritableFaction() (*Faction, bool)
- func (e Entity) WritableGravity() (*Gravity, bool)
- func (e Entity) WritableGrows() (*Grows, bool)
- func (e Entity) WritableIsA() (*IsA, bool)
- func (e Entity) WritableLikes() (*Likes, bool)
- func (e Entity) WritableName() (*Name, bool)
- func (e Entity) WritablePosition() (*Position, bool)
- func (e Entity) WritableRotation() (*Rotation, bool)
- func (e Entity) WritableRuledBy() (*RuledBy, bool)
- func (e Entity) WritableVelocity() (*Velocity, bool)
- type EntityCreatedEvent
- type EntityDestroyedEvent
- type EnumDirection
- func (e EnumDirection) AllSet() (flags []EnumDirection)
- func (e EnumDirection) Clear(flags ...EnumDirection) EnumDirection
- func (e EnumDirection) Has(flags ...EnumDirection) bool
- func (e EnumDirection) Set(flags ...EnumDirection) EnumDirection
- func (e EnumDirection) String() (string, bool)
- func (e EnumDirection) ToInt() int
- func (e EnumDirection) Toggle(flags ...EnumDirection) EnumDirection
- func (e EnumDirection) ToggleAll() EnumDirection
- type Faction
- type FactionReadIterator
- type FactionWriteIterator
- type Gravity
- type GravityReadIterator
- type GravityWriteIterator
- type Grows
- type GrowsReadIterator
- type GrowsWriteIterator
- type IsA
- type IsAReadIterator
- type IsAWriteIterator
- type LessThan
- type Likes
- type LikesReadIterator
- type LikesWriteIterator
- type Name
- type NameReadIterator
- type NameWriteIterator
- type Planet
- type PlanetReadIterator
- type PlanetWriteIterator
- type Position
- type PositionReadIterator
- type PositionVelocitySet
- type PositionVelocitySetIter
- type PositionWriteIterator
- type Rotation
- type RotationReadIterator
- type RotationWriteIterator
- type RuledBy
- type RuledByReadIterator
- type RuledByWriteIterator
- type Spaceship
- type SpaceshipReadIterator
- type SpaceshipWriteIterator
- type Spacestation
- type SpacestationReadIterator
- type SpacestationWriteIterator
- type SparseSet
- func (ss *SparseSet[T]) Clear()
- func (ss *SparseSet[T]) Has(e Entity) bool
- func (ss *SparseSet[T]) IterateSafe(fn func(e Entity, c T) error) error
- func (ss *SparseSet[T]) IterateUnsafe(fn func(e Entity, c T))
- func (ss *SparseSet[T]) Len() int
- func (ss *SparseSet[T]) Read(e Entity) (c T, versionMatched bool)
- func (ss *SparseSet[T]) Remove(entities ...Entity)
- func (ss *SparseSet[T]) Set(c T, entities ...Entity) error
- func (s *SparseSet[T]) Sort()
- func (ss *SparseSet[T]) Writeable(e Entity) (c *T, versionMatched bool)
- type SparseSetSortFunc
- type System
- type UnsubscribeFunc
- type Velocity
- type VelocityReadIterator
- type VelocityWriteIterator
- type World
- func (w *World) AddSystems(ss ...System) (err error)
- func (w *World) AlliedWithEntities() []Entity
- func (w *World) AlliedWithReadIter() *AlliedWithReadIterator
- func (w *World) AlliedWithResource() ([]Entity, bool)
- func (w *World) AlliedWithWriteIter() *AlliedWithWriteIterator
- func (w *World) ApplyAlliedWithPatch(e Entity, patch *ecspb.AlliedWithComponent) Entity
- func (w *World) ApplyChildOfPatch(e Entity, patch *ecspb.ChildOfComponent) Entity
- func (w *World) ApplyDirectionPatch(e Entity, patch *ecspb.DirectionComponent) Entity
- func (w *World) ApplyDockedToPatch(e Entity, patch *ecspb.DockedToComponent) Entity
- func (w *World) ApplyEatsPatch(e Entity, patch *ecspb.EatsComponent) Entity
- func (w *World) ApplyEnemyPatch(e Entity, pb *emptypb.Empty) Entity
- func (w *World) ApplyFactionPatch(e Entity, patch *ecspb.FactionComponent) Entity
- func (w *World) ApplyGravityPatch(e Entity, patch *ecspb.GravityComponent) Entity
- func (w *World) ApplyGrowsPatch(e Entity, patch *ecspb.GrowsComponent) Entity
- func (w *World) ApplyIsAPatch(e Entity, patch *ecspb.IsAComponent) Entity
- func (w *World) ApplyLikesPatch(e Entity, patch *ecspb.LikesComponent) Entity
- func (w *World) ApplyNamePatch(e Entity, patch *ecspb.NameComponent) Entity
- func (w *World) ApplyPatches(patches ...*ecspb.WorldPatch)
- func (w *World) ApplyPlanetPatch(e Entity, pb *emptypb.Empty) Entity
- func (w *World) ApplyPositionPatch(e Entity, patch *ecspb.PositionComponent) Entity
- func (w *World) ApplyRotationPatch(e Entity, patch *ecspb.RotationComponent) Entity
- func (w *World) ApplyRuledByPatch(e Entity, patch *ecspb.RuledByComponent) Entity
- func (w *World) ApplySpaceshipPatch(e Entity, pb *emptypb.Empty) Entity
- func (w *World) ApplySpacestationPatch(e Entity, pb *emptypb.Empty) Entity
- func (w *World) ApplyVelocityPatch(e Entity, patch *ecspb.VelocityComponent) Entity
- func (w *World) ChildOfEntities() []Entity
- func (w *World) ChildOfReadIter() *ChildOfReadIterator
- func (w *World) ChildOfResource() (Entity, bool)
- func (w *World) ChildOfWriteIter() *ChildOfWriteIterator
- func (w *World) DestroyEntities(es ...Entity)
- func (w *World) DirectionEntities() []Entity
- func (w *World) DirectionReadIter() *DirectionReadIterator
- func (w *World) DirectionResource() (Direction, bool)
- func (w *World) DirectionWriteIter() *DirectionWriteIterator
- func (w *World) DisableSystem(ss ...System) error
- func (w *World) DockedToEntities() []Entity
- func (w *World) DockedToReadIter() *DockedToReadIterator
- func (w *World) DockedToResource() (Entity, bool)
- func (w *World) DockedToWriteIter() *DockedToWriteIterator
- func (w *World) EatsEntities() []Entity
- func (w *World) EatsReadIter() *EatsReadIterator
- func (w *World) EatsResource() (Eats, bool)
- func (w *World) EatsWriteIter() *EatsWriteIterator
- func (w *World) EnableSystem(ss ...System) error
- func (w *World) EnemyEntities() []Entity
- func (w *World) EnemyReadIter() *EnemyReadIterator
- func (w *World) EnemyWriteIter() *EnemyWriteIterator
- func (w *World) Entities(count int) []Entity
- func (w *World) EntitiesFromU32s(vals ...uint32) (entities []Entity)
- func (w *World) Entity() (e Entity)
- func (w *World) EntityFromU32(val uint32) Entity
- func (w *World) EntityWithName(name string) Entity
- func (w *World) FactionEntities() []Entity
- func (w *World) FactionReadIter() *FactionReadIterator
- func (w *World) FactionResource() (Entity, bool)
- func (w *World) FactionWriteIter() *FactionWriteIterator
- func (w *World) GravityEntities() []Entity
- func (w *World) GravityReadIter() *GravityReadIterator
- func (w *World) GravityResource() (Gravity, bool)
- func (w *World) GravityWriteIter() *GravityWriteIterator
- func (w *World) GrowsEntities() []Entity
- func (w *World) GrowsReadIter() *GrowsReadIterator
- func (w *World) GrowsResource() ([]Entity, bool)
- func (w *World) GrowsWriteIter() *GrowsWriteIterator
- func (w *World) HasAlliedWithResource() bool
- func (w *World) HasChildOfResource() bool
- func (w *World) HasDirectionResource() bool
- func (w *World) HasDockedToResource() bool
- func (w *World) HasEatsResource() bool
- func (w *World) HasFactionResource() bool
- func (w *World) HasGravityResource() bool
- func (w *World) HasGrowsResource() bool
- func (w *World) HasIsAResource() bool
- func (w *World) HasLikesResource() bool
- func (w *World) HasNameResource() bool
- func (w *World) HasPositionResource() bool
- func (w *World) HasRotationResource() bool
- func (w *World) HasRuledByResource() bool
- func (w *World) HasVelocityResource() bool
- func (w *World) IsAEntities() []Entity
- func (w *World) IsAReadIter() *IsAReadIterator
- func (w *World) IsAResource() (Entity, bool)
- func (w *World) IsAWriteIter() *IsAWriteIterator
- func (w *World) LikesEntities() []Entity
- func (w *World) LikesReadIter() *LikesReadIterator
- func (w *World) LikesResource() ([]Entity, bool)
- func (w *World) LikesWriteIter() *LikesWriteIterator
- func (w *World) NameEntities() []Entity
- func (w *World) NameReadIter() *NameReadIterator
- func (w *World) NameResource() (Name, bool)
- func (w *World) NameWriteIter() *NameWriteIterator
- func (w *World) OnEntityCreated(fn func(EntityCreatedEvent)) UnsubscribeFunc
- func (w *World) OnEntityDestroyed(fn func(EntityDestroyedEvent)) UnsubscribeFunc
- func (w *World) PlanetEntities() []Entity
- func (w *World) PlanetReadIter() *PlanetReadIterator
- func (w *World) PlanetWriteIter() *PlanetWriteIterator
- func (w *World) PositionEntities() []Entity
- func (w *World) PositionReadIter() *PositionReadIterator
- func (w *World) PositionResource() (Position, bool)
- func (w *World) PositionWriteIter() *PositionWriteIterator
- func (w *World) RemoveAlliedWithResource() Entity
- func (w *World) RemoveAlliedWiths(entities ...Entity)
- func (w *World) RemoveChildOf(entities ...Entity)
- func (w *World) RemoveChildOfResource() Entity
- func (w *World) RemoveDirectionResource() Entity
- func (w *World) RemoveDirections(entities ...Entity)
- func (w *World) RemoveDockedToResource() Entity
- func (w *World) RemoveDockedTos(entities ...Entity)
- func (w *World) RemoveEats(entities ...Entity)
- func (w *World) RemoveEatsResource() Entity
- func (w *World) RemoveEnemyTags(entities ...Entity)
- func (w *World) RemoveFactionResource() Entity
- func (w *World) RemoveFactions(entities ...Entity)
- func (w *World) RemoveGravities(entities ...Entity)
- func (w *World) RemoveGravityResource() Entity
- func (w *World) RemoveGrows(entities ...Entity)
- func (w *World) RemoveGrowsResource() Entity
- func (w *World) RemoveIsA(entities ...Entity)
- func (w *World) RemoveIsAResource() Entity
- func (w *World) RemoveLikes(entities ...Entity)
- func (w *World) RemoveLikesResource() Entity
- func (w *World) RemoveNameResource() Entity
- func (w *World) RemoveNames(entities ...Entity)
- func (w *World) RemovePlanetTags(entities ...Entity)
- func (w *World) RemovePositionResource() Entity
- func (w *World) RemovePositions(entities ...Entity)
- func (w *World) RemoveRotationResource() Entity
- func (w *World) RemoveRotations(entities ...Entity)
- func (w *World) RemoveRuledByResource() Entity
- func (w *World) RemoveRuledBys(entities ...Entity)
- func (w *World) RemoveSpaceshipTags(entities ...Entity)
- func (w *World) RemoveSpacestationTags(entities ...Entity)
- func (w *World) RemoveSystems(ss ...System) error
- func (w *World) RemoveVelocities(entities ...Entity)
- func (w *World) RemoveVelocityResource() Entity
- func (w *World) Reset()
- func (w *World) ResetChildOf() Entity
- func (w *World) ResetDirection() EnumDirection
- func (w *World) ResetDockedTo() Entity
- func (w *World) ResetEats() Eats
- func (w *World) ResetFaction() Entity
- func (w *World) ResetGravity() float32
- func (w *World) ResetIsA() Entity
- func (w *World) ResetName() string
- func (w *World) ResetPosition() Position
- func (w *World) ResetRotation() Rotation
- func (w *World) ResetRuledBy() Entity
- func (w *World) ResetVelocity() Velocity
- func (w *World) RotationEntities() []Entity
- func (w *World) RotationReadIter() *RotationReadIterator
- func (w *World) RotationResource() (Rotation, bool)
- func (w *World) RotationWriteIter() *RotationWriteIterator
- func (w *World) RuledByEntities() []Entity
- func (w *World) RuledByReadIter() *RuledByReadIterator
- func (w *World) RuledByResource() (Entity, bool)
- func (w *World) RuledByWriteIter() *RuledByWriteIterator
- func (w *World) SetAlliedWithResource(e ...Entity) Entity
- func (w *World) SetAlliedWithSortFn(lessThan func(a, b Entity) bool)
- func (w *World) SetAlliedWiths(c AlliedWith, entities ...Entity)
- func (w *World) SetChildOf(c ChildOf, entities ...Entity)
- func (w *World) SetChildOfResource(e Entity) Entity
- func (w *World) SetChildOfSortFn(lessThan func(a, b Entity) bool)
- func (w *World) SetDirectionResource(c Direction) Entity
- func (w *World) SetDirectionSortFn(lessThan func(a, b Entity) bool)
- func (w *World) SetDirections(c Direction, entities ...Entity)
- func (w *World) SetDockedToResource(e Entity) Entity
- func (w *World) SetDockedToSortFn(lessThan func(a, b Entity) bool)
- func (w *World) SetDockedTos(c DockedTo, entities ...Entity)
- func (w *World) SetEats(c Eats, entities ...Entity)
- func (w *World) SetEatsResource(c Eats) Entity
- func (w *World) SetEatsResourceValues(entities0 []Entity, amounts1 []uint8) Entity
- func (w *World) SetEatsSortFn(lessThan func(a, b Entity) bool)
- func (w *World) SetFactionResource(e Entity) Entity
- func (w *World) SetFactionSortFn(lessThan func(a, b Entity) bool)
- func (w *World) SetFactions(c Faction, entities ...Entity)
- func (w *World) SetGravities(c Gravity, entities ...Entity)
- func (w *World) SetGravityResource(c Gravity) Entity
- func (w *World) SetGravitySortFn(lessThan func(a, b Entity) bool)
- func (w *World) SetGrows(c Grows, entities ...Entity)
- func (w *World) SetGrowsResource(e ...Entity) Entity
- func (w *World) SetGrowsSortFn(lessThan func(a, b Entity) bool)
- func (w *World) SetIsA(c IsA, entities ...Entity)
- func (w *World) SetIsAResource(e Entity) Entity
- func (w *World) SetIsASortFn(lessThan func(a, b Entity) bool)
- func (w *World) SetLikes(c Likes, entities ...Entity)
- func (w *World) SetLikesResource(e ...Entity) Entity
- func (w *World) SetLikesSortFn(lessThan func(a, b Entity) bool)
- func (w *World) SetNameResource(c Name) Entity
- func (w *World) SetNameSortFn(lessThan func(a, b Entity) bool)
- func (w *World) SetNames(c Name, entities ...Entity)
- func (w *World) SetPositionResource(c Position) Entity
- func (w *World) SetPositionResourceValues(x0 float32, y1 float32, z2 float32) Entity
- func (w *World) SetPositionSortFn(lessThan func(a, b Entity) bool)
- func (w *World) SetPositions(c Position, entities ...Entity)
- func (w *World) SetRotationResource(c Rotation) Entity
- func (w *World) SetRotationResourceValues(x0 float32, y1 float32, z2 float32, w3 float32) Entity
- func (w *World) SetRotationSortFn(lessThan func(a, b Entity) bool)
- func (w *World) SetRotations(c Rotation, entities ...Entity)
- func (w *World) SetRuledByResource(e Entity) Entity
- func (w *World) SetRuledBySortFn(lessThan func(a, b Entity) bool)
- func (w *World) SetRuledBys(c RuledBy, entities ...Entity)
- func (w *World) SetVelocities(c Velocity, entities ...Entity)
- func (w *World) SetVelocityResource(c Velocity) Entity
- func (w *World) SetVelocityResourceValues(x0 float32, y1 float32, z2 float32) Entity
- func (w *World) SetVelocitySortFn(lessThan func(a, b Entity) bool)
- func (w *World) SortAlliedWiths()
- func (w *World) SortChildOf()
- func (w *World) SortDirections()
- func (w *World) SortDockedTos()
- func (w *World) SortEats()
- func (w *World) SortFactions()
- func (w *World) SortGravities()
- func (w *World) SortGrows()
- func (w *World) SortIsA()
- func (w *World) SortLikes()
- func (w *World) SortNames()
- func (w *World) SortPositions()
- func (w *World) SortRotations()
- func (w *World) SortRuledBys()
- func (w *World) SortVelocities()
- func (w *World) SpaceshipEntities() []Entity
- func (w *World) SpaceshipReadIter() *SpaceshipReadIterator
- func (w *World) SpaceshipWriteIter() *SpaceshipWriteIterator
- func (w *World) SpacestationEntities() []Entity
- func (w *World) SpacestationReadIter() *SpacestationReadIterator
- func (w *World) SpacestationWriteIter() *SpacestationWriteIterator
- func (w *World) Tick(ctx context.Context) error
- func (w *World) TickCount() int
- func (w *World) VelocityEntities() []Entity
- func (w *World) VelocityReadIter() *VelocityReadIterator
- func (w *World) VelocityResource() (Velocity, bool)
- func (w *World) VelocityWriteIter() *VelocityWriteIterator
Constants ¶
const ( EntityIndexBits = 20 EntityIndexMask = 1<<EntityIndexBits - 1 EntityVersionBits = 32 - EntityIndexBits EntityVersionMask = math.MaxUint32 ^ EntityIndexMask DeadEntityID = EntityIndexMask )
const ( EnumDirectionUnknown = 0 EnumDirectionNorth = 1 EnumDirectionSouth = 2 EnumDirectionEast = 4 EnumDirectionWest = 8 )
Variables ¶
var (
ErrEntityVersionMismatch = errors.New("entity version mismatch")
)
Functions ¶
func EntitiesToU32s ¶ added in v0.2.0
func MergeWorldWriteAheadLogs ¶ added in v0.2.0
func MergeWorldWriteAheadLogs(patchs ...*ecspb.WorldPatch) *ecspb.WorldPatch
func NewWorldPatch ¶ added in v0.2.0
func NewWorldPatch() *ecspb.WorldPatch
func ResetWorldPatch ¶ added in v0.2.0
func ResetWorldPatch(patch *ecspb.WorldPatch) *ecspb.WorldPatch
Types ¶
type AlliedWith ¶
type AlliedWith []Entity
func AlliedWithFromEntities ¶
func AlliedWithFromEntities(e ...Entity) AlliedWith
func AlliedWithFromEntity ¶
func AlliedWithFromEntity(c []Entity) AlliedWith
func (AlliedWith) ToEntities ¶
func (c AlliedWith) ToEntities() []Entity
func (AlliedWith) ToEntity ¶
func (c AlliedWith) ToEntity() []Entity
func (AlliedWith) ToPB ¶ added in v0.2.0
func (c AlliedWith) ToPB() *ecspb.AlliedWithComponent
func (AlliedWith) ToU32s ¶ added in v0.2.0
func (c AlliedWith) ToU32s() []uint32
type AlliedWithReadIterator ¶
type AlliedWithReadIterator struct {
// contains filtered or unexported fields
}
func (*AlliedWithReadIterator) HasNext ¶
func (iter *AlliedWithReadIterator) HasNext() bool
func (*AlliedWithReadIterator) NextAlliedWith ¶
func (iter *AlliedWithReadIterator) NextAlliedWith() (Entity, AlliedWith)
func (*AlliedWithReadIterator) NextEntity ¶
func (iter *AlliedWithReadIterator) NextEntity() Entity
func (*AlliedWithReadIterator) Reset ¶
func (iter *AlliedWithReadIterator) Reset()
type AlliedWithWriteIterator ¶
type AlliedWithWriteIterator struct {
// contains filtered or unexported fields
}
func (*AlliedWithWriteIterator) HasNext ¶
func (iter *AlliedWithWriteIterator) HasNext() bool
func (*AlliedWithWriteIterator) NextAlliedWith ¶
func (iter *AlliedWithWriteIterator) NextAlliedWith() (Entity, *AlliedWith)
func (*AlliedWithWriteIterator) NextEntity ¶
func (iter *AlliedWithWriteIterator) NextEntity() Entity
func (*AlliedWithWriteIterator) Reset ¶
func (iter *AlliedWithWriteIterator) Reset()
type ChildOf ¶
type ChildOf Entity
func ChildOfFromEntity ¶
func (ChildOf) FromEntity ¶
func (ChildOf) ToPB ¶ added in v0.2.0
func (c ChildOf) ToPB() *ecspb.ChildOfComponent
type ChildOfReadIterator ¶
type ChildOfReadIterator struct {
// contains filtered or unexported fields
}
func (*ChildOfReadIterator) HasNext ¶
func (iter *ChildOfReadIterator) HasNext() bool
func (*ChildOfReadIterator) NextChildOf ¶
func (iter *ChildOfReadIterator) NextChildOf() (Entity, ChildOf)
func (*ChildOfReadIterator) NextEntity ¶
func (iter *ChildOfReadIterator) NextEntity() Entity
func (*ChildOfReadIterator) Reset ¶
func (iter *ChildOfReadIterator) Reset()
type ChildOfWriteIterator ¶
type ChildOfWriteIterator struct {
// contains filtered or unexported fields
}
func (*ChildOfWriteIterator) HasNext ¶
func (iter *ChildOfWriteIterator) HasNext() bool
func (*ChildOfWriteIterator) NextChildOf ¶
func (iter *ChildOfWriteIterator) NextChildOf() (Entity, *ChildOf)
func (*ChildOfWriteIterator) NextEntity ¶
func (iter *ChildOfWriteIterator) NextEntity() Entity
func (*ChildOfWriteIterator) Reset ¶
func (iter *ChildOfWriteIterator) Reset()
type Direction ¶ added in v0.2.0
type Direction EnumDirection
func DirectionFromEnumDirection ¶ added in v0.2.0
func DirectionFromEnumDirection(c EnumDirection) Direction
func (Direction) ToEnumDirection ¶ added in v0.2.0
func (c Direction) ToEnumDirection() EnumDirection
func (Direction) ToPB ¶ added in v0.2.0
func (c Direction) ToPB() *ecspb.DirectionComponent
type DirectionReadIterator ¶ added in v0.2.0
type DirectionReadIterator struct {
// contains filtered or unexported fields
}
func (*DirectionReadIterator) HasNext ¶ added in v0.2.0
func (iter *DirectionReadIterator) HasNext() bool
func (*DirectionReadIterator) NextDirection ¶ added in v0.2.0
func (iter *DirectionReadIterator) NextDirection() (Entity, Direction)
func (*DirectionReadIterator) NextEntity ¶ added in v0.2.0
func (iter *DirectionReadIterator) NextEntity() Entity
func (*DirectionReadIterator) Reset ¶ added in v0.2.0
func (iter *DirectionReadIterator) Reset()
type DirectionWriteIterator ¶ added in v0.2.0
type DirectionWriteIterator struct {
// contains filtered or unexported fields
}
func (*DirectionWriteIterator) HasNext ¶ added in v0.2.0
func (iter *DirectionWriteIterator) HasNext() bool
func (*DirectionWriteIterator) NextDirection ¶ added in v0.2.0
func (iter *DirectionWriteIterator) NextDirection() (Entity, *Direction)
func (*DirectionWriteIterator) NextEntity ¶ added in v0.2.0
func (iter *DirectionWriteIterator) NextEntity() Entity
func (*DirectionWriteIterator) Reset ¶ added in v0.2.0
func (iter *DirectionWriteIterator) Reset()
type DockedTo ¶
type DockedTo Entity
func DockedToFromEntity ¶
func (DockedTo) FromEntity ¶
func (DockedTo) ToPB ¶ added in v0.2.0
func (c DockedTo) ToPB() *ecspb.DockedToComponent
type DockedToReadIterator ¶
type DockedToReadIterator struct {
// contains filtered or unexported fields
}
func (*DockedToReadIterator) HasNext ¶
func (iter *DockedToReadIterator) HasNext() bool
func (*DockedToReadIterator) NextDockedTo ¶
func (iter *DockedToReadIterator) NextDockedTo() (Entity, DockedTo)
func (*DockedToReadIterator) NextEntity ¶
func (iter *DockedToReadIterator) NextEntity() Entity
func (*DockedToReadIterator) Reset ¶
func (iter *DockedToReadIterator) Reset()
type DockedToWriteIterator ¶
type DockedToWriteIterator struct {
// contains filtered or unexported fields
}
func (*DockedToWriteIterator) HasNext ¶
func (iter *DockedToWriteIterator) HasNext() bool
func (*DockedToWriteIterator) NextDockedTo ¶
func (iter *DockedToWriteIterator) NextDockedTo() (Entity, *DockedTo)
func (*DockedToWriteIterator) NextEntity ¶
func (iter *DockedToWriteIterator) NextEntity() Entity
func (*DockedToWriteIterator) Reset ¶
func (iter *DockedToWriteIterator) Reset()
type EatsReadIterator ¶
type EatsReadIterator struct {
// contains filtered or unexported fields
}
func (*EatsReadIterator) HasNext ¶
func (iter *EatsReadIterator) HasNext() bool
func (*EatsReadIterator) NextEats ¶
func (iter *EatsReadIterator) NextEats() (Entity, Eats)
func (*EatsReadIterator) NextEntity ¶
func (iter *EatsReadIterator) NextEntity() Entity
func (*EatsReadIterator) Reset ¶
func (iter *EatsReadIterator) Reset()
type EatsWriteIterator ¶
type EatsWriteIterator struct {
// contains filtered or unexported fields
}
func (*EatsWriteIterator) HasNext ¶
func (iter *EatsWriteIterator) HasNext() bool
func (*EatsWriteIterator) NextEats ¶
func (iter *EatsWriteIterator) NextEats() (Entity, *Eats)
func (*EatsWriteIterator) NextEntity ¶
func (iter *EatsWriteIterator) NextEntity() Entity
func (*EatsWriteIterator) Reset ¶
func (iter *EatsWriteIterator) Reset()
type EnemyReadIterator ¶
type EnemyReadIterator struct {
// contains filtered or unexported fields
}
func (*EnemyReadIterator) HasNext ¶
func (iter *EnemyReadIterator) HasNext() bool
func (*EnemyReadIterator) NextEntity ¶
func (iter *EnemyReadIterator) NextEntity() Entity
func (*EnemyReadIterator) Reset ¶
func (iter *EnemyReadIterator) Reset()
type EnemyWriteIterator ¶
type EnemyWriteIterator struct {
// contains filtered or unexported fields
}
func (*EnemyWriteIterator) HasNext ¶
func (iter *EnemyWriteIterator) HasNext() bool
func (*EnemyWriteIterator) NextEntity ¶
func (iter *EnemyWriteIterator) NextEntity() Entity
func (*EnemyWriteIterator) Reset ¶
func (iter *EnemyWriteIterator) Reset()
type Entity ¶
type Entity struct {
// contains filtered or unexported fields
}
func (Entity) AlliedWithContains ¶
func (Entity) GrowsContains ¶
func (Entity) HasAlliedWith ¶
func (Entity) HasChildOf ¶
func (Entity) HasDirection ¶ added in v0.2.0
func (Entity) HasDockedTo ¶
func (Entity) HasEnemyTag ¶
func (Entity) HasFaction ¶
func (Entity) HasGravity ¶
func (Entity) HasPlanetTag ¶
func (Entity) HasPosition ¶
func (Entity) HasRotation ¶
func (Entity) HasRuledBy ¶
func (Entity) HasSpaceshipTag ¶
func (Entity) HasSpacestationTag ¶
func (Entity) HasVelocity ¶
func (Entity) IsResourceEntity ¶
func (Entity) LikesContains ¶
func (Entity) ReadAlliedWith ¶
func (Entity) ReadChildOf ¶
func (Entity) ReadDirection ¶ added in v0.2.0
func (Entity) ReadDockedTo ¶
func (Entity) ReadFaction ¶
func (Entity) ReadGravity ¶
func (Entity) ReadPosition ¶
func (Entity) ReadRotation ¶
func (Entity) ReadRuledBy ¶
func (Entity) ReadVelocity ¶
func (Entity) RemoveAllAlliedWith ¶
func (Entity) RemoveAllGrows ¶
func (Entity) RemoveAllLikes ¶
func (Entity) RemoveAlliedWith ¶
func (Entity) RemoveChildOf ¶
func (Entity) RemoveDirection ¶ added in v0.2.0
func (Entity) RemoveDockedTo ¶
func (Entity) RemoveEats ¶
func (Entity) RemoveEnemyTag ¶
func (Entity) RemoveFaction ¶
func (Entity) RemoveGravity ¶
func (Entity) RemoveGrows ¶
func (Entity) RemoveLikes ¶
func (Entity) RemoveName ¶
func (Entity) RemovePlanetTag ¶
func (Entity) RemovePosition ¶
func (Entity) RemoveRotation ¶
func (Entity) RemoveRuledBy ¶
func (Entity) RemoveSpaceshipTag ¶
func (Entity) RemoveSpacestationTag ¶
func (Entity) RemoveVelocity ¶
func (Entity) SetAlliedWith ¶
func (Entity) SetChildOf ¶
func (Entity) SetDirection ¶ added in v0.2.0
func (Entity) SetDockedTo ¶
func (Entity) SetEatsValues ¶ added in v0.2.0
func (Entity) SetFaction ¶
func (Entity) SetGravity ¶
func (Entity) SetPosition ¶
func (Entity) SetPositionValues ¶ added in v0.2.0
func (Entity) SetRotation ¶
func (Entity) SetRotationValues ¶ added in v0.2.0
func (Entity) SetRuledBy ¶
func (Entity) SetVelocity ¶
func (Entity) SetVelocityValues ¶ added in v0.2.0
func (Entity) TagWithEnemy ¶
func (Entity) TagWithPlanet ¶
func (Entity) TagWithSpaceship ¶
func (Entity) TagWithSpacestation ¶
func (Entity) UpdateVersion ¶
func (Entity) WritableAlliedWith ¶
func (e Entity) WritableAlliedWith() (*AlliedWith, bool)
func (Entity) WritableChildOf ¶
func (Entity) WritableDirection ¶ added in v0.2.0
func (Entity) WritableDockedTo ¶
func (Entity) WritableEats ¶
func (Entity) WritableFaction ¶
func (Entity) WritableGravity ¶
func (Entity) WritableGrows ¶
func (Entity) WritableIsA ¶
func (Entity) WritableLikes ¶
func (Entity) WritableName ¶
func (Entity) WritablePosition ¶
func (Entity) WritableRotation ¶
func (Entity) WritableRuledBy ¶
func (Entity) WritableVelocity ¶
type EntityCreatedEvent ¶
type EntityCreatedEvent struct {
Entity Entity
}
type EntityDestroyedEvent ¶
type EntityDestroyedEvent struct {
Entity Entity
}
type EnumDirection ¶ added in v0.2.0
type EnumDirection int
func EnumDirectionFromInt ¶ added in v0.2.0
func EnumDirectionFromInt(i int) EnumDirection
func EnumDirectionSet ¶ added in v0.2.0
func EnumDirectionSet(flags ...EnumDirection) EnumDirection
func (EnumDirection) AllSet ¶ added in v0.2.0
func (e EnumDirection) AllSet() (flags []EnumDirection)
func (EnumDirection) Clear ¶ added in v0.2.0
func (e EnumDirection) Clear(flags ...EnumDirection) EnumDirection
func (EnumDirection) Has ¶ added in v0.2.0
func (e EnumDirection) Has(flags ...EnumDirection) bool
func (EnumDirection) Set ¶ added in v0.2.0
func (e EnumDirection) Set(flags ...EnumDirection) EnumDirection
func (EnumDirection) String ¶ added in v0.2.0
func (e EnumDirection) String() (string, bool)
func (EnumDirection) ToInt ¶ added in v0.2.0
func (e EnumDirection) ToInt() int
func (EnumDirection) Toggle ¶ added in v0.2.0
func (e EnumDirection) Toggle(flags ...EnumDirection) EnumDirection
func (EnumDirection) ToggleAll ¶ added in v0.2.0
func (e EnumDirection) ToggleAll() EnumDirection
type Faction ¶
type Faction Entity
func FactionFromEntity ¶
func (Faction) FromEntity ¶
func (Faction) ToPB ¶ added in v0.2.0
func (c Faction) ToPB() *ecspb.FactionComponent
type FactionReadIterator ¶
type FactionReadIterator struct {
// contains filtered or unexported fields
}
func (*FactionReadIterator) HasNext ¶
func (iter *FactionReadIterator) HasNext() bool
func (*FactionReadIterator) NextEntity ¶
func (iter *FactionReadIterator) NextEntity() Entity
func (*FactionReadIterator) NextFaction ¶
func (iter *FactionReadIterator) NextFaction() (Entity, Faction)
func (*FactionReadIterator) Reset ¶
func (iter *FactionReadIterator) Reset()
type FactionWriteIterator ¶
type FactionWriteIterator struct {
// contains filtered or unexported fields
}
func (*FactionWriteIterator) HasNext ¶
func (iter *FactionWriteIterator) HasNext() bool
func (*FactionWriteIterator) NextEntity ¶
func (iter *FactionWriteIterator) NextEntity() Entity
func (*FactionWriteIterator) NextFaction ¶
func (iter *FactionWriteIterator) NextFaction() (Entity, *Faction)
func (*FactionWriteIterator) Reset ¶
func (iter *FactionWriteIterator) Reset()
type Gravity ¶
type Gravity float32
func GravityFromFloat32 ¶
func (Gravity) ToPB ¶ added in v0.2.0
func (c Gravity) ToPB() *ecspb.GravityComponent
type GravityReadIterator ¶
type GravityReadIterator struct {
// contains filtered or unexported fields
}
func (*GravityReadIterator) HasNext ¶
func (iter *GravityReadIterator) HasNext() bool
func (*GravityReadIterator) NextEntity ¶
func (iter *GravityReadIterator) NextEntity() Entity
func (*GravityReadIterator) NextGravity ¶
func (iter *GravityReadIterator) NextGravity() (Entity, Gravity)
func (*GravityReadIterator) Reset ¶
func (iter *GravityReadIterator) Reset()
type GravityWriteIterator ¶
type GravityWriteIterator struct {
// contains filtered or unexported fields
}
func (*GravityWriteIterator) HasNext ¶
func (iter *GravityWriteIterator) HasNext() bool
func (*GravityWriteIterator) NextEntity ¶
func (iter *GravityWriteIterator) NextEntity() Entity
func (*GravityWriteIterator) NextGravity ¶
func (iter *GravityWriteIterator) NextGravity() (Entity, *Gravity)
func (*GravityWriteIterator) Reset ¶
func (iter *GravityWriteIterator) Reset()
type Grows ¶
type Grows []Entity
func GrowsFromEntities ¶
func GrowsFromEntity ¶
func (Grows) ToEntities ¶
func (Grows) ToPB ¶ added in v0.2.0
func (c Grows) ToPB() *ecspb.GrowsComponent
type GrowsReadIterator ¶
type GrowsReadIterator struct {
// contains filtered or unexported fields
}
func (*GrowsReadIterator) HasNext ¶
func (iter *GrowsReadIterator) HasNext() bool
func (*GrowsReadIterator) NextEntity ¶
func (iter *GrowsReadIterator) NextEntity() Entity
func (*GrowsReadIterator) NextGrows ¶
func (iter *GrowsReadIterator) NextGrows() (Entity, Grows)
func (*GrowsReadIterator) Reset ¶
func (iter *GrowsReadIterator) Reset()
type GrowsWriteIterator ¶
type GrowsWriteIterator struct {
// contains filtered or unexported fields
}
func (*GrowsWriteIterator) HasNext ¶
func (iter *GrowsWriteIterator) HasNext() bool
func (*GrowsWriteIterator) NextEntity ¶
func (iter *GrowsWriteIterator) NextEntity() Entity
func (*GrowsWriteIterator) NextGrows ¶
func (iter *GrowsWriteIterator) NextGrows() (Entity, *Grows)
func (*GrowsWriteIterator) Reset ¶
func (iter *GrowsWriteIterator) Reset()
type IsA ¶
type IsA Entity
func IsAFromEntity ¶
func (IsA) FromEntity ¶
func (IsA) ToPB ¶ added in v0.2.0
func (c IsA) ToPB() *ecspb.IsAComponent
type IsAReadIterator ¶
type IsAReadIterator struct {
// contains filtered or unexported fields
}
func (*IsAReadIterator) HasNext ¶
func (iter *IsAReadIterator) HasNext() bool
func (*IsAReadIterator) NextEntity ¶
func (iter *IsAReadIterator) NextEntity() Entity
func (*IsAReadIterator) NextIsA ¶
func (iter *IsAReadIterator) NextIsA() (Entity, IsA)
func (*IsAReadIterator) Reset ¶
func (iter *IsAReadIterator) Reset()
type IsAWriteIterator ¶
type IsAWriteIterator struct {
// contains filtered or unexported fields
}
func (*IsAWriteIterator) HasNext ¶
func (iter *IsAWriteIterator) HasNext() bool
func (*IsAWriteIterator) NextEntity ¶
func (iter *IsAWriteIterator) NextEntity() Entity
func (*IsAWriteIterator) NextIsA ¶
func (iter *IsAWriteIterator) NextIsA() (Entity, *IsA)
func (*IsAWriteIterator) Reset ¶
func (iter *IsAWriteIterator) Reset()
type Likes ¶
type Likes []Entity
func LikesFromEntities ¶
func LikesFromEntity ¶
func (Likes) ToEntities ¶
func (Likes) ToPB ¶ added in v0.2.0
func (c Likes) ToPB() *ecspb.LikesComponent
type LikesReadIterator ¶
type LikesReadIterator struct {
// contains filtered or unexported fields
}
func (*LikesReadIterator) HasNext ¶
func (iter *LikesReadIterator) HasNext() bool
func (*LikesReadIterator) NextEntity ¶
func (iter *LikesReadIterator) NextEntity() Entity
func (*LikesReadIterator) NextLikes ¶
func (iter *LikesReadIterator) NextLikes() (Entity, Likes)
func (*LikesReadIterator) Reset ¶
func (iter *LikesReadIterator) Reset()
type LikesWriteIterator ¶
type LikesWriteIterator struct {
// contains filtered or unexported fields
}
func (*LikesWriteIterator) HasNext ¶
func (iter *LikesWriteIterator) HasNext() bool
func (*LikesWriteIterator) NextEntity ¶
func (iter *LikesWriteIterator) NextEntity() Entity
func (*LikesWriteIterator) NextLikes ¶
func (iter *LikesWriteIterator) NextLikes() (Entity, *Likes)
func (*LikesWriteIterator) Reset ¶
func (iter *LikesWriteIterator) Reset()
type Name ¶
type Name string
func NameFromString ¶
func (Name) ToPB ¶ added in v0.2.0
func (c Name) ToPB() *ecspb.NameComponent
type NameReadIterator ¶
type NameReadIterator struct {
// contains filtered or unexported fields
}
func (*NameReadIterator) HasNext ¶
func (iter *NameReadIterator) HasNext() bool
func (*NameReadIterator) NextEntity ¶
func (iter *NameReadIterator) NextEntity() Entity
func (*NameReadIterator) NextName ¶
func (iter *NameReadIterator) NextName() (Entity, Name)
func (*NameReadIterator) Reset ¶
func (iter *NameReadIterator) Reset()
type NameWriteIterator ¶
type NameWriteIterator struct {
// contains filtered or unexported fields
}
func (*NameWriteIterator) HasNext ¶
func (iter *NameWriteIterator) HasNext() bool
func (*NameWriteIterator) NextEntity ¶
func (iter *NameWriteIterator) NextEntity() Entity
func (*NameWriteIterator) NextName ¶
func (iter *NameWriteIterator) NextName() (Entity, *Name)
func (*NameWriteIterator) Reset ¶
func (iter *NameWriteIterator) Reset()
type PlanetReadIterator ¶
type PlanetReadIterator struct {
// contains filtered or unexported fields
}
func (*PlanetReadIterator) HasNext ¶
func (iter *PlanetReadIterator) HasNext() bool
func (*PlanetReadIterator) NextEntity ¶
func (iter *PlanetReadIterator) NextEntity() Entity
func (*PlanetReadIterator) Reset ¶
func (iter *PlanetReadIterator) Reset()
type PlanetWriteIterator ¶
type PlanetWriteIterator struct {
// contains filtered or unexported fields
}
func (*PlanetWriteIterator) HasNext ¶
func (iter *PlanetWriteIterator) HasNext() bool
func (*PlanetWriteIterator) NextEntity ¶
func (iter *PlanetWriteIterator) NextEntity() Entity
func (*PlanetWriteIterator) Reset ¶
func (iter *PlanetWriteIterator) Reset()
type Position ¶
func (Position) ToPB ¶ added in v0.2.0
func (c Position) ToPB() *ecspb.PositionComponent
type PositionReadIterator ¶
type PositionReadIterator struct {
// contains filtered or unexported fields
}
func (*PositionReadIterator) HasNext ¶
func (iter *PositionReadIterator) HasNext() bool
func (*PositionReadIterator) NextEntity ¶
func (iter *PositionReadIterator) NextEntity() Entity
func (*PositionReadIterator) NextPosition ¶
func (iter *PositionReadIterator) NextPosition() (Entity, Position)
func (*PositionReadIterator) Reset ¶
func (iter *PositionReadIterator) Reset()
type PositionVelocitySet ¶
type PositionVelocitySet struct {
// contains filtered or unexported fields
}
func NewPositionVelocitySet ¶
func NewPositionVelocitySet(w *World) *PositionVelocitySet
func (*PositionVelocitySet) Len ¶
func (set *PositionVelocitySet) Len() int
func (*PositionVelocitySet) NewIterator ¶
func (set *PositionVelocitySet) NewIterator() *PositionVelocitySetIter
func (*PositionVelocitySet) PossibleUpdate ¶
func (set *PositionVelocitySet) PossibleUpdate(entities ...Entity)
type PositionVelocitySetIter ¶
type PositionVelocitySetIter struct {
// contains filtered or unexported fields
}
func (*PositionVelocitySetIter) HasNext ¶
func (iter *PositionVelocitySetIter) HasNext() bool
func (*PositionVelocitySetIter) Next ¶
func (iter *PositionVelocitySetIter) Next() ( Entity, Velocity, *Position, )
func (*PositionVelocitySetIter) Reset ¶
func (iter *PositionVelocitySetIter) Reset()
type PositionWriteIterator ¶
type PositionWriteIterator struct {
// contains filtered or unexported fields
}
func (*PositionWriteIterator) HasNext ¶
func (iter *PositionWriteIterator) HasNext() bool
func (*PositionWriteIterator) NextEntity ¶
func (iter *PositionWriteIterator) NextEntity() Entity
func (*PositionWriteIterator) NextPosition ¶
func (iter *PositionWriteIterator) NextPosition() (Entity, *Position)
func (*PositionWriteIterator) Reset ¶
func (iter *PositionWriteIterator) Reset()
type Rotation ¶
type Rotation struct { X float32 `json:"x"` Y float32 `json:"y"` Z float32 `json:"z"` W float32 `json:"w"` }
func (Rotation) ToPB ¶ added in v0.2.0
func (c Rotation) ToPB() *ecspb.RotationComponent
type RotationReadIterator ¶
type RotationReadIterator struct {
// contains filtered or unexported fields
}
func (*RotationReadIterator) HasNext ¶
func (iter *RotationReadIterator) HasNext() bool
func (*RotationReadIterator) NextEntity ¶
func (iter *RotationReadIterator) NextEntity() Entity
func (*RotationReadIterator) NextRotation ¶
func (iter *RotationReadIterator) NextRotation() (Entity, Rotation)
func (*RotationReadIterator) Reset ¶
func (iter *RotationReadIterator) Reset()
type RotationWriteIterator ¶
type RotationWriteIterator struct {
// contains filtered or unexported fields
}
func (*RotationWriteIterator) HasNext ¶
func (iter *RotationWriteIterator) HasNext() bool
func (*RotationWriteIterator) NextEntity ¶
func (iter *RotationWriteIterator) NextEntity() Entity
func (*RotationWriteIterator) NextRotation ¶
func (iter *RotationWriteIterator) NextRotation() (Entity, *Rotation)
func (*RotationWriteIterator) Reset ¶
func (iter *RotationWriteIterator) Reset()
type RuledBy ¶
type RuledBy Entity
func RuledByFromEntity ¶
func (RuledBy) FromEntity ¶
func (RuledBy) ToPB ¶ added in v0.2.0
func (c RuledBy) ToPB() *ecspb.RuledByComponent
type RuledByReadIterator ¶
type RuledByReadIterator struct {
// contains filtered or unexported fields
}
func (*RuledByReadIterator) HasNext ¶
func (iter *RuledByReadIterator) HasNext() bool
func (*RuledByReadIterator) NextEntity ¶
func (iter *RuledByReadIterator) NextEntity() Entity
func (*RuledByReadIterator) NextRuledBy ¶
func (iter *RuledByReadIterator) NextRuledBy() (Entity, RuledBy)
func (*RuledByReadIterator) Reset ¶
func (iter *RuledByReadIterator) Reset()
type RuledByWriteIterator ¶
type RuledByWriteIterator struct {
// contains filtered or unexported fields
}
func (*RuledByWriteIterator) HasNext ¶
func (iter *RuledByWriteIterator) HasNext() bool
func (*RuledByWriteIterator) NextEntity ¶
func (iter *RuledByWriteIterator) NextEntity() Entity
func (*RuledByWriteIterator) NextRuledBy ¶
func (iter *RuledByWriteIterator) NextRuledBy() (Entity, *RuledBy)
func (*RuledByWriteIterator) Reset ¶
func (iter *RuledByWriteIterator) Reset()
type SpaceshipReadIterator ¶
type SpaceshipReadIterator struct {
// contains filtered or unexported fields
}
func (*SpaceshipReadIterator) HasNext ¶
func (iter *SpaceshipReadIterator) HasNext() bool
func (*SpaceshipReadIterator) NextEntity ¶
func (iter *SpaceshipReadIterator) NextEntity() Entity
func (*SpaceshipReadIterator) Reset ¶
func (iter *SpaceshipReadIterator) Reset()
type SpaceshipWriteIterator ¶
type SpaceshipWriteIterator struct {
// contains filtered or unexported fields
}
func (*SpaceshipWriteIterator) HasNext ¶
func (iter *SpaceshipWriteIterator) HasNext() bool
func (*SpaceshipWriteIterator) NextEntity ¶
func (iter *SpaceshipWriteIterator) NextEntity() Entity
func (*SpaceshipWriteIterator) Reset ¶
func (iter *SpaceshipWriteIterator) Reset()
type Spacestation ¶
type Spacestation struct{}
type SpacestationReadIterator ¶
type SpacestationReadIterator struct {
// contains filtered or unexported fields
}
func (*SpacestationReadIterator) HasNext ¶
func (iter *SpacestationReadIterator) HasNext() bool
func (*SpacestationReadIterator) NextEntity ¶
func (iter *SpacestationReadIterator) NextEntity() Entity
func (*SpacestationReadIterator) Reset ¶
func (iter *SpacestationReadIterator) Reset()
type SpacestationWriteIterator ¶
type SpacestationWriteIterator struct {
// contains filtered or unexported fields
}
func (*SpacestationWriteIterator) HasNext ¶
func (iter *SpacestationWriteIterator) HasNext() bool
func (*SpacestationWriteIterator) NextEntity ¶
func (iter *SpacestationWriteIterator) NextEntity() Entity
func (*SpacestationWriteIterator) Reset ¶
func (iter *SpacestationWriteIterator) Reset()
type SparseSet ¶
func NewSparseSet ¶
func (*SparseSet[T]) IterateSafe ¶
func (*SparseSet[T]) IterateUnsafe ¶
type SparseSetSortFunc ¶
type UnsubscribeFunc ¶
type UnsubscribeFunc func()
type Velocity ¶
func (Velocity) ToPB ¶ added in v0.2.0
func (c Velocity) ToPB() *ecspb.VelocityComponent
type VelocityReadIterator ¶
type VelocityReadIterator struct {
// contains filtered or unexported fields
}
func (*VelocityReadIterator) HasNext ¶
func (iter *VelocityReadIterator) HasNext() bool
func (*VelocityReadIterator) NextEntity ¶
func (iter *VelocityReadIterator) NextEntity() Entity
func (*VelocityReadIterator) NextVelocity ¶
func (iter *VelocityReadIterator) NextVelocity() (Entity, Velocity)
func (*VelocityReadIterator) Reset ¶
func (iter *VelocityReadIterator) Reset()
type VelocityWriteIterator ¶
type VelocityWriteIterator struct {
// contains filtered or unexported fields
}
func (*VelocityWriteIterator) HasNext ¶
func (iter *VelocityWriteIterator) HasNext() bool
func (*VelocityWriteIterator) NextEntity ¶
func (iter *VelocityWriteIterator) NextEntity() Entity
func (*VelocityWriteIterator) NextVelocity ¶
func (iter *VelocityWriteIterator) NextVelocity() (Entity, *Velocity)
func (*VelocityWriteIterator) Reset ¶
func (iter *VelocityWriteIterator) Reset()
type World ¶
type World struct { PositionVelocitySet *PositionVelocitySet // contains filtered or unexported fields }
func (*World) AlliedWithEntities ¶
func (*World) AlliedWithReadIter ¶
func (w *World) AlliedWithReadIter() *AlliedWithReadIterator
func (*World) AlliedWithResource ¶
Retrieve the AlliedWith resource from the world
func (*World) AlliedWithWriteIter ¶
func (w *World) AlliedWithWriteIter() *AlliedWithWriteIterator
func (*World) ApplyAlliedWithPatch ¶ added in v0.2.0
func (w *World) ApplyAlliedWithPatch(e Entity, patch *ecspb.AlliedWithComponent) Entity
func (*World) ApplyChildOfPatch ¶ added in v0.2.0
func (w *World) ApplyChildOfPatch(e Entity, patch *ecspb.ChildOfComponent) Entity
func (*World) ApplyDirectionPatch ¶ added in v0.2.0
func (w *World) ApplyDirectionPatch(e Entity, patch *ecspb.DirectionComponent) Entity
func (*World) ApplyDockedToPatch ¶ added in v0.2.0
func (w *World) ApplyDockedToPatch(e Entity, patch *ecspb.DockedToComponent) Entity
func (*World) ApplyEatsPatch ¶ added in v0.2.0
func (w *World) ApplyEatsPatch(e Entity, patch *ecspb.EatsComponent) Entity
func (*World) ApplyEnemyPatch ¶ added in v0.2.0
func (*World) ApplyFactionPatch ¶ added in v0.2.0
func (w *World) ApplyFactionPatch(e Entity, patch *ecspb.FactionComponent) Entity
func (*World) ApplyGravityPatch ¶ added in v0.2.0
func (w *World) ApplyGravityPatch(e Entity, patch *ecspb.GravityComponent) Entity
func (*World) ApplyGrowsPatch ¶ added in v0.2.0
func (w *World) ApplyGrowsPatch(e Entity, patch *ecspb.GrowsComponent) Entity
func (*World) ApplyIsAPatch ¶ added in v0.2.0
func (w *World) ApplyIsAPatch(e Entity, patch *ecspb.IsAComponent) Entity
func (*World) ApplyLikesPatch ¶ added in v0.2.0
func (w *World) ApplyLikesPatch(e Entity, patch *ecspb.LikesComponent) Entity
func (*World) ApplyNamePatch ¶ added in v0.2.0
func (w *World) ApplyNamePatch(e Entity, patch *ecspb.NameComponent) Entity
func (*World) ApplyPatches ¶ added in v0.2.0
func (w *World) ApplyPatches(patches ...*ecspb.WorldPatch)
func (*World) ApplyPlanetPatch ¶ added in v0.2.0
func (*World) ApplyPositionPatch ¶ added in v0.2.0
func (w *World) ApplyPositionPatch(e Entity, patch *ecspb.PositionComponent) Entity
func (*World) ApplyRotationPatch ¶ added in v0.2.0
func (w *World) ApplyRotationPatch(e Entity, patch *ecspb.RotationComponent) Entity
func (*World) ApplyRuledByPatch ¶ added in v0.2.0
func (w *World) ApplyRuledByPatch(e Entity, patch *ecspb.RuledByComponent) Entity
func (*World) ApplySpaceshipPatch ¶ added in v0.2.0
func (*World) ApplySpacestationPatch ¶ added in v0.2.0
func (*World) ApplyVelocityPatch ¶ added in v0.2.0
func (w *World) ApplyVelocityPatch(e Entity, patch *ecspb.VelocityComponent) Entity
func (*World) ChildOfEntities ¶
func (*World) ChildOfReadIter ¶
func (w *World) ChildOfReadIter() *ChildOfReadIterator
func (*World) ChildOfResource ¶
Retrieve the ChildOf resource from the world
func (*World) ChildOfWriteIter ¶
func (w *World) ChildOfWriteIter() *ChildOfWriteIterator
func (*World) DestroyEntities ¶ added in v0.2.0
func (*World) DirectionEntities ¶ added in v0.2.0
func (*World) DirectionReadIter ¶ added in v0.2.0
func (w *World) DirectionReadIter() *DirectionReadIterator
func (*World) DirectionResource ¶ added in v0.2.0
Retrieve the Direction resource from the world
func (*World) DirectionWriteIter ¶ added in v0.2.0
func (w *World) DirectionWriteIter() *DirectionWriteIterator
func (*World) DisableSystem ¶
func (*World) DockedToEntities ¶
func (*World) DockedToReadIter ¶
func (w *World) DockedToReadIter() *DockedToReadIterator
func (*World) DockedToResource ¶
Retrieve the DockedTo resource from the world
func (*World) DockedToWriteIter ¶
func (w *World) DockedToWriteIter() *DockedToWriteIterator
func (*World) EatsEntities ¶
func (*World) EatsReadIter ¶
func (w *World) EatsReadIter() *EatsReadIterator
func (*World) EatsResource ¶
Retrieve the Eats resource from the world
func (*World) EatsWriteIter ¶
func (w *World) EatsWriteIter() *EatsWriteIterator
func (*World) EnableSystem ¶
func (*World) EnemyEntities ¶
func (*World) EnemyReadIter ¶
func (w *World) EnemyReadIter() *EnemyReadIterator
func (*World) EnemyWriteIter ¶
func (w *World) EnemyWriteIter() *EnemyWriteIterator
func (*World) EntitiesFromU32s ¶ added in v0.2.0
func (*World) EntityFromU32 ¶
func (*World) EntityWithName ¶
func (*World) FactionEntities ¶
func (*World) FactionReadIter ¶
func (w *World) FactionReadIter() *FactionReadIterator
func (*World) FactionResource ¶
Retrieve the Faction resource from the world
func (*World) FactionWriteIter ¶
func (w *World) FactionWriteIter() *FactionWriteIterator
func (*World) GravityEntities ¶
func (*World) GravityReadIter ¶
func (w *World) GravityReadIter() *GravityReadIterator
func (*World) GravityResource ¶
Retrieve the Gravity resource from the world
func (*World) GravityWriteIter ¶
func (w *World) GravityWriteIter() *GravityWriteIterator
func (*World) GrowsEntities ¶
func (*World) GrowsReadIter ¶
func (w *World) GrowsReadIter() *GrowsReadIterator
func (*World) GrowsResource ¶
Retrieve the Grows resource from the world
func (*World) GrowsWriteIter ¶
func (w *World) GrowsWriteIter() *GrowsWriteIterator
func (*World) HasAlliedWithResource ¶
HasAlliedWith checks if the world has a AlliedWith}}
func (*World) HasChildOfResource ¶
HasChildOf checks if the world has a ChildOf}}
func (*World) HasDirectionResource ¶ added in v0.2.0
HasDirection checks if the world has a Direction}}
func (*World) HasDockedToResource ¶
HasDockedTo checks if the world has a DockedTo}}
func (*World) HasEatsResource ¶
HasEats checks if the world has a Eats}}
func (*World) HasFactionResource ¶
HasFaction checks if the world has a Faction}}
func (*World) HasGravityResource ¶
HasGravity checks if the world has a Gravity}}
func (*World) HasGrowsResource ¶
HasGrows checks if the world has a Grows}}
func (*World) HasIsAResource ¶
HasIsA checks if the world has a IsA}}
func (*World) HasLikesResource ¶
HasLikes checks if the world has a Likes}}
func (*World) HasNameResource ¶
HasName checks if the world has a Name}}
func (*World) HasPositionResource ¶
HasPosition checks if the world has a Position}}
func (*World) HasRotationResource ¶
HasRotation checks if the world has a Rotation}}
func (*World) HasRuledByResource ¶
HasRuledBy checks if the world has a RuledBy}}
func (*World) HasVelocityResource ¶
HasVelocity checks if the world has a Velocity}}
func (*World) IsAEntities ¶
func (*World) IsAReadIter ¶
func (w *World) IsAReadIter() *IsAReadIterator
func (*World) IsAResource ¶
Retrieve the IsA resource from the world
func (*World) IsAWriteIter ¶
func (w *World) IsAWriteIter() *IsAWriteIterator
func (*World) LikesEntities ¶
func (*World) LikesReadIter ¶
func (w *World) LikesReadIter() *LikesReadIterator
func (*World) LikesResource ¶
Retrieve the Likes resource from the world
func (*World) LikesWriteIter ¶
func (w *World) LikesWriteIter() *LikesWriteIterator
func (*World) NameEntities ¶
func (*World) NameReadIter ¶
func (w *World) NameReadIter() *NameReadIterator
func (*World) NameResource ¶
Retrieve the Name resource from the world
func (*World) NameWriteIter ¶
func (w *World) NameWriteIter() *NameWriteIterator
func (*World) OnEntityCreated ¶
func (w *World) OnEntityCreated(fn func(EntityCreatedEvent)) UnsubscribeFunc
func (*World) OnEntityDestroyed ¶
func (w *World) OnEntityDestroyed(fn func(EntityDestroyedEvent)) UnsubscribeFunc
func (*World) PlanetEntities ¶
func (*World) PlanetReadIter ¶
func (w *World) PlanetReadIter() *PlanetReadIterator
func (*World) PlanetWriteIter ¶
func (w *World) PlanetWriteIter() *PlanetWriteIterator
func (*World) PositionEntities ¶
func (*World) PositionReadIter ¶
func (w *World) PositionReadIter() *PositionReadIterator
func (*World) PositionResource ¶
Retrieve the Position resource from the world
func (*World) PositionWriteIter ¶
func (w *World) PositionWriteIter() *PositionWriteIterator
func (*World) RemoveAlliedWithResource ¶
Remove the AlliedWith resource from the world
func (*World) RemoveAlliedWiths ¶
func (*World) RemoveChildOf ¶
func (*World) RemoveChildOfResource ¶
Remove the ChildOf resource from the world
func (*World) RemoveDirectionResource ¶ added in v0.2.0
Remove the Direction resource from the world
func (*World) RemoveDirections ¶ added in v0.2.0
func (*World) RemoveDockedToResource ¶
Remove the DockedTo resource from the world
func (*World) RemoveDockedTos ¶
func (*World) RemoveEats ¶
func (*World) RemoveEatsResource ¶
Remove the Eats resource from the world
func (*World) RemoveEnemyTags ¶
func (*World) RemoveFactionResource ¶
Remove the Faction resource from the world
func (*World) RemoveFactions ¶
func (*World) RemoveGravities ¶
func (*World) RemoveGravityResource ¶
Remove the Gravity resource from the world
func (*World) RemoveGrows ¶
func (*World) RemoveGrowsResource ¶
Remove the Grows resource from the world
func (*World) RemoveIsAResource ¶
Remove the IsA resource from the world
func (*World) RemoveLikes ¶
func (*World) RemoveLikesResource ¶
Remove the Likes resource from the world
func (*World) RemoveNameResource ¶
Remove the Name resource from the world
func (*World) RemoveNames ¶
func (*World) RemovePlanetTags ¶
func (*World) RemovePositionResource ¶
Remove the Position resource from the world
func (*World) RemovePositions ¶
func (*World) RemoveRotationResource ¶
Remove the Rotation resource from the world
func (*World) RemoveRotations ¶
func (*World) RemoveRuledByResource ¶
Remove the RuledBy resource from the world
func (*World) RemoveRuledBys ¶
func (*World) RemoveSpaceshipTags ¶
func (*World) RemoveSpacestationTags ¶
func (*World) RemoveSystems ¶
func (*World) RemoveVelocities ¶
func (*World) RemoveVelocityResource ¶
Remove the Velocity resource from the world
func (*World) ResetChildOf ¶
func (*World) ResetDirection ¶ added in v0.2.0
func (w *World) ResetDirection() EnumDirection
func (*World) ResetDockedTo ¶
func (*World) ResetFaction ¶
func (*World) ResetGravity ¶
func (*World) ResetPosition ¶
func (*World) ResetRotation ¶
func (*World) ResetRuledBy ¶
func (*World) ResetVelocity ¶
func (*World) RotationEntities ¶
func (*World) RotationReadIter ¶
func (w *World) RotationReadIter() *RotationReadIterator
func (*World) RotationResource ¶
Retrieve the Rotation resource from the world
func (*World) RotationWriteIter ¶
func (w *World) RotationWriteIter() *RotationWriteIterator
func (*World) RuledByEntities ¶
func (*World) RuledByReadIter ¶
func (w *World) RuledByReadIter() *RuledByReadIterator
func (*World) RuledByResource ¶
Retrieve the RuledBy resource from the world
func (*World) RuledByWriteIter ¶
func (w *World) RuledByWriteIter() *RuledByWriteIterator
func (*World) SetAlliedWithResource ¶
Set the AlliedWith resource in the world
func (*World) SetAlliedWithSortFn ¶
func (*World) SetAlliedWiths ¶
func (w *World) SetAlliedWiths(c AlliedWith, entities ...Entity)
func (*World) SetChildOf ¶
func (*World) SetChildOfResource ¶
Set the ChildOf resource in the world
func (*World) SetChildOfSortFn ¶
func (*World) SetDirectionResource ¶ added in v0.2.0
Set the Direction resource in the world
func (*World) SetDirectionSortFn ¶ added in v0.2.0
func (*World) SetDirections ¶ added in v0.2.0
func (*World) SetDockedToResource ¶
Set the DockedTo resource in the world
func (*World) SetDockedToSortFn ¶
func (*World) SetDockedTos ¶
func (*World) SetEatsResource ¶
Set the Eats resource in the world
func (*World) SetEatsResourceValues ¶ added in v0.2.0
func (*World) SetEatsSortFn ¶
func (*World) SetFactionResource ¶
Set the Faction resource in the world
func (*World) SetFactionSortFn ¶
func (*World) SetFactions ¶
func (*World) SetGravities ¶
func (*World) SetGravityResource ¶
Set the Gravity resource in the world
func (*World) SetGravitySortFn ¶
func (*World) SetGrowsResource ¶
Set the Grows resource in the world
func (*World) SetGrowsSortFn ¶
func (*World) SetIsAResource ¶
Set the IsA resource in the world
func (*World) SetIsASortFn ¶
func (*World) SetLikesResource ¶
Set the Likes resource in the world
func (*World) SetLikesSortFn ¶
func (*World) SetNameResource ¶
Set the Name resource in the world
func (*World) SetNameSortFn ¶
func (*World) SetPositionResource ¶
Set the Position resource in the world
func (*World) SetPositionResourceValues ¶ added in v0.2.0
func (*World) SetPositionSortFn ¶
func (*World) SetPositions ¶
func (*World) SetRotationResource ¶
Set the Rotation resource in the world
func (*World) SetRotationResourceValues ¶ added in v0.2.0
func (*World) SetRotationSortFn ¶
func (*World) SetRotations ¶
func (*World) SetRuledByResource ¶
Set the RuledBy resource in the world
func (*World) SetRuledBySortFn ¶
func (*World) SetRuledBys ¶
func (*World) SetVelocities ¶
func (*World) SetVelocityResource ¶
Set the Velocity resource in the world
func (*World) SetVelocityResourceValues ¶ added in v0.2.0
func (*World) SetVelocitySortFn ¶
func (*World) SortAlliedWiths ¶
func (w *World) SortAlliedWiths()
func (*World) SortChildOf ¶
func (w *World) SortChildOf()
func (*World) SortDirections ¶ added in v0.2.0
func (w *World) SortDirections()
func (*World) SortDockedTos ¶
func (w *World) SortDockedTos()
func (*World) SortFactions ¶
func (w *World) SortFactions()
func (*World) SortGravities ¶
func (w *World) SortGravities()
func (*World) SortPositions ¶
func (w *World) SortPositions()
func (*World) SortRotations ¶
func (w *World) SortRotations()
func (*World) SortRuledBys ¶
func (w *World) SortRuledBys()
func (*World) SortVelocities ¶
func (w *World) SortVelocities()
func (*World) SpaceshipEntities ¶
func (*World) SpaceshipReadIter ¶
func (w *World) SpaceshipReadIter() *SpaceshipReadIterator
func (*World) SpaceshipWriteIter ¶
func (w *World) SpaceshipWriteIter() *SpaceshipWriteIterator
func (*World) SpacestationEntities ¶
func (*World) SpacestationReadIter ¶
func (w *World) SpacestationReadIter() *SpacestationReadIterator
func (*World) SpacestationWriteIter ¶
func (w *World) SpacestationWriteIter() *SpacestationWriteIterator
func (*World) VelocityEntities ¶
func (*World) VelocityReadIter ¶
func (w *World) VelocityReadIter() *VelocityReadIterator
func (*World) VelocityResource ¶
Retrieve the Velocity resource from the world
func (*World) VelocityWriteIter ¶
func (w *World) VelocityWriteIter() *VelocityWriteIterator
Source Files ¶
- components_builtin_child_of.go
- components_builtin_is_a.go
- components_builtin_names.go
- components_example_directions.go
- components_example_eats.go
- components_example_gravities.go
- components_example_grows.go
- components_example_likes.go
- components_example_positions.go
- components_example_rotations.go
- components_example_velocities.go
- components_position_velocity_sets.go
- components_xxx_allied_withs.go
- components_xxx_docked_tos.go
- components_xxx_factions.go
- components_xxx_ruled_bys.go
- ecs_entities.go
- ecs_events.go
- ecs_sparse_sets.go
- ecs_sparse_sets_timsort.go
- ecs_world.go
- enums_directions.go
- tags_example_enemy.go
- tags_xxx_planet.go
- tags_xxx_spaceship.go
- tags_xxx_spacestation.go