本文整理汇总了C#中Roar类的典型用法代码示例。如果您正苦于以下问题:C# Roar类的具体用法?C# Roar怎么用?C# Roar使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Roar类属于命名空间,在下文中一共展示了Roar类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Fetch
public void Fetch(Roar.Callback< IDictionary<string,Foo> > callback)
{
Hashtable data = new Hashtable();
data.Add("board_id", boardId);
data.Add("page", page.ToString());
dataStore.ranking.Fetch(callback, data);
}
开发者ID:QuiVeeGlobal,项目名称:sdk-unity,代码行数:7,代码来源:Ranking.cs
示例2: onShopFetch
static void onShopFetch( Roar.CallbackInfo< IDictionary<string, Roar.DomainObjects.ShopEntry> > info )
{
Debug.Log( "onShopFetch Called" );
Debug.Log(info);
Debug.Log(info.code);
Debug.Log(info.msg);
Debug.Log(info.data);
}
开发者ID:QuiVeeGlobal,项目名称:sdk-unity,代码行数:8,代码来源:RoarShopTest.cs
示例3: onShopFetch
static void onShopFetch( Roar.CallbackInfo info )
{
Debug.Log( "onShopFetch Called" );
Debug.Log(info);
Debug.Log(info.code);
Debug.Log(info.msg);
Debug.Log(info.d);
}
开发者ID:yorrickm,项目名称:sdk-unity,代码行数:8,代码来源:RoarShopTest.cs
示例4: LoadChangedLeaderboard
static void LoadChangedLeaderboard(Roar.WebObjects.Leaderboards.ViewResponse response)
{
foreach(LeaderboardEntry e in response.leaderboard_data.entries)
{
if(!playerIDleaderboardDict.ContainsKey(e.player_id))
{
playerIDleaderboardDict.Add(e.player_id, e.properties);
}
}
}
开发者ID:joaokucera,项目名称:sdk-unity,代码行数:10,代码来源:PlayerDictionary.cs
示例5: onLogin
static void onLogin( Roar.CallbackInfo info )
{
Debug.Log( "onLogin Called" );
Debug.Log(info);
Debug.Log(info.code);
Debug.Log(info.msg);
Debug.Log(info.d);
IRoar roar = DefaultRoar.Instance;
roar.Shop.Fetch( onShopFetch );
}
开发者ID:yorrickm,项目名称:sdk-unity,代码行数:10,代码来源:RoarShopTest.cs
示例6: onLogin
static void onLogin( Roar.CallbackInfo< Roar.WebObjects.User.LoginResponse > info )
{
Debug.Log( "onLogin Called" );
Debug.Log(info);
Debug.Log(info.code);
Debug.Log(info.msg);
Debug.Log(info.data);
IRoar roar = DefaultRoar.Instance;
roar.Shop.Fetch( onShopFetch );
}
开发者ID:QuiVeeGlobal,项目名称:sdk-unity,代码行数:10,代码来源:RoarShopTest.cs
示例7: AddToCache
/**
* Fetches details about `items` array and adds to item Cache Model
*/
public bool AddToCache(ArrayList items, Roar.Callback cb=null)
{
ArrayList batch = ItemsNotInCache (items);
// Make the call if there are new items to fetch,
// passing the `batch` list and persisting the Model data (adding)
// Returns `true` if items are to be added, `false` if nothing to add
if (batch.Count > 0) {
var keysAsJSON = Roar.Json.ArrayToJSON (batch) as string;
Hashtable args = new Hashtable ();
args ["item_ikeys"] = keysAsJSON;
Fetch (cb, args, true);
return true;
} else
return false;
}
开发者ID:yorrickm,项目名称:sdk-unity,代码行数:19,代码来源:ItemCache.cs
示例8: _set
public void _set( Roar.WebObjects.User.SetArguments args, ZWebAPI.Callback<Roar.WebObjects.User.SetResponse> cb)
{
api.MakeCall ("user/set", args.ToHashtable(), new CallbackBridge<Roar.WebObjects.User.SetResponse>(cb, set_response_parser), true);
}
开发者ID:joaokucera,项目名称:sdk-unity,代码行数:4,代码来源:WebAPI.cs
示例9: view
public void view( Roar.WebObjects.User.ViewArguments args, ZWebAPI.Callback<Roar.WebObjects.User.ViewResponse> cb)
{
api.MakeCall ("user/view", args.ToHashtable(), new CallbackBridge<Roar.WebObjects.User.ViewResponse>(cb, view_response_parser), true);
}
开发者ID:joaokucera,项目名称:sdk-unity,代码行数:4,代码来源:WebAPI.cs
示例10: GetAchievement
public Hashtable GetAchievement(string ikey, Roar.Callback callback)
{
if (callback != null)
callback (new Roar.CallbackInfo<object> (dataStore.achievements.Get (ikey)));
return dataStore.achievements.Get (ikey);
}
开发者ID:yorrickm,项目名称:sdk-unity,代码行数:6,代码来源:Achievements.cs
示例11: OnRoarPropertiesFetched
void OnRoarPropertiesFetched(Roar.CallbackInfo< IDictionary<string,Roar.DomainObjects.PlayerAttribute> > info)
{
networkActionInProgress = false;
if (OnFullyLoggedIn != null) OnFullyLoggedIn();
}
开发者ID:QuiVeeGlobal,项目名称:sdk-unity,代码行数:5,代码来源:RoarLoginWidget.cs
示例12: OnRoarFetchTasksComplete
void OnRoarFetchTasksComplete( Roar.CallbackInfo< IDictionary<string,Roar.DomainObjects.Task> > data )
{
isFetching = false;
}
开发者ID:QuiVeeGlobal,项目名称:sdk-unity,代码行数:4,代码来源:RoarLoginWidget.cs
示例13: push
public void push( Roar.WebObjects.Urbanairship.PushArguments args, ZWebAPI.Callback<Roar.WebObjects.Urbanairship.PushResponse> cb)
{
api.MakeCall ("urbanairship/push", args.ToHashtable(), new CallbackBridge<Roar.WebObjects.Urbanairship.PushResponse>(cb, push_response_parser), true);
}
开发者ID:joaokucera,项目名称:sdk-unity,代码行数:4,代码来源:WebAPI.cs
示例14: ios_register
public void ios_register( Roar.WebObjects.Urbanairship.IosRegisterArguments args, ZWebAPI.Callback<Roar.WebObjects.Urbanairship.IosRegisterResponse> cb)
{
api.MakeCall ("urbanairship/ios_register", args.ToHashtable(), new CallbackBridge<Roar.WebObjects.Urbanairship.IosRegisterResponse>(cb, ios_register_response_parser), true);
}
开发者ID:joaokucera,项目名称:sdk-unity,代码行数:4,代码来源:WebAPI.cs
示例15: start
public void start( Roar.WebObjects.Tasks.StartArguments args, ZWebAPI.Callback<Roar.WebObjects.Tasks.StartResponse> cb)
{
api.MakeCall ("tasks/start", args.ToHashtable(), new CallbackBridge<Roar.WebObjects.Tasks.StartResponse>(cb, start_response_parser), true);
}
开发者ID:joaokucera,项目名称:sdk-unity,代码行数:4,代码来源:WebAPI.cs
示例16: list
public void list( Roar.WebObjects.Shop.ListArguments args, ZWebAPI.Callback<Roar.WebObjects.Shop.ListResponse> cb)
{
api.MakeCall ("shop/list", args.ToHashtable(), new CallbackBridge<Roar.WebObjects.Shop.ListResponse>(cb, list_response_parser), true);
}
开发者ID:joaokucera,项目名称:sdk-unity,代码行数:4,代码来源:WebAPI.cs
示例17: buy
public void buy( Roar.WebObjects.Shop.BuyArguments args, ZWebAPI.Callback<Roar.WebObjects.Shop.BuyResponse> cb)
{
api.MakeCall ("shop/buy", args.ToHashtable(), new CallbackBridge<Roar.WebObjects.Shop.BuyResponse>(cb, buy_response_parser), true);
}
开发者ID:joaokucera,项目名称:sdk-unity,代码行数:4,代码来源:WebAPI.cs
示例18: MockRequestSender
public MockRequestSender(Roar.IConfig config, IUnityObject unity_object, Roar.ILogger logger)
: base(config, unity_object, logger)
{
responses = new Hashtable();
}
开发者ID:yorrickm,项目名称:sdk-unity,代码行数:5,代码来源:MockRequestSender.cs
示例19: achievements
public void achievements( Roar.WebObjects.User.AchievementsArguments args, ZWebAPI.Callback<Roar.WebObjects.User.AchievementsResponse> cb)
{
api.MakeCall ("user/achievements", args.ToHashtable(), new CallbackBridge<Roar.WebObjects.User.AchievementsResponse>(cb, achievements_response_parser), true);
}
开发者ID:joaokucera,项目名称:sdk-unity,代码行数:4,代码来源:WebAPI.cs
示例20: OnRoarFetchRankingsComplete
void OnRoarFetchRankingsComplete(Roar.CallbackInfo info)
{
activeLeaderboard.whenLastFetched = Time.realtimeSinceStartup;
isFetching = false;
activeLeaderboard.rankingRaw = activeLeaderboard.ranking.List();
foreach (Hashtable data in activeLeaderboard.rankingRaw)
{
foreach (DictionaryEntry datum in data)
{
//Debug.Log(string.Format("{0} => {1}", entry.Key, entry.Value));
if ((string)datum.Key == "entries")
{
ArrayList entries = (ArrayList)datum.Value;
activeLeaderboard.ranks = new List<Rank>(entries.Count);
Rank rank;
foreach (Hashtable entry in entries)
{
rank = new Rank();
foreach (DictionaryEntry kv in entry)
{
//Debug.Log(string.Format("{0} => {1}", kv.Key, kv.Value));
string k = kv.Key as string;
if (k == "rank")
{
rank.rank = System.Convert.ToInt32(kv.Value);
}
else if (k == "player_id")
{
rank.playerId = kv.Value as string;
}
else if (k == "player_name")
{
rank.playerName = kv.Value as string;
}
else if (k == "value")
{
rank.value = kv.Value as string;
}
}
activeLeaderboard.ranks.Add(rank);
}
}
else if ((string)datum.Key == "properties")
{
Hashtable properties = (Hashtable)datum.Value;
if (properties.ContainsKey("page"))
activeLeaderboard.page = System.Convert.ToInt32(properties["page"]);
if (properties.ContainsKey("num_results"))
activeLeaderboard.numResults = System.Convert.ToInt32(properties["num_results"]);
if (properties.ContainsKey("offset"))
activeLeaderboard.offset = System.Convert.ToInt32(properties["offset"]);
if (properties.ContainsKey("low_is_high"))
activeLeaderboard.lowIsHigh = System.Convert.ToBoolean(properties["low_is_high"]);
}
}
}
}
开发者ID:yorrickm,项目名称:sdk-unity,代码行数:57,代码来源:RoarLeaderboardsModule.cs
注:本文中的Roar类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论