摘要:
转载地址using UnityEngine;using UnityEngine.SocialPlatforms;public class Startup : MonoBehaviour{// we'll create some buttons in OnGui, allowing us to bump achievement and// score values for testingprivate double ach1 = 0;private double ach2 = 0;private double ach3 = 0;private double ach4 = 0;privat 阅读全文
摘要:
json文件:{"startMenu":[ { "1": { "SenceInfo":{"Pos":"1,0,0","Rotation":"0,0,0","Scale":"1,1,1"}, "Camera":{"Pos":"0,0,0","Rotation":"0,0,0","Scale":&quo 阅读全文
摘要:
实现效果 拖动readplane 当包围盒最小点超出bluePlane的最小点时(仅做了左边裁剪),对超出部分裁剪,当全部超出隐藏readPlane 当readPlane包围盒的最大坐标点大于bluePlane的最小点时,显示readPlane;阅读此文时,读者最好具备世界坐标 本地坐标 bounds 等之类的知识!collider.bounds、render.bounds的min max是世界坐标,size是大小 mesh.bounds是本地坐标。mesh.vertices对线框顶点坐标更改。 public Transform readPlane; public Transform b... 阅读全文
摘要:
实现原理:动态改变GUItexture的宽度。 EnemyInfo enemyInfo; public GUITexture enemyBoxGUI; private Texture enemyBox; private Texture enemyHp; private int currentHp; private float hpLength; // Use this for initialization void Start () { enemyInfo=gameObject.transform.parent.GetComponen... 阅读全文
摘要:
转载自雨松MOMO的博客原文地址:http://blog.csdn.net/xys289187120/article/details/6961080控制类:View Code using UnityEngine; using System.Collections; public class Controller : MonoBehaviour{ public MPJoystick moveJoystick; void Update() { float touchKey_x=moveJoystick.position.x; ... 阅读全文
摘要:
转载请注明出处:http://www.cnblogs.com/U-tansuo/archive/2012/07/11/U_tansuo.html纠正一点错误(注意看一下红字部分) UnitySendMessage回调unity中的函数,但是这个回调需要一定的时间响应,假如在UnitySendMessage后面立即 UnityPause(true);就会导致unity程序立即暂停,引发回调的函数未被执行。所以采用 [self performSelector:@selector(waitSaveData) withObject:nil afterDelay:1]; 延迟1秒钟在调用暂停可以确保数据 阅读全文