new server
All checks were successful
Create and publish a Docker image 🚀 / build-and-push-image (push) Successful in 1m19s
All checks were successful
Create and publish a Docker image 🚀 / build-and-push-image (push) Successful in 1m19s
This commit is contained in:
@@ -1,9 +1,20 @@
|
||||
package models
|
||||
|
||||
import "github.com/gorilla/websocket"
|
||||
|
||||
type Player struct {
|
||||
Entity
|
||||
BaseEntity
|
||||
Name string
|
||||
Conn *websocket.Conn
|
||||
}
|
||||
|
||||
func NewPlayer(id uint32, name string) *Player {
|
||||
return &Player{
|
||||
BaseEntity: BaseEntity{
|
||||
ID: id,
|
||||
Type: EntityPlayer,
|
||||
X: 0,
|
||||
Y: 0,
|
||||
Z: 0,
|
||||
Yaw: 0,
|
||||
},
|
||||
Name: name,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user