world

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 27, 2018 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const VERBOSE_LOGGING = false

Variables

This section is empty.

Functions

This section is empty.

Types

type PlayerRoomMap

type PlayerRoomMap struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewPlayerRoomMap

func NewPlayerRoomMap() *PlayerRoomMap

func (*PlayerRoomMap) Add

func (m *PlayerRoomMap) Add(p player.Player, r *spaces.Room)

func (*PlayerRoomMap) Get

func (m *PlayerRoomMap) Get(p player.Player) *spaces.Room

func (*PlayerRoomMap) GetPlayers

func (m *PlayerRoomMap) GetPlayers(r *spaces.Room) []player.Player

func (*PlayerRoomMap) Remove

func (m *PlayerRoomMap) Remove(p player.Player)

type World

type World struct {
	// contains filtered or unexported fields
}

noinspection GoNameStartsWithPackageName

func New

func New(worldFilesDirectory string) (w *World, err error)

Constructor for World

func (*World) AddPlayer

func (w *World) AddPlayer(players ...player.Player)

Add Player(s) to the world putting them in the start room, Don't send room notifications.

func (*World) DoMobileActivity

func (w *World) DoMobileActivity()

Walk through all the mob instances that are in this world right now and tell them all to do something, if they have anything they want to do.

func (*World) DoZoneActivity

func (w *World) DoZoneActivity()

func (*World) HandleIncomingMessage

func (w *World) HandleIncomingMessage(msg *gameserver.HandlerParameter)

func (*World) RemovePlayer

func (w *World) RemovePlayer(players ...player.Player)

func (*World) SendToAllPlayers

func (w *World) SendToAllPlayers(message interface{})

Send a message to all players in the world.

func (*World) SendToAllPlayersExcept

func (w *World) SendToAllPlayersExcept(exception player.Player, message interface{})

Send a message to all players in the world except for one.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL