Documentation
¶
Index ¶
- Constants
- type Ammo
- type Animation
- type Base
- func (o *Base) FromAPIMessage(m *server_external.Base)
- func (o *Base) GetAnimatedImage() *ebiten.Image
- func (o *Base) GetAnimationStartPosition() (float64, float64)
- func (o *Base) GetCopyOfImage() *ebiten.Image
- func (o *Base) GetImage() *ebiten.Image
- func (o *Base) IsDirectionDOWN() bool
- func (o *Base) IsDirectionLEFT() bool
- func (o *Base) IsDirectionRIGHT() bool
- func (o *Base) IsDirectionUP() bool
- func (o *Base) IsEqualTo(ob *Base) bool
- func (o *Base) IsTranslationMovementBlocked() bool
- func (o *Base) IsXChanged() bool
- func (o *Base) IsYChanged() bool
- func (o *Base) SaveAnimationStartPosition()
- func (o *Base) SetRawOffsetX(x float64)
- func (o *Base) SetRawOffsetY(y float64)
- func (o *Base) SetRawX(x float64)
- func (o *Base) SetRawY(y float64)
- func (o *Base) SetSkin(path string)
- func (o *Base) SetSpawn(spawns []image.Point)
- func (o *Base) SetTranslationXMovementBlocked(s bool)
- func (o *Base) SetTranslationYMovementBlocked(s bool)
- func (o *Base) ToAPIMessage() *server_external.Base
- func (o *Base) UpdateDirection()
- func (o *Base) UpdateLastPosition()
- type Buffs
- type Camera
- func (c *Camera) ConvertScreenToWorld(s types.Vec2) types.Vec2
- func (c *Camera) ConvertWorldToScreen(w types.Vec2) types.Vec2
- func (c *Camera) GetZoom() types.Vec2
- func (c *Camera) GetZoomedOffset(b *Base) types.Vec2
- func (c *Camera) GetZoomedPos(b *Base) types.Vec2
- func (c *Camera) GetZoomedScale(b *Base) types.Vec2
- func (c *Camera) IsOuttaRange(v1, v2 float64) bool
- func (c *Camera) ZoomIn(o *Base)
- func (c *Camera) ZoomOut(o *Base)
- type Element
- type LootSet
- type Map
- type PC
- type Physics
- type Role
- type Skin
- type Weapon
Constants ¶
View Source
const ( ELEMENT = iota AMMO LOOT PLAYER WEAPON )
Constants for collidable objects
View Source
const DEFAULT_HEALTH = 10
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ammo ¶
func (*Ammo) FromAPIMessage ¶
func (a *Ammo) FromAPIMessage(m *server_external.Ammo)
func (*Ammo) ToAPIMessage ¶
func (a *Ammo) ToAPIMessage() *server_external.Ammo
type Base ¶
type Base struct { *sources.MetadataModel CollidersModel []*sources.CollidersModel Type string Animation Skin Physics Parent *Base // Names parentid the object referes to ID uuid.UUID RawPos, RawOffset, LastRawPos types.Vec2 Direction, SubDirection keycodes.Direction Spawn server_external.PositionInt Role Role TranslationMovementXBlocked, TranslationMovementYBlocked bool PositionHistorySequence zeroshifter.IZeroShifter }
The object structure which describes each object on the map
func (*Base) FromAPIMessage ¶
func (o *Base) FromAPIMessage(m *server_external.Base)
func (*Base) GetAnimatedImage ¶
func (o *Base) GetAnimatedImage() *ebiten.Image
Returns image where animation properties applied to
func (*Base) GetAnimationStartPosition ¶
Returns last saved position before animation was executed
func (*Base) GetCopyOfImage ¶
func (o *Base) GetCopyOfImage() *ebiten.Image
func (*Base) GetImage ¶
func (o *Base) GetImage() *ebiten.Image
Returns images for the skin selected
func (*Base) IsDirectionDOWN ¶
func (*Base) IsDirectionLEFT ¶
func (*Base) IsDirectionRIGHT ¶
func (*Base) IsDirectionUP ¶
func (*Base) IsTranslationMovementBlocked ¶
func (*Base) IsXChanged ¶
Checks if x pos has been changed in comparison to the last x poses
func (*Base) IsYChanged ¶
Checks if y pos has been changed in comparison to the last y poses
func (*Base) SaveAnimationStartPosition ¶
func (o *Base) SaveAnimationStartPosition()
func (*Base) SetRawOffsetX ¶
func (*Base) SetRawOffsetY ¶
func (*Base) SetTranslationXMovementBlocked ¶
func (*Base) SetTranslationYMovementBlocked ¶
func (*Base) ToAPIMessage ¶
func (o *Base) ToAPIMessage() *server_external.Base
func (*Base) UpdateDirection ¶
func (o *Base) UpdateDirection()
func (*Base) UpdateLastPosition ¶
func (o *Base) UpdateLastPosition()
type Camera ¶
func (*Camera) ConvertScreenToWorld ¶
func (*Camera) ConvertWorldToScreen ¶
func (*Camera) IsOuttaRange ¶
Checks if passed v2 is outta range of v1
type LootSet ¶
func NewLootSet ¶
type Map ¶
type Map struct { Base *sources.CollidersModel }
func (*Map) FromAPIMessage ¶
func (w *Map) FromAPIMessage(m *server_external.Map)
func (*Map) GetSpawns ¶
func (w *Map) GetSpawns() []*server_external.PositionInt
return (y-mm.Buffs.Speed.Y - mo.Size.Height/2) <= ay && ay <= (y+mm.Buffs.Speed.Y + mo.Size.Height/2) }
func (*Map) ToAPIMessage ¶
func (w *Map) ToAPIMessage() *server_external.Map
type PC ¶
type PC struct { Base Killer uuid.UUID Username string Health uint64 LobbyNumber int IsKicked bool LastActivity int64 }
func (*PC) FromAPIMessage ¶
func (p *PC) FromAPIMessage(m *server_external.PC)
func (*PC) GetMovementRotation ¶
//Returns movement rotation related to the last //movement direction
func (*PC) ToAPIMessage ¶
func (p *PC) ToAPIMessage() *server_external.PC
func (*PC) UpdateLastActivity ¶
func (p *PC) UpdateLastActivity()
Click to show internal directories.
Click to hide internal directories.