Documentation ¶
Index ¶
- type Entity
- type EntityManager
- type GameObject
- type HomeBaseObject
- func (h *HomeBaseObject) Draw(screen *ebiten.Image)
- func (h *HomeBaseObject) GetCraftZone() *resolv.Object
- func (h *HomeBaseObject) GetPhysObj() *resolv.Object
- func (h *HomeBaseObject) Init(ImageFilepath string)
- func (h *HomeBaseObject) IsAlive() bool
- func (h *HomeBaseObject) Kill()
- func (h *HomeBaseObject) ReadInput()
- func (h *HomeBaseObject) RemovePhysObj(space *resolv.Space)
- func (h *HomeBaseObject) SetPosition(position basics.Vector2f)
- func (h *HomeBaseObject) Update(deltaTime float64)
- type JunkObject
- func (j *JunkObject) AddAudioFile(AudioFilepath string)
- func (j *JunkObject) AddItemDataMaterial(materialName string, minQuantity, maxQuantity int)
- func (j *JunkObject) Draw(screen *ebiten.Image)
- func (j *JunkObject) GetImageFilepath() string
- func (j *JunkObject) GetItemData() *inventory.Item
- func (j *JunkObject) GetPhysObj() *resolv.Object
- func (j *JunkObject) GetSprite() *ebiten.Image
- func (j *JunkObject) Init(ImageFilepath string)
- func (j *JunkObject) InitData()
- func (j *JunkObject) IsAlive() bool
- func (j *JunkObject) IsPhysObject(physObjectToCompare *resolv.Object) bool
- func (j *JunkObject) Kill()
- func (j *JunkObject) PlayAudio()
- func (j *JunkObject) RandomiseAllMaterialValues()
- func (j *JunkObject) ReadInput()
- func (j *JunkObject) RemovePhysObj(space *resolv.Space)
- func (j *JunkObject) SetImageFilepath(filepath string)
- func (j *JunkObject) SetItemDataDepthAndRarity(depth, rarity, rarityScale float64)
- func (j *JunkObject) SetItemDataName(name string)
- func (j *JunkObject) SetPosition(position basics.Vector2f)
- func (j *JunkObject) Update(deltaTime float64)
- type MagnetObject
- func (m *MagnetObject) Draw(screen *ebiten.Image)
- func (m *MagnetObject) Drop()
- func (m *MagnetObject) GetFieldPhysObj() *resolv.Object
- func (m *MagnetObject) GetFishingLinePoint() basics.Vector2f
- func (m *MagnetObject) GetMagnetOffset() basics.Vector2f
- func (m *MagnetObject) GetMagnetPos() *basics.Vector2f
- func (m *MagnetObject) GetPhysObj() *resolv.Object
- func (m *MagnetObject) GetSprite() *ebiten.Image
- func (m *MagnetObject) GetTargetPos() *basics.Vector2f
- func (m *MagnetObject) Init(ImageFilepath string)
- func (m *MagnetObject) IsAlive() bool
- func (m *MagnetObject) Kill()
- func (m *MagnetObject) LoadUIImages()
- func (m *MagnetObject) MoveAttractedJunk(deltaTime float64)
- func (m *MagnetObject) MoveTowards(from, to basics.Vector2f, distance float64) basics.Vector2f
- func (m *MagnetObject) ReadInput()
- func (m *MagnetObject) RemovePhysObj(space *resolv.Space)
- func (m *MagnetObject) RotateTo(position basics.Vector2f) float64
- func (m *MagnetObject) SetJunkLookup(Lookup map[*resolv.Object]*JunkObject)
- func (m *MagnetObject) SetMagnetStartPos(pos *basics.Vector2f)
- func (m *MagnetObject) SetObjPos(obj *resolv.Object, vec ...basics.Vector2f)
- func (m *MagnetObject) SetPosition(position basics.Vector2f)
- func (m *MagnetObject) SetUIPos(pos basics.Vector2f)
- func (m *MagnetObject) Update(deltaTime float64)
- type OverworldPlayerObject
- func (p *OverworldPlayerObject) Draw(screen *ebiten.Image)
- func (p *OverworldPlayerObject) GetCellPosition() (x, y int)
- func (p *OverworldPlayerObject) GetPhysObj() *resolv.Object
- func (p *OverworldPlayerObject) Init(ImageFilepath string)
- func (p *OverworldPlayerObject) IsAlive() bool
- func (p *OverworldPlayerObject) Kill()
- func (p *OverworldPlayerObject) ReadInput()
- func (p *OverworldPlayerObject) RemovePhysObj(space *resolv.Space)
- func (p *OverworldPlayerObject) SetPosition(position basics.Vector2f)
- func (p *OverworldPlayerObject) Update(deltaTime float64)
- type RodSection
- type ScavPlayerObject
- func (s *ScavPlayerObject) Draw(screen *ebiten.Image)
- func (s *ScavPlayerObject) GetFishingRodEndPoint() *basics.Vector2f
- func (s *ScavPlayerObject) GetFishingRodStartPoint() *basics.Vector2f
- func (s *ScavPlayerObject) GetPhysObj() *resolv.Object
- func (s *ScavPlayerObject) Init(ImageFilepath string)
- func (s *ScavPlayerObject) IsAlive() bool
- func (s *ScavPlayerObject) Kill()
- func (s *ScavPlayerObject) ReadInput()
- func (s *ScavPlayerObject) RemovePhysObj(space *resolv.Space)
- func (s *ScavPlayerObject) SetFishingRodEndPoint(rodEndPoint *basics.Vector2f)
- func (s *ScavPlayerObject) SetMagnet(m *MagnetObject)
- func (s *ScavPlayerObject) SetPosition(position basics.Vector2f)
- func (s *ScavPlayerObject) Update(deltaTime float64)
- type ScavRodObject
- func (s *ScavRodObject) AngleRodTip()
- func (s *ScavRodObject) CalculatePoints()
- func (s *ScavRodObject) Draw(screen *ebiten.Image)
- func (s *ScavRodObject) DrawRodSections(screen *ebiten.Image)
- func (s *ScavRodObject) GetSprite() *ebiten.Image
- func (s *ScavRodObject) GetTip() *basics.Vector2f
- func (s *ScavRodObject) Init(ImageFilepath string)
- func (s *ScavRodObject) IsAlive() bool
- func (s *ScavRodObject) Kill()
- func (s *ScavRodObject) ReadInput()
- func (s *ScavRodObject) RemovePhysObj(space *resolv.Space)
- func (s *ScavRodObject) SetMagnetOffset(magnetOffset basics.Vector2f)
- func (s *ScavRodObject) SetMagnetPosition(magnetPosition *basics.Vector2f)
- func (s *ScavRodObject) SetRoot(rootPos *basics.Vector2f)
- func (s *ScavRodObject) SetTip(tipPos *basics.Vector2f)
- func (s *ScavRodObject) Update(deltaTime float64)
- func (s *ScavRodObject) UpdatePoints()
- func (s *ScavRodObject) UpdateRodSections()
- func (s *ScavRodObject) UpdateTipPosition()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entity ¶
type Entity interface { Init(ImageFilepath string) ReadInput() Update(deltaTime float64) Draw(screen *ebiten.Image) IsAlive() bool Kill() RemovePhysObj(space *resolv.Space) }
This entitiy interface needs to be updated once we've decided what all the game entities need to have
type EntityManager ¶
type EntityManager struct {
// contains filtered or unexported fields
}
func (*EntityManager) AddEntity ¶
func (e *EntityManager) AddEntity(entity Entity)
Ensure entities are initialised before calling this method
func (*EntityManager) Draw ¶
func (e *EntityManager) Draw(screen *ebiten.Image)
func (*EntityManager) Init ¶
func (e *EntityManager) Init()
func (*EntityManager) ReadInput ¶
func (e *EntityManager) ReadInput()
func (*EntityManager) RemoveDead ¶
func (e *EntityManager) RemoveDead(space *resolv.Space)
func (*EntityManager) Update ¶
func (e *EntityManager) Update(deltaTime float64)
type GameObject ¶
type GameObject struct {
// contains filtered or unexported fields
}
func (*GameObject) Draw ¶
func (g *GameObject) Draw(screen *ebiten.Image)
func (*GameObject) Init ¶
func (g *GameObject) Init(ImageFilepath string)
func (*GameObject) IsAlive ¶
func (g *GameObject) IsAlive() bool
func (*GameObject) Kill ¶
func (g *GameObject) Kill()
func (*GameObject) ReadInput ¶
func (g *GameObject) ReadInput()
func (*GameObject) RemovePhysObj ¶
func (g *GameObject) RemovePhysObj(space *resolv.Space)
func (*GameObject) Update ¶
func (g *GameObject) Update(deltaTime float64)
type HomeBaseObject ¶
type HomeBaseObject struct {
// contains filtered or unexported fields
}
func (*HomeBaseObject) Draw ¶
func (h *HomeBaseObject) Draw(screen *ebiten.Image)
func (*HomeBaseObject) GetCraftZone ¶
func (h *HomeBaseObject) GetCraftZone() *resolv.Object
func (*HomeBaseObject) GetPhysObj ¶
func (h *HomeBaseObject) GetPhysObj() *resolv.Object
func (*HomeBaseObject) Init ¶
func (h *HomeBaseObject) Init(ImageFilepath string)
func (*HomeBaseObject) IsAlive ¶
func (h *HomeBaseObject) IsAlive() bool
func (*HomeBaseObject) Kill ¶
func (h *HomeBaseObject) Kill()
func (*HomeBaseObject) ReadInput ¶
func (h *HomeBaseObject) ReadInput()
func (*HomeBaseObject) RemovePhysObj ¶
func (h *HomeBaseObject) RemovePhysObj(space *resolv.Space)
func (*HomeBaseObject) SetPosition ¶
func (h *HomeBaseObject) SetPosition(position basics.Vector2f)
func (*HomeBaseObject) Update ¶
func (h *HomeBaseObject) Update(deltaTime float64)
type JunkObject ¶
type JunkObject struct {
// contains filtered or unexported fields
}
func (*JunkObject) AddAudioFile ¶
func (j *JunkObject) AddAudioFile(AudioFilepath string)
func (*JunkObject) AddItemDataMaterial ¶
func (j *JunkObject) AddItemDataMaterial(materialName string, minQuantity, maxQuantity int)
func (*JunkObject) Draw ¶
func (j *JunkObject) Draw(screen *ebiten.Image)
func (*JunkObject) GetImageFilepath ¶
func (j *JunkObject) GetImageFilepath() string
func (*JunkObject) GetItemData ¶
func (j *JunkObject) GetItemData() *inventory.Item
func (*JunkObject) GetPhysObj ¶
func (j *JunkObject) GetPhysObj() *resolv.Object
func (*JunkObject) GetSprite ¶
func (j *JunkObject) GetSprite() *ebiten.Image
func (*JunkObject) Init ¶
func (j *JunkObject) Init(ImageFilepath string)
func (*JunkObject) InitData ¶
func (j *JunkObject) InitData()
func (*JunkObject) IsAlive ¶
func (j *JunkObject) IsAlive() bool
func (*JunkObject) IsPhysObject ¶
func (j *JunkObject) IsPhysObject(physObjectToCompare *resolv.Object) bool
func (*JunkObject) Kill ¶
func (j *JunkObject) Kill()
func (*JunkObject) PlayAudio ¶
func (j *JunkObject) PlayAudio()
func (*JunkObject) RandomiseAllMaterialValues ¶
func (j *JunkObject) RandomiseAllMaterialValues()
func (*JunkObject) ReadInput ¶
func (j *JunkObject) ReadInput()
func (*JunkObject) RemovePhysObj ¶
func (j *JunkObject) RemovePhysObj(space *resolv.Space)
func (*JunkObject) SetImageFilepath ¶
func (j *JunkObject) SetImageFilepath(filepath string)
func (*JunkObject) SetItemDataDepthAndRarity ¶
func (j *JunkObject) SetItemDataDepthAndRarity(depth, rarity, rarityScale float64)
func (*JunkObject) SetItemDataName ¶
func (j *JunkObject) SetItemDataName(name string)
func (*JunkObject) SetPosition ¶
func (j *JunkObject) SetPosition(position basics.Vector2f)
func (*JunkObject) Update ¶
func (j *JunkObject) Update(deltaTime float64)
type MagnetObject ¶
func (*MagnetObject) Draw ¶
func (m *MagnetObject) Draw(screen *ebiten.Image)
func (*MagnetObject) Drop ¶
func (m *MagnetObject) Drop()
func (*MagnetObject) GetFieldPhysObj ¶
func (m *MagnetObject) GetFieldPhysObj() *resolv.Object
func (*MagnetObject) GetFishingLinePoint ¶
func (m *MagnetObject) GetFishingLinePoint() basics.Vector2f
func (*MagnetObject) GetMagnetOffset ¶
func (m *MagnetObject) GetMagnetOffset() basics.Vector2f
func (*MagnetObject) GetMagnetPos ¶
func (m *MagnetObject) GetMagnetPos() *basics.Vector2f
func (*MagnetObject) GetPhysObj ¶
func (m *MagnetObject) GetPhysObj() *resolv.Object
func (*MagnetObject) GetSprite ¶
func (m *MagnetObject) GetSprite() *ebiten.Image
func (*MagnetObject) GetTargetPos ¶
func (m *MagnetObject) GetTargetPos() *basics.Vector2f
func (*MagnetObject) Init ¶
func (m *MagnetObject) Init(ImageFilepath string)
func (*MagnetObject) IsAlive ¶
func (m *MagnetObject) IsAlive() bool
func (*MagnetObject) Kill ¶
func (m *MagnetObject) Kill()
func (*MagnetObject) LoadUIImages ¶
func (m *MagnetObject) LoadUIImages()
func (*MagnetObject) MoveAttractedJunk ¶
func (m *MagnetObject) MoveAttractedJunk(deltaTime float64)
func (*MagnetObject) MoveTowards ¶
func (*MagnetObject) ReadInput ¶
func (m *MagnetObject) ReadInput()
func (*MagnetObject) RemovePhysObj ¶
func (m *MagnetObject) RemovePhysObj(space *resolv.Space)
func (*MagnetObject) SetJunkLookup ¶
func (m *MagnetObject) SetJunkLookup(Lookup map[*resolv.Object]*JunkObject)
func (*MagnetObject) SetMagnetStartPos ¶
func (m *MagnetObject) SetMagnetStartPos(pos *basics.Vector2f)
func (*MagnetObject) SetObjPos ¶
func (m *MagnetObject) SetObjPos(obj *resolv.Object, vec ...basics.Vector2f)
func (*MagnetObject) SetPosition ¶
func (m *MagnetObject) SetPosition(position basics.Vector2f)
func (*MagnetObject) SetUIPos ¶
func (m *MagnetObject) SetUIPos(pos basics.Vector2f)
func (*MagnetObject) Update ¶
func (m *MagnetObject) Update(deltaTime float64)
type OverworldPlayerObject ¶
type OverworldPlayerObject struct { CastDistanceLimit float64 // contains filtered or unexported fields }
func (*OverworldPlayerObject) Draw ¶
func (p *OverworldPlayerObject) Draw(screen *ebiten.Image)
func (*OverworldPlayerObject) GetCellPosition ¶
func (p *OverworldPlayerObject) GetCellPosition() (x, y int)
func (*OverworldPlayerObject) GetPhysObj ¶
func (p *OverworldPlayerObject) GetPhysObj() *resolv.Object
func (*OverworldPlayerObject) Init ¶
func (p *OverworldPlayerObject) Init(ImageFilepath string)
func (*OverworldPlayerObject) IsAlive ¶
func (p *OverworldPlayerObject) IsAlive() bool
func (*OverworldPlayerObject) Kill ¶
func (p *OverworldPlayerObject) Kill()
func (*OverworldPlayerObject) ReadInput ¶
func (p *OverworldPlayerObject) ReadInput()
func (*OverworldPlayerObject) RemovePhysObj ¶
func (p *OverworldPlayerObject) RemovePhysObj(space *resolv.Space)
func (*OverworldPlayerObject) SetPosition ¶
func (p *OverworldPlayerObject) SetPosition(position basics.Vector2f)
func (*OverworldPlayerObject) Update ¶
func (p *OverworldPlayerObject) Update(deltaTime float64)
type RodSection ¶
type RodSection struct {
// contains filtered or unexported fields
}
type ScavPlayerObject ¶
type ScavPlayerObject struct {
// contains filtered or unexported fields
}
func (*ScavPlayerObject) Draw ¶
func (s *ScavPlayerObject) Draw(screen *ebiten.Image)
func (*ScavPlayerObject) GetFishingRodEndPoint ¶
func (s *ScavPlayerObject) GetFishingRodEndPoint() *basics.Vector2f
func (*ScavPlayerObject) GetFishingRodStartPoint ¶
func (s *ScavPlayerObject) GetFishingRodStartPoint() *basics.Vector2f
func (*ScavPlayerObject) GetPhysObj ¶
func (s *ScavPlayerObject) GetPhysObj() *resolv.Object
func (*ScavPlayerObject) Init ¶
func (s *ScavPlayerObject) Init(ImageFilepath string)
func (*ScavPlayerObject) IsAlive ¶
func (s *ScavPlayerObject) IsAlive() bool
func (*ScavPlayerObject) Kill ¶
func (s *ScavPlayerObject) Kill()
func (*ScavPlayerObject) ReadInput ¶
func (s *ScavPlayerObject) ReadInput()
func (*ScavPlayerObject) RemovePhysObj ¶
func (s *ScavPlayerObject) RemovePhysObj(space *resolv.Space)
func (*ScavPlayerObject) SetFishingRodEndPoint ¶
func (s *ScavPlayerObject) SetFishingRodEndPoint(rodEndPoint *basics.Vector2f)
func (*ScavPlayerObject) SetMagnet ¶
func (s *ScavPlayerObject) SetMagnet(m *MagnetObject)
func (*ScavPlayerObject) SetPosition ¶
func (s *ScavPlayerObject) SetPosition(position basics.Vector2f)
func (*ScavPlayerObject) Update ¶
func (s *ScavPlayerObject) Update(deltaTime float64)
type ScavRodObject ¶
type ScavRodObject struct {
// contains filtered or unexported fields
}
func (*ScavRodObject) AngleRodTip ¶
func (s *ScavRodObject) AngleRodTip()
func (*ScavRodObject) CalculatePoints ¶
func (s *ScavRodObject) CalculatePoints()
func (*ScavRodObject) Draw ¶
func (s *ScavRodObject) Draw(screen *ebiten.Image)
func (*ScavRodObject) DrawRodSections ¶
func (s *ScavRodObject) DrawRodSections(screen *ebiten.Image)
func (*ScavRodObject) GetSprite ¶
func (s *ScavRodObject) GetSprite() *ebiten.Image
func (*ScavRodObject) GetTip ¶
func (s *ScavRodObject) GetTip() *basics.Vector2f
func (*ScavRodObject) Init ¶
func (s *ScavRodObject) Init(ImageFilepath string)
func (*ScavRodObject) IsAlive ¶
func (s *ScavRodObject) IsAlive() bool
func (*ScavRodObject) Kill ¶
func (s *ScavRodObject) Kill()
func (*ScavRodObject) ReadInput ¶
func (s *ScavRodObject) ReadInput()
func (*ScavRodObject) RemovePhysObj ¶
func (s *ScavRodObject) RemovePhysObj(space *resolv.Space)
func (*ScavRodObject) SetMagnetOffset ¶
func (s *ScavRodObject) SetMagnetOffset(magnetOffset basics.Vector2f)
func (*ScavRodObject) SetMagnetPosition ¶
func (s *ScavRodObject) SetMagnetPosition(magnetPosition *basics.Vector2f)
func (*ScavRodObject) SetRoot ¶
func (s *ScavRodObject) SetRoot(rootPos *basics.Vector2f)
func (*ScavRodObject) SetTip ¶
func (s *ScavRodObject) SetTip(tipPos *basics.Vector2f)
func (*ScavRodObject) Update ¶
func (s *ScavRodObject) Update(deltaTime float64)
func (*ScavRodObject) UpdatePoints ¶
func (s *ScavRodObject) UpdatePoints()
func (*ScavRodObject) UpdateRodSections ¶
func (s *ScavRodObject) UpdateRodSections()
func (*ScavRodObject) UpdateTipPosition ¶
func (s *ScavRodObject) UpdateTipPosition()
Click to show internal directories.
Click to hide internal directories.