xy 1 viikko sitten
vanhempi
commit
978e909348
1 muutettua tiedostoa jossa 4 lisäystä ja 4 poistoa
  1. 4 4
      src/server/game/ludo/battle.go

+ 4 - 4
src/server/game/ludo/battle.go

@@ -196,7 +196,7 @@ func (room_info *RoomInfoWrapper) notify_player_sz() {
 
 	if room_info.containsRobot(cur_color) {
 		fmt.Printf("robot_sz_time:%v:\n", time.Now())
-		game.Module.Skeleton.AfterFunc(time.Duration(2000)*time.Microsecond, func() {
+		game.Module.Skeleton.AfterFunc(time.Duration(2000)*time.Millisecond, func() {
 			fmt.Printf("robot_sz_time:%v:\n", time.Now())
 			room_info.send_sz(cur_color)
 		})
@@ -288,7 +288,7 @@ func (room_info *RoomInfoWrapper) notify_all_player(message interface{}) {
 
 // 给前端展示一段时间后,再操作
 func (room_info *RoomInfoWrapper) delayActionNextRound(td int32, color msg.RoleType, szNumber int32, isAddRound bool, isFinish bool) {
-	dtn := time.Duration(td) * time.Microsecond
+	dtn := time.Duration(td) * time.Millisecond
 	game.Module.Skeleton.AfterFunc(dtn, func() {
 		room_info.process_move(color, szNumber, isAddRound, isFinish)
 	})
@@ -296,7 +296,7 @@ func (room_info *RoomInfoWrapper) delayActionNextRound(td int32, color msg.RoleT
 
 // 给前端展示一段时间后,再操作
 func (room_info *RoomInfoWrapper) delay_action_sz(td int, msg_body *msg.NotifyPlayerSzNumber) {
-	dtn := time.Duration(td) * time.Microsecond
+	dtn := time.Duration(td) * time.Millisecond
 	game.Module.Skeleton.AfterFunc(dtn, func() {
 		room_info.process_sz(msg_body)
 	})
@@ -304,7 +304,7 @@ func (room_info *RoomInfoWrapper) delay_action_sz(td int, msg_body *msg.NotifyPl
 
 // 延迟后,移动机器人
 func (room_info *RoomInfoWrapper) delay_action_move_robot(td int, color msg.RoleType, list []*msg.RoleData) {
-	dtn := time.Duration(td) * time.Microsecond
+	dtn := time.Duration(td) * time.Millisecond
 	game.Module.Skeleton.AfterFunc(dtn, func() {
 		role := getRandomItem(list)
 		room_info.send_role_move(color, role.MId)