mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
loop: Rename UpdateAndDraw -> Update
This commit is contained in:
parent
f0d47312c4
commit
9f98ccc611
@ -106,7 +106,7 @@ func (c *graphicsContext) drawToDefaultRenderTarget() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *graphicsContext) UpdateAndDraw(updateCount int) error {
|
func (c *graphicsContext) Update(updateCount int) error {
|
||||||
if err := c.initializeIfNeeded(); err != nil {
|
if err := c.initializeIfNeeded(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,7 @@ func (c *runContext) updateFPS(fps float64) {
|
|||||||
|
|
||||||
type GraphicsContext interface {
|
type GraphicsContext interface {
|
||||||
SetSize(width, height int, scale float64)
|
SetSize(width, height int, scale float64)
|
||||||
UpdateAndDraw(updateCount int) error
|
Update(updateCount int) error
|
||||||
Invalidate()
|
Invalidate()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -195,7 +195,7 @@ func (c *runContext) render(g GraphicsContext) error {
|
|||||||
c.m.Unlock()
|
c.m.Unlock()
|
||||||
|
|
||||||
count := c.updateCount(n)
|
count := c.updateCount(n)
|
||||||
if err := g.UpdateAndDraw(count); err != nil {
|
if err := g.Update(count); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
c.framesForFPS++
|
c.framesForFPS++
|
||||||
|
Loading…
Reference in New Issue
Block a user