mod及import改为github.com/kercylan98/minotaur
This commit is contained in:
parent
0e3b80ccd5
commit
84094569af
|
@ -1,7 +1,7 @@
|
||||||
package lockstep
|
package lockstep
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"minotaur/utils/timer"
|
"github.com/kercylan98/minotaur/utils/timer"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
|
@ -2,11 +2,11 @@ package analyzer
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/kercylan98/minotaur/exporter/configuration"
|
||||||
|
"github.com/kercylan98/minotaur/exporter/configuration/golang"
|
||||||
|
"github.com/kercylan98/minotaur/utils/log"
|
||||||
"github.com/xuri/excelize/v2"
|
"github.com/xuri/excelize/v2"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
"minotaur/exporter/configuration"
|
|
||||||
"minotaur/exporter/configuration/golang"
|
|
||||||
"minotaur/utils/log"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
|
@ -2,8 +2,8 @@ package golang
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"minotaur/exporter/configuration"
|
"github.com/kercylan98/minotaur/exporter/configuration"
|
||||||
"minotaur/utils/hash"
|
"github.com/kercylan98/minotaur/utils/hash"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package golang
|
package golang
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"minotaur/exporter/configuration"
|
"github.com/kercylan98/minotaur/exporter/configuration"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewField(id int, name string, fieldType configuration.FieldType, isIndex bool) *Field {
|
func NewField(id int, name string, fieldType configuration.FieldType, isIndex bool) *Field {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package golang
|
package golang
|
||||||
|
|
||||||
import "minotaur/exporter/configuration"
|
import "github.com/kercylan98/minotaur/exporter/configuration"
|
||||||
|
|
||||||
func GetFieldType(fieldType string) configuration.FieldType {
|
func GetFieldType(fieldType string) configuration.FieldType {
|
||||||
switch fieldType {
|
switch fieldType {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package game
|
package game
|
||||||
|
|
||||||
import "minotaur/utils/huge"
|
import "github.com/kercylan98/minotaur/utils/huge"
|
||||||
|
|
||||||
// Attrs 属性
|
// Attrs 属性
|
||||||
type Attrs interface {
|
type Attrs interface {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package builtin
|
package builtin
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"minotaur/game"
|
"github.com/kercylan98/minotaur/game"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ActorMove struct {
|
type ActorMove struct {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package builtin
|
package builtin
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"minotaur/game"
|
"github.com/kercylan98/minotaur/game"
|
||||||
"minotaur/utils/huge"
|
"github.com/kercylan98/minotaur/utils/huge"
|
||||||
"minotaur/utils/synchronization"
|
"github.com/kercylan98/minotaur/utils/synchronization"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewAttrs() *Attrs {
|
func NewAttrs() *Attrs {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package builtin
|
package builtin
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"minotaur/game"
|
"github.com/kercylan98/minotaur/game"
|
||||||
"minotaur/utils/offset"
|
"github.com/kercylan98/minotaur/utils/offset"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package builtin
|
package builtin
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"minotaur/game"
|
"github.com/kercylan98/minotaur/game"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewGameplayOver() *GameplayOver {
|
func NewGameplayOver() *GameplayOver {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package builtin
|
package builtin
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"minotaur/game"
|
"github.com/kercylan98/minotaur/game"
|
||||||
"minotaur/utils/timer"
|
"github.com/kercylan98/minotaur/utils/timer"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ package builtin
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"minotaur/utils/timer"
|
"github.com/kercylan98/minotaur/utils/timer"
|
||||||
)
|
)
|
||||||
|
|
||||||
type GameplayTimeOption func(time *GameplayTime)
|
type GameplayTimeOption func(time *GameplayTime)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package builtin
|
package builtin
|
||||||
|
|
||||||
import "minotaur/server"
|
import "github.com/kercylan98/minotaur/server"
|
||||||
|
|
||||||
func NewPlayer[ID comparable](id ID, conn *server.Conn) *Player[ID] {
|
func NewPlayer[ID comparable](id ID, conn *server.Conn) *Player[ID] {
|
||||||
return &Player[ID]{
|
return &Player[ID]{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package builtin
|
package builtin
|
||||||
|
|
||||||
import "minotaur/game"
|
import "github.com/kercylan98/minotaur/game"
|
||||||
|
|
||||||
// NewPosition 创建一个新的位置对象。
|
// NewPosition 创建一个新的位置对象。
|
||||||
func NewPosition(x, y, z float64) *Position {
|
func NewPosition(x, y, z float64) *Position {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
package builtin
|
package builtin
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/kercylan98/minotaur/game"
|
||||||
|
"github.com/kercylan98/minotaur/utils/log"
|
||||||
|
"github.com/kercylan98/minotaur/utils/synchronization"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
"minotaur/game"
|
|
||||||
"minotaur/utils/log"
|
|
||||||
"minotaur/utils/synchronization"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewRoom[PlayerID comparable, Player game.Player[PlayerID]](guid int64) *Room[PlayerID, Player] {
|
func NewRoom[PlayerID comparable, Player game.Player[PlayerID]](guid int64) *Room[PlayerID, Player] {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package builtin
|
package builtin
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"minotaur/game"
|
"github.com/kercylan98/minotaur/game"
|
||||||
"minotaur/utils/synchronization"
|
"github.com/kercylan98/minotaur/utils/synchronization"
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package builtin
|
package builtin
|
||||||
|
|
||||||
import "minotaur/game"
|
import "github.com/kercylan98/minotaur/game"
|
||||||
|
|
||||||
// RoomOption 房间构建可选项
|
// RoomOption 房间构建可选项
|
||||||
type RoomOption[PlayerID comparable, Player game.Player[PlayerID]] func(room *Room[PlayerID, Player])
|
type RoomOption[PlayerID comparable, Player game.Player[PlayerID]] func(room *Room[PlayerID, Player])
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
package builtin
|
package builtin
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/kercylan98/minotaur/game"
|
||||||
|
"github.com/kercylan98/minotaur/utils/log"
|
||||||
|
"github.com/kercylan98/minotaur/utils/synchronization"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
"minotaur/game"
|
|
||||||
"minotaur/utils/log"
|
|
||||||
"minotaur/utils/synchronization"
|
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package builtin
|
package builtin
|
||||||
|
|
||||||
import "minotaur/game"
|
import "github.com/kercylan98/minotaur/game"
|
||||||
|
|
||||||
// WorldOption 世界构建可选项
|
// WorldOption 世界构建可选项
|
||||||
type WorldOption[PlayerID comparable, Player game.Player[PlayerID]] func(world *World[PlayerID, Player])
|
type WorldOption[PlayerID comparable, Player game.Player[PlayerID]] func(world *World[PlayerID, Player])
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package extension
|
package extension
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"minotaur/game"
|
"github.com/kercylan98/minotaur/game"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package game
|
package game
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"minotaur/utils/offset"
|
"github.com/kercylan98/minotaur/utils/offset"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package game
|
package game
|
||||||
|
|
||||||
import "minotaur/utils/synchronization"
|
import "github.com/kercylan98/minotaur/utils/synchronization"
|
||||||
|
|
||||||
// Room 房间类似于简版的游戏世界,不过没有游戏实体
|
// Room 房间类似于简版的游戏世界,不过没有游戏实体
|
||||||
type Room[PlayerID comparable, P Player[PlayerID]] interface {
|
type Room[PlayerID comparable, P Player[PlayerID]] interface {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package game
|
package game
|
||||||
|
|
||||||
import "minotaur/utils/synchronization"
|
import "github.com/kercylan98/minotaur/utils/synchronization"
|
||||||
|
|
||||||
// World 游戏世界接口定义
|
// World 游戏世界接口定义
|
||||||
type World[PlayerID comparable, P Player[PlayerID]] interface {
|
type World[PlayerID comparable, P Player[PlayerID]] interface {
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -1,4 +1,4 @@
|
||||||
module minotaur
|
module github.com/kercylan98/minotaur
|
||||||
|
|
||||||
go 1.20
|
go 1.20
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package notify
|
package notify
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/kercylan98/minotaur/utils/log"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
"minotaur/utils/log"
|
|
||||||
"reflect"
|
"reflect"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ package senders
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/go-resty/resty/v2"
|
"github.com/go-resty/resty/v2"
|
||||||
"minotaur/notify"
|
"github.com/kercylan98/minotaur/notify"
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package server
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/kercylan98/minotaur/utils/log"
|
||||||
|
"github.com/kercylan98/minotaur/utils/runtimes"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
"minotaur/utils/log"
|
|
||||||
"minotaur/utils/runtimes"
|
|
||||||
"reflect"
|
"reflect"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package server
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/kercylan98/minotaur/utils/log"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
"minotaur/utils/log"
|
|
||||||
"os"
|
"os"
|
||||||
"os/signal"
|
"os/signal"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package server
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/kercylan98/minotaur/utils/log"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
"minotaur/utils/log"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type Option func(srv *Server)
|
type Option func(srv *Server)
|
||||||
|
|
|
@ -5,12 +5,12 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/gorilla/websocket"
|
"github.com/gorilla/websocket"
|
||||||
|
"github.com/kercylan98/minotaur/utils/log"
|
||||||
|
"github.com/kercylan98/minotaur/utils/synchronization"
|
||||||
"github.com/panjf2000/gnet"
|
"github.com/panjf2000/gnet"
|
||||||
"github.com/xtaci/kcp-go/v5"
|
"github.com/xtaci/kcp-go/v5"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"minotaur/utils/log"
|
|
||||||
"minotaur/utils/synchronization"
|
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package g2d
|
package g2d
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"minotaur/utils/g2d/matrix"
|
"github.com/kercylan98/minotaur/utils/g2d/matrix"
|
||||||
)
|
)
|
||||||
|
|
||||||
// NewMatrix 生成特定宽高的二维矩阵
|
// NewMatrix 生成特定宽高的二维矩阵
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package synchronization
|
package synchronization
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/kercylan98/minotaur/utils/log"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
"minotaur/utils/log"
|
|
||||||
"sync"
|
"sync"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue