本文整理匯總了Golang中hearts/img/uistate.UIState.CurTable方法的典型用法代碼示例。如果您正苦於以下問題:Golang UIState.CurTable方法的具體用法?Golang UIState.CurTable怎麽用?Golang UIState.CurTable使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類hearts/img/uistate.UIState
的用法示例。
在下文中一共展示了UIState.CurTable方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: onStart
func onStart(glctx gl.Context, u *uistate.UIState) {
flag.Set("v23.credentials", "/sdcard/credentials")
vlog.Log.Configure(vlog.OverridePriorConfiguration(true), vlog.LogToStderr(true))
vlog.Log.Configure(vlog.OverridePriorConfiguration(true), vlog.Level(0))
ctx, shutdown := v23.Init()
u.Shutdown = shutdown
u.Ctx = ctx
u.Service = syncbase.NewService(util.MountPoint + "/croupier/" + util.SBName)
namespace := v23.GetNamespace(u.Ctx)
allAccess := access.AccessList{In: []security.BlessingPattern{"..."}}
permissions := access.Permissions{
"Admin": allAccess,
"Write": allAccess,
"Read": allAccess,
"Resolve": allAccess,
"Debug": allAccess,
}
namespace.SetPermissions(u.Ctx, util.MountPoint, permissions, "")
namespace.SetPermissions(u.Ctx, util.MountPoint+"/croupier", permissions, "")
u.Service.SetPermissions(u.Ctx, permissions, "")
u.Images = glutil.NewImages(glctx)
fps = debug.NewFPS(u.Images)
u.Eng = glsprite.Engine(u.Images)
u.Texs = texture.LoadTextures(u.Eng)
u.CurTable = table.InitializeGame(u.NumPlayers, u.Texs)
sound.InitPlayers(u)
sync.CreateTables(u)
// Create watch stream to update game state based on Syncbase updates
go sync.UpdateSettings(u)
}