Protobuf changes
This commit is contained in:
@@ -3,6 +3,7 @@ package main
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
pb "gitea.boner.be/bdnugget/goonserver/actions"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
@@ -40,7 +41,12 @@ func HandleInput(player *Player, camera *rl.Camera) {
|
||||
// Exclude the first tile (current position)
|
||||
if len(path) > 1 {
|
||||
player.TargetPath = path[1:]
|
||||
player.ActionQueue = append(player.ActionQueue, Action{Type: MoveAction, X: clickedTile.X, Y: clickedTile.Y})
|
||||
player.ActionQueue = append(player.ActionQueue, &pb.Action{
|
||||
Type: pb.Action_MOVE,
|
||||
X: int32(clickedTile.X),
|
||||
Y: int32(clickedTile.Y),
|
||||
PlayerId: player.ID,
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user