35 lines
655 B
Go
35 lines
655 B
Go
package routes
|
|
|
|
import (
|
|
"context"
|
|
"game-driver/internal/routes/play"
|
|
"game-driver/leaf"
|
|
)
|
|
|
|
func PlayRouter(ctx context.Context, location string, point int) leaf.HandlerFunc {
|
|
switch location {
|
|
case "wushan":
|
|
return switchPoint(ctx, point)
|
|
default:
|
|
return play.Default
|
|
}
|
|
}
|
|
|
|
func switchPoint(ctx context.Context, point int) leaf.HandlerFunc {
|
|
switch point {
|
|
case 2: // 镇水塔点位
|
|
return play.OnlyVideo
|
|
case 5:
|
|
// 登龙云台(激光秀)
|
|
return play.LaserShow
|
|
case 10:
|
|
// 10号点位(发卡机)
|
|
return play.PushCard(ctx)
|
|
case 11:
|
|
// 11号点位(等待插卡)
|
|
return play.WaitCard(ctx)
|
|
default:
|
|
return play.Default
|
|
}
|
|
}
|