party

package
v1.66.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Party

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

グルーピングする単位。味方あるいは敵がある

func NewByEntity

func NewByEntity(world w.World, entity ecs.Entity) (Party, error)

entityから派閥を判定して、partyを初期化する

func NewParty

func NewParty(world w.World, factionType gc.FactionType) (Party, error)

memberは仲間入れ替えなどをしないと減ったりしない 派閥を指定して取得する 最初にセットされるインデックスは生存しているエンティティである みんな生きていない場合は想定していない。エラーを返す

func (*Party) GetNext

func (p *Party) GetNext() (ecs.Entity, error)

curを進めずに取得だけする

func (*Party) GetPrev

func (p *Party) GetPrev() (ecs.Entity, error)

curを戻さずに取得だけする

func (*Party) GetRandom

func (p *Party) GetRandom() (ecs.Entity, error)

生存エンティティからランダムに選択する

func (*Party) LivesLen

func (p *Party) LivesLen() int

生存エンティティの数を返す

func (*Party) Next

func (p *Party) Next() error

curを進める

func (*Party) Prev

func (p *Party) Prev() error

curを戻す

func (*Party) Value

func (p *Party) Value() *ecs.Entity

選択中のentityを返す

Jump to

Keyboard shortcuts

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