Documentation ¶
Index ¶
- Constants
- Variables
- func CountNonPlayerTanks(tanks []Tank) int
- func CountPlayerTanks(tanks []Tank) int
- func HandleCollision(tanks *[]Tank, levelObjects []levels.LevelBlock)
- func HandleMovement(t *Tank)
- func MainMenu(tanks *[]Tank, levelNum *int)
- func NoEnemiesLeft(tanks []Tank) bool
- func NoPlayersLeft(tanks []Tank) bool
- func ResetCounter()
- func ResetPlayerPositions(tanks *[]Tank)
- func Update(tanks *[]Tank)
- func UpdateEnemyLogic(tanks *[]Tank, levelObjects []levels.LevelBlock)
- type Coordinates
- type Explosion
- type Hull
- type KillFeedEntry
- type Point
- type ProgressBar
- type Projectile
- type Tank
- type Tanks
- type Turret
- type Vector
Constants ¶
View Source
const ( ScreenWidth = 1000 ScreenHeight = 1000 )
Variables ¶
View Source
var MenuStage = "init"
View Source
var TanksKilled []KillFeedEntry
View Source
var (
TotalEnemiesNum = 10
)
Functions ¶
func CountNonPlayerTanks ¶
func CountPlayerTanks ¶
func HandleCollision ¶
func HandleCollision(tanks *[]Tank, levelObjects []levels.LevelBlock)
func HandleMovement ¶
func HandleMovement(t *Tank)
func NoEnemiesLeft ¶
func NoPlayersLeft ¶
func ResetCounter ¶
func ResetCounter()
func ResetPlayerPositions ¶
func ResetPlayerPositions(tanks *[]Tank)
func UpdateEnemyLogic ¶
func UpdateEnemyLogic(tanks *[]Tank, levelObjects []levels.LevelBlock)
Types ¶
type Hull ¶
type Hull struct { X float64 Y float64 PrevX float64 PrevY float64 Width float64 Height float64 Angle float64 Speed float64 ReverseSpeed float64 RotationSpeed float64 Image string CollisionX1 float64 CollisionY1 float64 CollisionX2 float64 CollisionY2 float64 CollisionX3 float64 CollisionY3 float64 CollisionX4 float64 CollisionY4 float64 }
type KillFeedEntry ¶
type ProgressBar ¶
type ProgressBar struct {
X, Y, Width, FilledWidth, Height int
}
type Projectile ¶
type Projectile struct { X float64 Y float64 VelocityX float64 VelocityY float64 Angle float64 Width float64 Height float64 Collided bool }
Define a projectile struct
type Tank ¶
type Tank struct { X float64 Y float64 MaxHealth int Health int HealthBarWidth int HealthBarHeight int Name string Player bool CanMove bool Hull Hull Turret Turret Projectiles []Projectile Explosions []Explosion ReloadBarWidth int ReloadBarHeight int LastCollisionTime time.Time }
func CheckEnemyCount ¶
func GetUpdatedTankList ¶
Click to show internal directories.
Click to hide internal directories.