tweaks
This commit is contained in:
parent
77435b7c20
commit
01752b77d9
2 changed files with 2 additions and 3 deletions
|
@ -40,8 +40,7 @@ func (c *Camera) Prepare(game *Game) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Transform returns the camera transform.
|
// Transform returns the camera transform.
|
||||||
func (c *Camera) Transform() ebiten.DrawImageOptions {
|
func (c *Camera) Transform() (opts ebiten.DrawImageOptions) {
|
||||||
var opts ebiten.DrawImageOptions
|
|
||||||
opts.GeoM.Translate(float2(c.Centre.Mul(-1)))
|
opts.GeoM.Translate(float2(c.Centre.Mul(-1)))
|
||||||
opts.GeoM.Scale(c.Zoom, c.Zoom)
|
opts.GeoM.Scale(c.Zoom, c.Zoom)
|
||||||
opts.GeoM.Rotate(c.Rotation)
|
opts.GeoM.Rotate(c.Rotation)
|
||||||
|
|
|
@ -25,7 +25,7 @@ var (
|
||||||
|
|
||||||
// Wall is a more flexible kind of tilemap. WallUnits can be added at the same
|
// Wall is a more flexible kind of tilemap. WallUnits can be added at the same
|
||||||
// level as other components and are responsible for their own drawing, so that
|
// level as other components and are responsible for their own drawing, so that
|
||||||
// Scene can do draw ordering, e.g. hide the player character behind a wall.
|
// Game can do draw ordering, e.g. hide the player character behind a wall.
|
||||||
// But Wall is still responsible for collisions.
|
// But Wall is still responsible for collisions.
|
||||||
type Wall struct {
|
type Wall struct {
|
||||||
ID
|
ID
|
||||||
|
|
Loading…
Reference in a new issue