摘要: 【转载】关于iPhone文件系统NSFileManager讲解iPhone文件系统NSFileManager讲解是本文要介绍的内容,主要是通过iphone文件系统来学习NSFileManager的使用方法,具体内容来看本文详解。iPhone文件系统:创建、重命名以及删除文件,NSFileManager中包含了用来查询单词库目录、创建、重命名、删除目录以及获取/设置文件属性的方法(可读性,可编写性等等)。每个程序都会有它自己的沙盒,通过它你可以阅读/编写文件。写入沙盒的文件在程序的进程中将会保持稳定,即便实在程序更新的情况下。如下所示,你可以在沙盒中定位文件目录://对于错误信息 NSError 阅读全文
posted @ 2012-07-11 22:50 U_探索 阅读(260) 评论(0) 推荐(0) 编辑
摘要: 转载自:http://blog.csdn.net/jame_peng/article/details/4387906大家在实际工作学习C#的时候,可能会问:为什么我们要为一些已经存在的功能(比如Windows中的一些功能,C++中已经编写好的一些方法)要重新编写代码,C#有没有方法可以直接都用这些原本已经存在的功能呢?答案是肯定的,大家可以通过C#中的DllImport直接调用这些功能。DllImport所在的名字空间 using System.Runtime.InteropServices;MSDN中对DllImportAttribute的解释是这样的:可将该属性应用于方法。DllImpor 阅读全文
posted @ 2012-07-11 22:48 U_探索 阅读(315) 评论(0) 推荐(0) 编辑
摘要: pinus egg linux 安装openssl http://unitygems.com Android内核 牛人设计模式 纹理坐标旋转 openGL经典教程 水面效果 微软软件下载基地 重要博客 Android平台Native开发与JNI机制详解 DX11 Unity3d博客(1) unity 阅读全文
posted @ 2012-07-11 22:46 U_探索 阅读(388) 评论(0) 推荐(0) 编辑
摘要: 实现思路:鼠标点击,产生目标点,计算角色和目标点的夹角,旋转角色朝向目标点,然后移动角色。看到很多人浏览了这篇博文 ,有人建议写点注释,我就简单注释一下。 1 void Update () 2 { 3 if(Input.GetMouseButtonDown(0)) 4 { 5 RayControl(); 6 } 7 if(flagMove) 8 { 9 if(Vector3.Distance(transform.position,mousePos)>1)10 ... 阅读全文
posted @ 2012-07-11 22:43 U_探索 阅读(4271) 评论(0) 推荐(0) 编辑
摘要: 本文大部分转载,作者做了关于配置文件生成工作,但是很遗憾,关于position和rotation信息目前尚未自动生成,运行本例的朋友,需要自己手动添加位置和角度信息,否则程序会报错。标准的json数据:{"AssetList" : [{"Name" : "Chair 1","Source" : "Prefabs/Chair001.unity3d","Position" : [2,0,-5],"Rotation" : [0.0,60.0,0.0]},{&qu 阅读全文
posted @ 2012-07-11 22:36 U_探索 阅读(6267) 评论(0) 推荐(0) 编辑
摘要: 1。从顶视图上截取一张场景图,命名为map。2。找一个圆圈图标,作为playerTexture.3.创建panle作为地面。实际代码如下: public Texture map ; public Texture playerTexture ;float cubePosX=0 ;float cubePosY=0 ;public GameObject player ;public GameObject plane;float planeWidth;void Start(){ planeWidth=plane.GetComponent<MeshFilter>().mesh.boun... 阅读全文
posted @ 2012-07-11 22:30 U_探索 阅读(3971) 评论(0) 推荐(1) 编辑
摘要: public GameObject line; public Transform[] wayPoint; int i; void Start() { i=0; } void Update() { if(i<wayPoint.Length-1) { Vector3 tempPos=(wayPoint[i].position+wayPoint[i+1].position)/2;//计算两个点的中点坐标, GameObject go=(GameObject)Inst... 阅读全文
posted @ 2012-07-11 22:28 U_探索 阅读(5794) 评论(0) 推荐(1) 编辑
摘要: 转载地址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) 编辑