Fix increasing amounts of creeps bug

This commit is contained in:
Trevor Slocum 2022-06-12 22:36:25 -07:00
parent 10d9b1f0ed
commit 475effa11e
3 changed files with 2 additions and 8 deletions

View File

@ -92,10 +92,6 @@ func (s *RenderSystem) renderSprite(x float64, y float64, offsetx float64, offse
//s.op.GeoM.Translate(float64(s.ScreenW/2.0), float64(s.ScreenH/2.0))
// Fade in.
if world.World.Tick < 72 {
colorScale = float64(world.World.Tick) / 72
}
s.op.ColorM.Scale(colorScale, colorScale, colorScale, alpha)
target.DrawImage(sprite, s.op)

View File

@ -51,10 +51,6 @@ func (s *RenderHUDSystem) Update(_ gohan.Entity) error {
}
func (s *RenderHUDSystem) Draw(_ gohan.Entity, screen *ebiten.Image) error {
if !world.World.GameStarted {
return nil
}
if world.World.ScoreUpdated {
s.drawScore()
world.World.ScoreUpdated = false

View File

@ -115,6 +115,8 @@ func Reset() {
World.NeedKills = NeededKills()
World.KillInfoUpdated = true
World.Tick = 0
seed := World.ForceSeed
if seed == 0 {
seed = time.Now().UnixNano()