上一页 1 ··· 3 4 5 6 7
摘要: 转载地址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 阅读全文
posted @ 2012-07-11 22:26 U_探索 阅读(2139) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2012-07-11 22:22 U_探索 阅读(1118) 评论(0) 推荐(0) 编辑
摘要: 实现效果 拖动readplane 当包围盒最小点超出bluePlane的最小点时(仅做了左边裁剪),对超出部分裁剪,当全部超出隐藏readPlane 当readPlane包围盒的最大坐标点大于bluePlane的最小点时,显示readPlane;阅读此文时,读者最好具备世界坐标 本地坐标 bounds 等之类的知识!collider.bounds、render.bounds的min max是世界坐标,size是大小 mesh.bounds是本地坐标。mesh.vertices对线框顶点坐标更改。 public Transform readPlane; public Transform b... 阅读全文
posted @ 2012-07-11 22:20 U_探索 阅读(2029) 评论(0) 推荐(0) 编辑
摘要: 实现原理:动态改变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... 阅读全文
posted @ 2012-07-11 22:15 U_探索 阅读(1226) 评论(0) 推荐(0) 编辑
摘要: 转载自雨松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; ... 阅读全文
posted @ 2012-07-11 22:08 U_探索 阅读(2357) 评论(0) 推荐(0) 编辑
摘要: 转载请注明出处: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秒钟在调用暂停可以确保数据 阅读全文
posted @ 2012-07-11 00:13 U_探索 阅读(3412) 评论(0) 推荐(0) 编辑
摘要: 很多unity开发者比较纠结IOS document操作,本文将以读取document下的图片为例,实现Document扫盲,此篇为下一篇续集,document下的图片是拍照完成后保存的。保存图片到document操作如下:-(void)SavePngToDocument:(UIImage*)img{ NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);//获取document路径 NSString *documentsDirecto... 阅读全文
posted @ 2012-07-10 23:46 U_探索 阅读(2894) 评论(0) 推荐(0) 编辑
摘要: unity调用Admob广告服务和IOS调用没有太大区别,几乎80%的工作都是OC完成,Unity仅需要以插件形式调用OC函数就成,所以此文需要一定的OC基础,有了OC的基础,仅需要注意一点,unity导出的xcode工程与普通Xcode不同之处在于,unity导出的iPhone_target2AppDelegate文件不起作用,他把所有的代码都放到AppController里。祝大家好运!Admob1.h文件#import <UIKit/UIKit.h>#import "GADBannerViewDelegate.h"@class GADBannerView, 阅读全文
posted @ 2012-07-10 23:21 U_探索 阅读(2613) 评论(2) 推荐(0) 编辑
摘要: 白色上面为什么画不上?此文是对某位大神文章的翻译,忘记从哪摘抄的了 原文使用js写的我把它改成C#。此文存在一个问题,当屏幕上有texture的话,貌似texture上画不上。期待高手一块解决。另外当快速拖动鼠标时,发现画的曲线不够平滑,正在尝试用贝塞尔解决,期待高手一块探讨。GLDraw快速画线,不光滑问题搞定。贝塞尔曲线: 1 using UnityEngine; 2 using System.Collections; 3 4 5 public class joint{ 6 public Vector3 org; 7 public Vector3 end; 8 ... 阅读全文
posted @ 2012-07-10 22:59 U_探索 阅读(1721) 评论(0) 推荐(0) 编辑
摘要: 1 编辑模式(Editor)下:string path = EditorUtility.OpenFilePanel("Load png Textures of Directory", "", "");WWW ww=new WWW("file:///"+path);print(ww.url);yield return ww;gui.texture=ww.texture;2.非编辑模式:OpenFileDialog ofd = new OpenFileDialog(); //new一个方法ofd.InitialDire 阅读全文
posted @ 2012-07-10 13:02 U_探索 阅读(19697) 评论(6) 推荐(4) 编辑
摘要: itween插件官网:http://itween.pixelplacement.com/gettingstarted.php更新说明:oncompletetarget 表明回调函数所在的GameObject。如果把oncompletetarget写成当前gameObject,回调函数需要写在当前ga... 阅读全文
posted @ 2012-07-10 12:50 U_探索 阅读(5830) 评论(0) 推荐(0) 编辑
摘要: 1、网络检测函数(注意:需要在真机上实验,我原来在Imac上 断了网络检测不到)Application.internetReachabilitystatic var internetReachability : NetworkReachabilityReturns the type of Inter... 阅读全文
posted @ 2012-07-10 12:46 U_探索 阅读(4018) 评论(1) 推荐(1) 编辑
上一页 1 ··· 3 4 5 6 7