示例#1
0
文件: runtime.go 项目: Garoth/StAbbey
/* Dumps the given order to the console */
func printOrder(order interfaces.Order) {
	entity := GAME.GetEntityByPlayer(order.GetPlayer())
	log.Printf("Handled Order: command:'%v' tick:%v actions:%v player:%v",
		COMMAND_CODES[order.GetCommandCode()], order.GetTickNumber(),
		entity.GetStringActionQueue(),
		order.GetPlayer().GetPlayerId())
}
示例#2
0
文件: runtime.go 项目: Garoth/StAbbey
/* Updates players' ticks and send out gamestate when everyone's ready */
func updateTick(order interfaces.Order) {
	p := order.GetPlayer()
	p.SetLastTick(order.GetTickNumber())
	p.SetLastTickTime(time.Now())
}