Documentation ¶
Index ¶
- func NewRoom(playerSessions []face.ISession, OnSpawn func(face.IRoom), ...) face.IRoom
- func NewRoomStateConfirm(room face.IRoom, length int) face.IRoomState
- func NewRoomStateFight(room face.IRoom, length int) face.IRoomState
- func NewRoomStateLoadResource(room face.IRoom, length int) face.IRoomState
- func NewRoomStateSelect(room face.IRoom, length int) face.IRoomState
- type Room
- func (room *Room) Broadcast(data []byte)
- func (room *Room) ChangePlayersRoomId()
- func (room *Room) ChangeRoomState(newState int)
- func (room *Room) Delete()
- func (room *Room) GetCurrentState() face.IRoomState
- func (room *Room) GetPlayerIndex(session face.ISession) int
- func (room *Room) GetRoomId() uint32
- func (room *Room) GetRoomPlayerCount() int
- func (room *Room) GetSelectData() []int
- func (room *Room) SendFightStart()
- func (room *Room) SendLoadResource()
- func (room *Room) SetSelectData(selectArr []int)
- func (room *Room) Start()
- type RoomState
- type RoomStateConfirm
- func (state *RoomStateConfirm) CheckAllConfirm() bool
- func (state *RoomStateConfirm) CheckTimeLimit()
- func (state *RoomStateConfirm) Dismiss()
- func (state *RoomStateConfirm) Enter()
- func (state *RoomStateConfirm) Exit()
- func (state *RoomStateConfirm) Update(sesssion face.ISession, mes *pb.PbMessage)
- type RoomStateEnd
- type RoomStateFight
- func (state *RoomStateFight) CheckAllFightDone() bool
- func (state *RoomStateFight) Enter()
- func (state *RoomStateFight) Exit()
- func (state *RoomStateFight) ResponseFightEnd(playerIndex int)
- func (state *RoomStateFight) SyncLogicFrame()
- func (state *RoomStateFight) Update(sesssion face.ISession, mes *pb.PbMessage)
- type RoomStateLoadResource
- type RoomStateSelect
- type SelectData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRoomStateConfirm ¶
func NewRoomStateConfirm(room face.IRoom, length int) face.IRoomState
func NewRoomStateFight ¶
func NewRoomStateFight(room face.IRoom, length int) face.IRoomState
func NewRoomStateLoadResource ¶
func NewRoomStateLoadResource(room face.IRoom, length int) face.IRoomState
func NewRoomStateSelect ¶
func NewRoomStateSelect(room face.IRoom, length int) face.IRoomState
Types ¶
type Room ¶
type Room struct {
// contains filtered or unexported fields
}
a single room
func (*Room) ChangePlayersRoomId ¶
func (room *Room) ChangePlayersRoomId()
func (*Room) ChangeRoomState ¶
func (*Room) GetCurrentState ¶
func (room *Room) GetCurrentState() face.IRoomState
func (*Room) GetRoomPlayerCount ¶
func (*Room) GetSelectData ¶
func (*Room) SendFightStart ¶
func (room *Room) SendFightStart()
func (*Room) SendLoadResource ¶
func (room *Room) SendLoadResource()
func (*Room) SetSelectData ¶
type RoomStateConfirm ¶
type RoomStateConfirm struct {
// contains filtered or unexported fields
}
func (*RoomStateConfirm) CheckAllConfirm ¶
func (state *RoomStateConfirm) CheckAllConfirm() bool
func (*RoomStateConfirm) CheckTimeLimit ¶
func (state *RoomStateConfirm) CheckTimeLimit()
func (*RoomStateConfirm) Dismiss ¶
func (state *RoomStateConfirm) Dismiss()
func (*RoomStateConfirm) Enter ¶
func (state *RoomStateConfirm) Enter()
func (*RoomStateConfirm) Exit ¶
func (state *RoomStateConfirm) Exit()
type RoomStateEnd ¶
type RoomStateEnd struct {
// contains filtered or unexported fields
}
func (*RoomStateEnd) Enter ¶
func (state *RoomStateEnd) Enter()
func (*RoomStateEnd) Exit ¶
func (state *RoomStateEnd) Exit()
type RoomStateFight ¶
type RoomStateFight struct {
// contains filtered or unexported fields
}
func (*RoomStateFight) CheckAllFightDone ¶
func (state *RoomStateFight) CheckAllFightDone() bool
func (*RoomStateFight) Enter ¶
func (state *RoomStateFight) Enter()
func (*RoomStateFight) Exit ¶
func (state *RoomStateFight) Exit()
func (*RoomStateFight) ResponseFightEnd ¶
func (state *RoomStateFight) ResponseFightEnd(playerIndex int)
func (*RoomStateFight) SyncLogicFrame ¶
func (state *RoomStateFight) SyncLogicFrame()
type RoomStateLoadResource ¶
type RoomStateLoadResource struct {
// contains filtered or unexported fields
}
func (*RoomStateLoadResource) CheckAllLoadDone ¶
func (state *RoomStateLoadResource) CheckAllLoadDone() bool
func (*RoomStateLoadResource) Enter ¶
func (state *RoomStateLoadResource) Enter()
func (*RoomStateLoadResource) Exit ¶
func (state *RoomStateLoadResource) Exit()
type RoomStateSelect ¶
type RoomStateSelect struct {
// contains filtered or unexported fields
}
func (*RoomStateSelect) CheckAllSelectDone ¶
func (state *RoomStateSelect) CheckAllSelectDone() bool
func (*RoomStateSelect) CheckTimeLimit ¶
func (state *RoomStateSelect) CheckTimeLimit()
func (*RoomStateSelect) Dismiss ¶
func (state *RoomStateSelect) Dismiss()
func (*RoomStateSelect) Enter ¶
func (state *RoomStateSelect) Enter()
func (*RoomStateSelect) Exit ¶
func (state *RoomStateSelect) Exit()
type SelectData ¶
type SelectData struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.