Add Blank

This commit is contained in:
Hajime Hoshi 2013-06-24 22:27:43 +09:00
parent cf53d6a6d0
commit fe11e23286
2 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,35 @@
package blank
import (
"github.com/hajimehoshi/go.ebiten/graphics"
)
type Blank struct {
}
func New() *Blank {
return &Blank{}
}
func (game *Blank) ScreenWidth() int {
return 256
}
func (game *Blank) ScreenHeight() int {
return 240
}
func (game *Blank) Fps() int {
return 60
}
func (game *Blank) Init(tf graphics.TextureFactory) {
}
func (game *Blank) Update() {
}
func (game *Blank) Draw(g graphics.GraphicsContext, offscreen graphics.Texture) {
}

View File

@ -18,6 +18,7 @@ package main
import "C"
import (
"github.com/hajimehoshi/go.ebiten"
"github.com/hajimehoshi/go.ebiten/example/game/blank"
"github.com/hajimehoshi/go.ebiten/example/game/monochrome"
"github.com/hajimehoshi/go.ebiten/example/game/rects"
"github.com/hajimehoshi/go.ebiten/example/game/rotating"
@ -90,6 +91,8 @@ func main() {
var gm ebiten.Game
switch gameName {
case "blank":
gm = blank.New()
case "monochrome":
gm = monochrome.New()
case "rects":