move interface vars

This commit is contained in:
Josh Deprez 2021-08-23 11:02:24 +10:00
parent f05090594c
commit 94db859faf
2 changed files with 7 additions and 3 deletions

View file

@ -17,10 +17,8 @@ var (
imageCache = make(map[assetKey]*ebiten.Image) imageCache = make(map[assetKey]*ebiten.Image)
// Ensure ref types satisfy interfaces. // Ensure ImageRef satisfies interfaces.
_ Loader = &ImageRef{} _ Loader = &ImageRef{}
_ Loader = &SceneRef{}
_ Scener = &SceneRef{}
) )
func init() { func init() {

View file

@ -9,6 +9,12 @@ import (
"github.com/hajimehoshi/ebiten/v2" "github.com/hajimehoshi/ebiten/v2"
) )
// Ensure SceneRef satisfies interfaces.
var (
_ Loader = &SceneRef{}
_ Scener = &SceneRef{}
)
// SceneRef loads a gzipped, gob-encoded Scene from the asset FS. // SceneRef loads a gzipped, gob-encoded Scene from the asset FS.
// After Load, Scene is usable. // After Load, Scene is usable.
// This is mostly useful for scenes that refer to other scenes, e.g. // This is mostly useful for scenes that refer to other scenes, e.g.