资源简介
用unity+高德地理定位做的,模仿pokemon go的尝试的demo。
源码太大,所以分成两部分。
详细内容看http://blog.csdn.net/wuyt2008/article/details/52934083
代码片段和文件信息
using UnityEngine;
using System.Collections;
public class BackToScene : MonoBehaviour {
public string mainMenuName = “LoaderScene“;
public KeyCode key = KeyCode.Escape;
public bool allowAutoRotation = false;
public GUISkin skin;
void Awake() {
Screen.autorotateToLandscapeLeft = allowAutoRotation;
Screen.autorotateToLandscapeRight = allowAutoRotation;
Screen.autorotateToPortrait = allowAutoRotation;
Screen.autorotateToPortraitUpsideDown = allowAutoRotation;
}
// Update is called once per frame
void Update () {
if(Input.GetKeyDown(key))
{
GoBack();
}
}
void GoBack() {
Debug.Log(“Loading: Menu“);
Application.LoadLevel(mainMenuName);
}
void OnGUI() {
GUI.skin = skin;
float dpiScaling = GUITools.DpiScaling;
GUITools.SetFontSizes();
GUILayout.BeginArea (new Rect(10Screen.height - 60 * dpiScaling200 * dpiScaling50 * dpiScaling));
if(GUILayout.Button (“Back To Menu“ GUILayout.Height(50 * dpiScaling) GUILayout.Width(200 * dpiScaling)))
{
GoBack();
}
GUILayout.EndArea();
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
I.A.... 3 2016-10-26 13:29 pokemon\.svn\entries
I.A.... 3 2016-10-26 13:29 pokemon\.svn\format
I.A...R 5196 2016-10-26 13:30 pokemon\.svn\pristine\00\0004137d5c494a773e9ad5fcde75cd564dbdbd24.svn-ba
I.A...R 104 2016-10-26 13:30 pokemon\.svn\pristine\00\00168a26ac98942ca4373e0a61dafdd60432d092.svn-ba
I.A...R 16880 2016-10-26 13:30 pokemon\.svn\pristine\00\004dafb62c25205ac8e93f278786e84963c7bd11.svn-ba
I.A...R 174 2016-10-26 13:29 pokemon\.svn\pristine\00\006b6258f3cfcf51c50480bb76a48141e191ec82.svn-ba
I.A...R 56 2016-10-26 13:30 pokemon\.svn\pristine\00\00779ce7350917b8cf0fd0ae11c715deddd6c5d0.svn-ba
I.A...R 4308 2016-10-26 13:30 pokemon\.svn\pristine\00\009e18e521b0855c308d6b9e020d4421ff76cb6d.svn-ba
I.A...R 4364 2016-10-26 13:30 pokemon\.svn\pristine\00\009e742a63af7cc62cbca6d10dbf9a3257edc25f.svn-ba
I.A...R 4677 2016-10-26 13:30 pokemon\.svn\pristine\00\00bf779e6fb1d0ff0c49abc702343a1d41f7ac75.svn-ba
I.A...R 174 2016-10-26 13:29 pokemon\.svn\pristine\00\00d62147aa200d7d7cdaa5ef2c8d938190d7533c.svn-ba
I.A...R 45308 2016-10-26 13:37 pokemon\.svn\pristine\00\00dcd1111d204064a426dd52ef3ae2221d7229f5.svn-ba
I.A...R 4377 2016-10-26 13:30 pokemon\.svn\pristine\01\01087e825d5e61cb9534359859ae3d0ff3b7824d.svn-ba
I.A...R 358780 2016-10-26 13:30 pokemon\.svn\pristine\01\0115e53112306c831287b84d70334c7867980937.svn-ba
I.A...R 19331 2016-10-26 13:30 pokemon\.svn\pristine\01\0119558daeee6501f52f2c004f8294313df34eb1.svn-ba
I.A...R 630 2016-10-26 13:30 pokemon\.svn\pristine\01\0121e5810fba65b32c8734decdde4ee381d089be.svn-ba
I.A...R 892 2016-10-26 13:30 pokemon\.svn\pristine\01\015bd7c40e3018b121205882f9dc579047488ba0.svn-ba
I.A...R 3264 2016-10-26 13:30 pokemon\.svn\pristine\01\015d318d3113e8bba57996e58b651085cf3730bb.svn-ba
I.A...R 1231 2016-10-26 13:30 pokemon\.svn\pristine\01\0163150c4a5b6269244c88e7cb73eeaad7fa5bcb.svn-ba
I.A...R 615 2016-10-26 13:30 pokemon\.svn\pristine\01\01ebb5ef83af9f5ffb728360e87813aac96841ea.svn-ba
I.A...R 1220 2016-10-26 13:30 pokemon\.svn\pristine\02\023182e48f376a43a0a71a0dab378ad26e63c072.svn-ba
I.A...R 192 2016-10-26 13:30 pokemon\.svn\pristine\02\0237ff1c66f78d1cced67b1431236d15fb5b464e.svn-ba
I.A...R 181 2016-10-26 13:30 pokemon\.svn\pristine\02\024f855f0884525e6c3891486f87ff07a291ebc3.svn-ba
I.A...R 60 2016-10-26 13:30 pokemon\.svn\pristine\02\02657e132cd1761ff8275672c1822f41d9022cea.svn-ba
I.A...R 4373 2016-10-26 13:30 pokemon\.svn\pristine\02\0288ec0320411fd6a26aa015f149af1bbb8f74fb.svn-ba
I.A...R 4224 2016-10-26 13:30 pokemon\.svn\pristine\02\029cf640e41e8c7821f2c89890d8ed7e83cf4f89.svn-ba
I.A...R 4300 2016-10-26 13:30 pokemon\.svn\pristine\02\02ba343db344783077b62e79db2bdfcff61296c4.svn-ba
I.A...R 235 2016-10-26 13:30 pokemon\.svn\pristine\02\02bb411ba770106fec9e8ddf64e3c32a3d5374c1.svn-ba
I.A...R 192 2016-10-26 13:30 pokemon\.svn\pristine\02\02dddb40bbca5c27be1fae2e9698f6d30efd526b.svn-ba
I.A...R 77214 2016-10-26 13:30 pokemon\.svn\pristine\03\03338912029f528a240ba599583515af88af0a2f.svn-ba
............此处省略2440个文件信息
评论
共有 条评论