資源簡介
Unity3d開發(fā)的微信跳一跳小游戲角色跳躍 相機(jī)跟隨 臺子自動生成死亡判定及重新開始游戲分?jǐn)?shù)統(tǒng)計(jì) 色蓄力的粒子效果 角色蓄力效果 角色蓄力臺子效果飄分效果 聯(lián)網(wǎng)排行榜功能 翻倍加分功能
代碼片段和文件信息
using?System;
using?System.Collections;
using?System.Collections.Generic;
using?UnityEngine;
using?UnityEngine.Networking;
using?UnityEngine.Networking.Types;
public?class?LeanCloudRestAPI
{
????public?string?AppId?{?get;?set;?}
????public?string?AppKey?{?get;?set;?}
????private?readonly?string?_baseUrl;
????public?LeanCloudRestAPI(string?appId?string?appKey)
????{
????????AppId?=?appId;
????????AppKey?=?appKey;
????????_baseUrl?=?BuildUrl(appId);
????}
????string?BuildUrl(string?appKey)
????{
????????var?prefix?=?appKey.Substring(0?8).ToLower();
????????return?string.Format(“https://{0}.api.lncld.net“?prefix);
????}
????public?IEnumerator?Create(string?className?string?json?Action?calback)
????{
????????var?url?=?_baseUrl?+?“/1.1/classes/“?+?className;
????????using?(var?www?=?UnityWebRequest.Put(url?json))
????????{
????????????//?Unity?UnityWebRequest?BUG?
????????????//?see:https://forum.unity.com/threads/unitywebrequest-post-url-jsondata-sending-broken-json.414708/
????????????www.method?=?“POST“;
????????????www.SetRequestHeader(“Content-Type“?“application/json“);
????????????www.SetRequestHeader(“X-LC-Id“?AppId);
????????????www.SetRequestHeader(“X-LC-Key“?AppKey);
????????????yield?return?www.SendWebRequest();
????????????if?(www.isNetworkError?||?www.isHttpError)
????????????{
????????????????Debug.Log(www.downloadHandler.text);
????????????}
????????????else
????????????{
????????????????calback();
????????????}
????????}
????}
????public?IEnumerator?Query(string?className?Dictionaryject>?parameters?Action?calback)
????{
????????var?url?=?_baseUrl?+?“/1.1/classes/“?+?className?+?“?“;
????????var?i?=?0;
????????foreach?(var?o?in?parameters)
????????{
????????????if?(i?!=?0)
????????????????url?+=?“&“;
????????????url?+=?o.Key?+?“=“?+?o.Value;
????????????i++;
????????}
????????using?(var?www?=?UnityWebRequest.Get(url))
????????{
????????????www.SetRequestHeader(“X-LC-Id“?AppId);
????????????www.SetRequestHeader(“X-LC-Key“?AppKey);
????????????yield?return?www.SendWebRequest();
????????????if?(www.isNetworkError?||?www.isHttpError)
????????????{
????????????????Debug.Log(www.downloadHandler.text);
????????????}
????????????else
????????????{
????????????????calback(www.downloadHandler.text);
????????????}
????????}
????}
}
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-06-12?12:57??Unity-JumpJump-master\
?????目錄???????????0??2018-06-12?12:57??Unity-JumpJump-master\JumpJump\
?????文件??????????54??2018-06-12?12:57??Unity-JumpJump-master\JumpJump\.gitignore
?????目錄???????????0??2018-06-12?12:57??Unity-JumpJump-master\JumpJump\Assets\
?????文件?????????213??2018-06-12?12:57??Unity-JumpJump-master\JumpJump\Assets\Demigiant.me
?????目錄???????????0??2018-06-12?12:57??Unity-JumpJump-master\JumpJump\Assets\Demigiant\
?????文件?????????213??2018-06-12?12:57??Unity-JumpJump-master\JumpJump\Assets\Demigiant\DOTween.me
?????目錄???????????0??2018-06-12?12:57??Unity-JumpJump-master\JumpJump\Assets\Demigiant\DOTween\
?????文件??????188148??2018-06-12?12:57??Unity-JumpJump-master\JumpJump\Assets\Demigiant\DOTween\DOTween.xm
?????文件?????????192??2018-06-12?12:57??Unity-JumpJump-master\JumpJump\Assets\Demigiant\DOTween\DOTween.xm
?????文件??????143872??2018-06-12?12:57??Unity-JumpJump-master\JumpJump\Assets\Demigiant\DOTween\DOTween.dll
?????文件???????55846??2018-06-12?12:57??Unity-JumpJump-master\JumpJump\Assets\Demigiant\DOTween\DOTween.dll.mdb
?????文件?????????189??2018-06-12?12:57??Unity-JumpJump-master\JumpJump\Assets\Demigiant\DOTween\DOTween.dll.mdb.me
?????文件?????????369??2018-06-12?12:57??Unity-JumpJump-master\JumpJump\Assets\Demigiant\DOTween\DOTween.dll.me
?????文件????????9728??2018-06-12?12:57??Unity-JumpJump-master\JumpJump\Assets\Demigiant\DOTween\DOTween43.dll
?????文件????????1789??2018-06-12?12:57??Unity-JumpJump-master\JumpJump\Assets\Demigiant\DOTween\DOTween43.dll.mdb
?????文件?????????196??2018-06-12?12:57??Unity-JumpJump-master\JumpJump\Assets\Demigiant\DOTween\DOTween43.dll.mdb.me
?????文件?????????610??2018-06-12?12:57??Unity-JumpJump-master\JumpJump\Assets\Demigiant\DOTween\DOTween43.dll.me
?????文件????????7080??2018-06-12?12:57??Unity-JumpJump-master\JumpJump\Assets\Demigiant\DOTween\DOTween43.xm
?????文件?????????199??2018-06-12?12:57??Unity-JumpJump-master\JumpJump\Assets\Demigiant\DOTween\DOTween43.xm
?????文件???????20480??2018-06-12?12:57??Unity-JumpJump-master\JumpJump\Assets\Demigiant\DOTween\DOTween46.dll
?????文件????????5901??2018-06-12?12:57??Unity-JumpJump-master\JumpJump\Assets\Demigiant\DOTween\DOTween46.dll.mdb
?????文件?????????196??2018-06-12?12:57??Unity-JumpJump-master\JumpJump\Assets\Demigiant\DOTween\DOTween46.dll.mdb.me
?????文件?????????610??2018-06-12?12:57??Unity-JumpJump-master\JumpJump\Assets\Demigiant\DOTween\DOTween46.dll.me
?????文件???????23310??2018-06-12?12:57??Unity-JumpJump-master\JumpJump\Assets\Demigiant\DOTween\DOTween46.xm
?????文件?????????199??2018-06-12?12:57??Unity-JumpJump-master\JumpJump\Assets\Demigiant\DOTween\DOTween46.xm
?????文件????????5632??2018-06-12?12:57??Unity-JumpJump-master\JumpJump\Assets\Demigiant\DOTween\DOTween50.dll
?????文件?????????796??2018-06-12?12:57??Unity-JumpJump-master\JumpJump\Assets\Demigiant\DOTween\DOTween50.dll.mdb
?????文件?????????196??2018-06-12?12:57??Unity-JumpJump-master\JumpJump\Assets\Demigiant\DOTween\DOTween50.dll.mdb.me
?????文件?????????610??2018-06-12?12:57??Unity-JumpJump-master\JumpJump\Assets\Demigiant\DOTween\DOTween50.dll.me
?????文件????????6734??2018-06-12?12:57??Unity-JumpJump-master\JumpJump\Assets\Demigiant\DOTween\DOTween50.xm
............此處省略100個(gè)文件信息
評論
共有 條評論