Fix OOB and refactor
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package main
|
||||
|
||||
import rl "github.com/gen2brain/raylib-go/raylib"
|
||||
|
||||
type Tile struct {
|
||||
X, Y int
|
||||
Height float32
|
||||
Walkable bool
|
||||
}
|
||||
|
||||
type ActionType int
|
||||
|
||||
const (
|
||||
MoveAction ActionType = iota
|
||||
)
|
||||
|
||||
type Action struct {
|
||||
Type ActionType
|
||||
X, Y int // Target position for movement
|
||||
}
|
||||
|
||||
type Player struct {
|
||||
PosActual rl.Vector3
|
||||
PosTile Tile
|
||||
TargetPath []Tile
|
||||
Speed float32
|
||||
ActionQueue []Action // Queue for player actions
|
||||
Model rl.Model
|
||||
Texture rl.Texture2D
|
||||
ID int32
|
||||
}
|
||||
Reference in New Issue
Block a user