func (game *Game) Setup() { game.SetBg(0x2d3638) texture := engi.NewTexture(engi.Files.Image("bot")) region := engi.NewRegion(texture, 0, 0, texture.Width(), texture.Height()) bot := engi.NewSprite(region, game.Width()/2, game.Height()/1.75) game.AddChild(bot) bot.Anchor.Set(0.5, 1) bot.Scale.SetTo(14) game.bot = bot bot2 := engi.NewSprite(region, 0, 5) bot.AddChild(bot2) bot2.Anchor.Set(0.5, 0) bot2.Scale.SetTo(0.33) /* font := engi.NewGridFont(engi.Files.Image("font"), 20, 20, "") text := engi.NewText(font, game.Width()/2, game.Height()/1.75, "ENGi") game.AddChild(text.Sprite) text.Anchor.Set(0.5, 0) text.Scale.Set(3, 4) text.SetTint(0x6cb767) game.text = text */ }
func (game *Game) Setup() { engi.SetBg(0x2d3638) texture := engi.Files.Image("bot") region = engi.NewRegion(texture, 0, 0, int(texture.Width()), int(texture.Height())) batch = engi.NewBatch(800, 600) }