Documentation ¶
Index ¶
- Constants
- type Comp
- type CompKey
- type Entities
- type EntityBag
- type ExplosionDetails
- type Game
- type Input
- type Iter
- func (iter *Iter) Get(indices *Lookup)
- func (iter *Iter) Lookup() *Lookup
- func (iter *Iter) MissileDetails() *MissileDetails
- func (iter *Iter) Momentum() *Vec2
- func (iter *Iter) NetworkId() *uint64
- func (iter *Iter) New()
- func (iter *Iter) Next() bool
- func (iter *Iter) Pos() *Vec2
- func (iter *Iter) Remove()
- func (iter *Iter) Require(k CompKey)
- func (iter *Iter) Rot() *float32
- func (iter *Iter) ShipControl() *ShipControl
- func (iter *Iter) Spin() *float32
- func (iter *Iter) Sprite() *Sprite
- func (iter *Iter) TimedDestroy() *float32
- func (iter *Iter) TimedExplode() *float32
- type Keystate
- type Lookup
- type MissileDetails
- type PlayerConnectedEvent
- type ShipControl
- type Sprite
- type Vec2
Constants ¶
View Source
const ( AffectedByGravityKey = CompKey(iota) BoundLocationKey = CompKey(iota) CanExplodeKey = CompKey(iota) FrameEndDeleteKey = CompKey(iota) KeepInCameraKey = CompKey(iota) LookupKey = CompKey(iota) MissileDetailsKey = CompKey(iota) MomentumKey = CompKey(iota) NetworkIdKey = CompKey(iota) NetworkReceiveKey = CompKey(iota) NetworkTransmitKey = CompKey(iota) ParticleSunDeleteKey = CompKey(iota) PointRenderKey = CompKey(iota) PosKey = CompKey(iota) RotKey = CompKey(iota) ShipControlKey = CompKey(iota) SpinKey = CompKey(iota) SpriteKey = CompKey(iota) TimedDestroyKey = CompKey(iota) TimedExplodeKey = CompKey(iota) )
View Source
const ( SpriteUnset = Sprite(iota) SpriteShip SpriteEnemyShip SpriteMissile SpriteStar SpriteStarBit SpriteExplosionFlash )
View Source
const ExplosionRadius = 2
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EntityBag ¶
type EntityBag struct { Lookup *comp_Lookup MissileDetails *comp_MissileDetails Momentum *comp_Vec2 NetworkId *comp_uint64 Pos *comp_Vec2 Rot *comp_float32 ShipControl *comp_ShipControl Spin *comp_float32 Sprite *comp_Sprite TimedDestroy *comp_float32 TimedExplode *comp_float32 // contains filtered or unexported fields }
type ExplosionDetails ¶
type Game ¶
type Input ¶
type Input struct { Up Keystate Down Keystate Left Keystate Right Keystate Fire Keystate Dt float32 // Whether entities which only exist for render should be created. IsRendered bool // Whether code which runs only if the input is going to control // a player ship should run. IsPlayer bool IsConnected bool // Whether the this instance is the host, if not it is a client. IsHost bool Cid int64 Memos []*pb.Memo MemosOut []*pb.Memo }
func (*Input) BroadcastAll ¶
func (*Input) BroadcastOthers ¶
func (*Input) FrameEndReset ¶
func (inp *Input) FrameEndReset()
type Iter ¶
type Iter struct {
// contains filtered or unexported fields
}
func (*Iter) MissileDetails ¶
func (iter *Iter) MissileDetails() *MissileDetails
func (*Iter) ShipControl ¶
func (iter *Iter) ShipControl() *ShipControl
func (*Iter) TimedDestroy ¶
func (*Iter) TimedExplode ¶
type Keystate ¶
func (*Keystate) FrameEndReset ¶
func (k *Keystate) FrameEndReset()
type MissileDetails ¶
type MissileDetails struct {
Owner *Lookup
}
type ShipControl ¶
Click to show internal directories.
Click to hide internal directories.