func CreateGame(r renderer.GenericRenderer) *Game { r.UpdateCameraPos([3]float32{0, 0, -10}) return &Game{ renderer: r, paused: false, Players: []cognition.Player{}, Entities: []GenericEntity{}, } }
func CreateActor(config string, r renderer.GenericRenderer) *Actor { var vertices = []float32{ // X, Y, Z, U, V 1.0, -1.0, 0.0, 1.0, 0.0, -1.0, 1.0, 0.0, 0.0, 1.0, -1.0, -1.0, 0.0, 0.0, 0.0, 1.0, -1.0, 0.0, 1.0, 0.0, -1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, } r.AddMesh(vertices, []string{"barb.png"}) r.UpdateMeshPos(0, [3]float32{0, 0, 0}) return &Actor{ renderer: r, position: [4]float32{0, 0, 0}, } }