blob: ad0db3f45821c8359cad18ca0f441307c302c81a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
## Debugging
- Restart after kernel update until `glxinfo | grep "OpenGL version"` works
## TODO
```go
func (g \*Game) updatePlacingWall(cursor Point) {
if inpututil.IsMouseButtonJustReleased(ebiten.MouseButtonLeft) {
if cursor.In(soil.Bounds()) {
position := cursor.Sub(soil.Position).Div(100).Mul(100).Add(Point{50, 50})
g.Blocks = append(g.Blocks, Block{NewTile(Point{100, 100}, position, color.RGBA{0x00, 0x00, 0x00, 0xff}), WallBlock})
}
}
}
```
```go
if inpututil.IsMouseButtonJustReleased(ebiten.MouseButtonLeft) && cursor.In(wallButton.CollisionBounds()) {
if g.CurrentAction == PlacingWall {
g.CurrentAction = Selecting
} else {
g.CurrentAction = PlacingWall
}
}
```
## Dependencies
- `sudo dnf install libX11-devel libXcursor-devel libXrandr-devel libXinerama-devel mesa-libGL-devel libXi-devel libXxf86vm-devel`
|