Initial commit.

This commit is contained in:
2024-12-08 12:24:33 -05:00
commit d9d09e5169
17 changed files with 671 additions and 0 deletions

33
elements/spotlight.go Normal file
View File

@@ -0,0 +1,33 @@
package elements
import "github.com/hajimehoshi/ebiten/v2"
type Spotlight struct {
Sprite *ebiten.Image
asset *ebiten.Image
cycle int
}
func NewSpotlight(asset *ebiten.Image) *Spotlight {
sl := &Spotlight{
Sprite: ebiten.NewImage(100, 100),
asset: asset,
}
return sl
}
func (s *Spotlight) Update() {
s.cycle++
}
func (s *Spotlight) Draw() {
s.Sprite.Clear()
op := &ebiten.DrawImageOptions{}
op.GeoM.Translate(-16, -16)
op.GeoM.Scale(3, 3)
op.GeoM.Translate(50, 50)
s.Sprite.DrawImage(s.asset, op)
}