break/place only when not paused
This commit is contained in:
parent
1e74665abc
commit
08e08000a6
@ -273,6 +273,7 @@ func (g *Game) Update(win *glfw.Window, delta time.Duration) {
|
|||||||
render.Framewire.PushBox(r.GrowEven(itype.Vec3d{0.03125, 0.03125, 0.03125}).Offset(bc.ToFloat64()).ToFloat32(), color.White)
|
render.Framewire.PushBox(r.GrowEven(itype.Vec3d{0.03125, 0.03125, 0.03125}).Offset(bc.ToFloat64()).ToFloat32(), color.White)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !g.paused {
|
||||||
// Break/Place block
|
// Break/Place block
|
||||||
if win.GetMouseButton(glfw.MouseButtonLeft) == glfw.Press && g.runtime-time.Duration(g.player.DatasetI("LastBreak")) >= PlayerBreakCooldown {
|
if win.GetMouseButton(glfw.MouseButtonLeft) == glfw.Press && g.runtime-time.Duration(g.player.DatasetI("LastBreak")) >= PlayerBreakCooldown {
|
||||||
// Break
|
// Break
|
||||||
@ -302,6 +303,7 @@ func (g *Game) Update(win *glfw.Window, delta time.Duration) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
io.Diagnostics.Times.Logic = clock.Restart()
|
io.Diagnostics.Times.Logic = clock.Restart()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user