Added copyright. Background generation cleanup. Audio tweaks.
This commit is contained in:
@@ -505,7 +505,7 @@ func (g *Game) HandleInput() {
|
||||
}
|
||||
|
||||
//account for controller sensitivity
|
||||
if !g.gameover {
|
||||
if !g.gameover && !g.Paused {
|
||||
xaxis := ebiten.StandardGamepadAxisValue(0, ebiten.StandardGamepadAxisRightStickHorizontal)
|
||||
yaxis := ebiten.StandardGamepadAxisValue(0, ebiten.StandardGamepadAxisRightStickVertical)
|
||||
|
||||
@@ -544,8 +544,8 @@ func (g *Game) ConstructBackground() {
|
||||
g.background = ebiten.NewImage(g.dimensions.Width, g.dimensions.Height)
|
||||
BLOCK_SIZE := 32
|
||||
|
||||
for i := 0; i < 640/16; i++ {
|
||||
for j := 0; j < 480/16; j++ {
|
||||
for i := 0; i < 640/BLOCK_SIZE; i++ {
|
||||
for j := 0; j < 480/BLOCK_SIZE; j++ {
|
||||
|
||||
//select random tile in x and y from tileset
|
||||
idx_y := rand.IntN(256 / BLOCK_SIZE)
|
||||
@@ -558,7 +558,7 @@ func (g *Game) ConstructBackground() {
|
||||
|
||||
//translate for grid element we're painting
|
||||
op := &ebiten.DrawImageOptions{}
|
||||
op.GeoM.Translate(float64(i)*16, float64(j)*16)
|
||||
op.GeoM.Translate(float64(i*BLOCK_SIZE), float64(j*BLOCK_SIZE))
|
||||
g.background.DrawImage(assets.ImageBank[assets.TileSet].SubImage(image.Rect(x0, y0, x1, y1)).(*ebiten.Image), op)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,6 +70,8 @@ func (s *StartScreen) Draw(screen *ebiten.Image) {
|
||||
text.Draw(screen, "press start", fonts.SurviveFont.Arcade, 640/2-25, 300, color.White)
|
||||
}
|
||||
|
||||
text.Draw(screen, "©bsoft games", fonts.SurviveFont.ArcadeSmall, 640/2+25, 180, color.White)
|
||||
|
||||
}
|
||||
|
||||
func (s *StartScreen) SetEventHandler(e ScreenManagerEvent, f func()) {
|
||||
|
||||
Reference in New Issue
Block a user