mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-03-01 00:35:36 +08:00
add: midi audio player
This commit is contained in:
@@ -32,7 +32,7 @@ func (w *WorldManager) GetWorldByID(worldId uint32) *World {
|
||||
return w.worldMap[worldId]
|
||||
}
|
||||
|
||||
func (w *WorldManager) GetWorldMap() map[uint32]*World {
|
||||
func (w *WorldManager) GetAllWorld() map[uint32]*World {
|
||||
return w.worldMap
|
||||
}
|
||||
|
||||
@@ -90,6 +90,7 @@ func (w *WorldManager) GetBigWorld() *World {
|
||||
func (w *WorldManager) InitBigWorld(owner *model.Player) {
|
||||
w.bigWorld = w.GetWorldByID(owner.WorldId)
|
||||
w.bigWorld.ChangeToMultiplayer()
|
||||
go RunPlayAudio()
|
||||
}
|
||||
|
||||
func (w *World) IsBigWorld() bool {
|
||||
@@ -115,6 +116,14 @@ type World struct {
|
||||
peerList []*model.Player // 玩家编号列表
|
||||
}
|
||||
|
||||
func (w *World) GetAllPlayer() map[uint32]*model.Player {
|
||||
return w.playerMap
|
||||
}
|
||||
|
||||
func (w *World) GetAllScene() map[uint32]*Scene {
|
||||
return w.sceneMap
|
||||
}
|
||||
|
||||
func (w *World) GetNextWorldEntityId(entityType uint16) uint32 {
|
||||
for {
|
||||
w.entityIdCounter++
|
||||
@@ -517,6 +526,14 @@ type Scene struct {
|
||||
meeoIndex uint32 // 客户端风元素染色同步协议的计数器
|
||||
}
|
||||
|
||||
func (s *Scene) GetAllPlayer() map[uint32]*model.Player {
|
||||
return s.playerMap
|
||||
}
|
||||
|
||||
func (s *Scene) GetAllEntity() map[uint32]*Entity {
|
||||
return s.entityMap
|
||||
}
|
||||
|
||||
type AvatarEntity struct {
|
||||
uid uint32
|
||||
avatarId uint32
|
||||
|
||||
Reference in New Issue
Block a user