<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[anmofeng的专栏]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/anmofeng</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; anmofeng]]></copyright><item><title><![CDATA[Unity3D之协程(Coroutines & Yield )]]></title><link>https://blog.csdn.net/anmofeng/article/details/46550855</link><guid>https://blog.csdn.net/anmofeng/article/details/46550855</guid><author>anmofeng</author><pubDate>Thu, 18 Jun 2015 18:00:56 +0800</pubDate><description><![CDATA[写游戏代码,往往最终需要代码为连续的事件.结果会像这样:
[它可以实现将一段程序延迟执行或者将其各个部分分布在一个时间段内连续执行。]





[csharp] view
 plaincopyprint?






"font-size:18px;">private int state = 0;  
void Update()  
{  
        i]]></description><category></category></item><item><title><![CDATA[C#泛型在unity3D中的运用]]></title><link>https://blog.csdn.net/anmofeng/article/details/46416027</link><guid>https://blog.csdn.net/anmofeng/article/details/46416027</guid><author>anmofeng</author><pubDate>Mon, 08 Jun 2015 18:06:21 +0800</pubDate><description><![CDATA[泛型是什么？

这是摘自百度百科中对泛型的介绍：




?






泛型是c#2.0的一个新增加的特性，它为使用c#语言编写面向对象程序增加了极大的效力和灵活性。不会强行对值类型进行装箱和拆箱，或对引用类型进行向下强制类型转换，所以性能得到提高。通过知道使用泛型定义的变量的类型限制，编译器可以在一个高得多的程度上验证类型假设，所以泛型提高了程序的类型安全。它允许程]]></description><category></category></item><item><title><![CDATA[资源加载方式有三种]]></title><link>https://blog.csdn.net/anmofeng/article/details/46120345</link><guid>https://blog.csdn.net/anmofeng/article/details/46120345</guid><author>anmofeng</author><pubDate>Thu, 28 May 2015 11:50:05 +0800</pubDate><description><![CDATA[资源加载方式有三种

1. 静态引用

     建一个public的变量，在Inspector里把prefab拉上去，用的时候instantiate


2. 如何卸载Resources.Load()方式加载的资源，(Load以后instantiate)

Object obj = Resources.Load("MyPrefab");
GameObject instance]]></description><category></category></item><item><title><![CDATA[Unity3D占用内存太大的解决方法]]></title><link>https://blog.csdn.net/anmofeng/article/details/46120331</link><guid>https://blog.csdn.net/anmofeng/article/details/46120331</guid><author>anmofeng</author><pubDate>Thu, 28 May 2015 11:48:20 +0800</pubDate><description><![CDATA[Unity3D占用内存太大的解决方法




最近网友通过网站搜索Unity3D在手机及其他平台下占用内存太大. 这里写下关于Unity3D对于内存的管理与优化.
Unity3D 里有两种动态加载机制：一个是Resources.Load，另外一个通过AssetBundle,其实两者区别不大。 Resources.Load就是从一个缺省打进程序包里的AssetBundle里加载资源，而一]]></description><category></category></item><item><title><![CDATA[开发过程中遇到的两个问题：Input.ResetInputAxes()  和 各个平台XML文件加载]]></title><link>https://blog.csdn.net/anmofeng/article/details/44095653</link><guid>https://blog.csdn.net/anmofeng/article/details/44095653</guid><author>anmofeng</author><pubDate>Fri, 06 Mar 2015 09:44:23 +0800</pubDate><description><![CDATA[demo收尾阶段遇到两个非常抓狂的问题，
第一个问题：
角色死亡弹出弹框，弹框上的按钮有鼠标经过状态，但是没有点击状态，怎么点都没有反应啊抓狂了都，
解决过程及方法：
找问题过程中发现，登陆场景中登陆弹框里的按钮是可以点击，一切正常，然后我把死亡弹框放到登陆场景也是正常，看来弹框没为题，NGUI层次也没为题（我在论坛里询问此问题时都说UIPanel层次有问题），这个死亡弹框一进游戏是不存在]]></description><category></category></item><item><title><![CDATA[主角面朝方向一定区域内对象角度计算]]></title><link>https://blog.csdn.net/anmofeng/article/details/43674533</link><guid>https://blog.csdn.net/anmofeng/article/details/43674533</guid><author>anmofeng</author><pubDate>Mon, 09 Feb 2015 19:47:57 +0800</pubDate><description><![CDATA[http://www.xuanyusong.com/archives/1977


Unity3D研究院之主角面朝方向一定区域内对象角度计算（四十五）


写在前面的话，前两天有个朋友在QQ上问我 如何获取主角面朝方向一定区域中的敌人对象。这个命题看似简单，其实里面蕴含了很多数学方面的东西。今天刚好有时间我就彻底的把这个疑问写在博客中。希望可以帮助到他。

在上代码之前请大家跟我先]]></description><category></category></item><item><title><![CDATA[unity3d更改鼠标样式]]></title><link>https://blog.csdn.net/anmofeng/article/details/43567103</link><guid>https://blog.csdn.net/anmofeng/article/details/43567103</guid><author>anmofeng</author><pubDate>Fri, 06 Feb 2015 17:45:17 +0800</pubDate><description><![CDATA[项目中鼠标指针样式换成自己定义的鼠标样式
1.指针图片的Texture Type需要设置为Cursor，也就是在Project视图里选中鼠标样式图片，在Inspector -> Texture Type里选择Cursor


2.若要更改整个项目的默认鼠标样式可以在Edit->Project Setting->Player->Default Cursor中设置


3.
    /]]></description><category></category></item><item><title><![CDATA[物体的移动方式(转载)]]></title><link>https://blog.csdn.net/anmofeng/article/details/43112685</link><guid>https://blog.csdn.net/anmofeng/article/details/43112685</guid><author>anmofeng</author><pubDate>Sun, 25 Jan 2015 10:51:19 +0800</pubDate><description><![CDATA[在unity3d中,有多种方式可以改变物体的坐标,实现移动的目的.
 总结来说,分为以下几种,这里对于这几种方式分别做阐述.

        通过Transform组件移动物体
        Transform组件用于描述物体在空间中的状态,它包括 位置(position), 旋转(rotation), 缩放(scale). 其实所有的移动都会导致position的改变.这里所说的通过]]></description><category></category></item><item><title><![CDATA[iTween动画库：关于Move移动篇]]></title><link>https://blog.csdn.net/anmofeng/article/details/40511561</link><guid>https://blog.csdn.net/anmofeng/article/details/40511561</guid><author>anmofeng</author><pubDate>Mon, 27 Oct 2014 18:06:01 +0800</pubDate><description><![CDATA[iTween这个类库的主要功能就是处理模型从起始点到结束点之间运动的轨迹。（移动，旋转，音频，路径，摄像机等）它是一个开源的项目并且完全免费，它们的官网在这里 http://itween.pixelplacement.com/index.php 打开网之后点击右上角Get
 iTween图标即可，或者在AssetStores商店中直接下载。


移动模型时候用到的几个核心方法如下：

]]></description><category></category></item><item><title><![CDATA[C#集合类（Array、Arraylist、List、Hashtable、Dictionary、Stack、Queue）]]></title><link>https://blog.csdn.net/anmofeng/article/details/40506035</link><guid>https://blog.csdn.net/anmofeng/article/details/40506035</guid><author>anmofeng</author><pubDate>Mon, 27 Oct 2014 12:57:25 +0800</pubDate><description><![CDATA[我们用的比较多的非泛型集合类主要有 ArrayList类 和 HashTable类。我们经常用HashTable 来存储将要写入到数据库或者返回的信息，在这之间要不断的进行类型的转化，增加了系统装箱和拆箱的负担，14:31:45，例如我们需要在电子商务网站中存储用户的购物车信息(商品名，对应的商品个数)时，完全可以用 Dictionary<string,
 int> 来存储购物车信息，而不需要任]]></description><category></category></item><item><title><![CDATA[Unity3D实用工具汇总]]></title><link>https://blog.csdn.net/anmofeng/article/details/40477293</link><guid>https://blog.csdn.net/anmofeng/article/details/40477293</guid><author>anmofeng</author><pubDate>Sun, 26 Oct 2014 15:46:12 +0800</pubDate><description><![CDATA[Unity3D实用工具汇总  
1. Free Shader editor 免费shaser编辑器 http://forum.unity3d.com/threads/56180-Strumpy-Shader-Editor-Beta-3.0-released-%28vertex-lighting-support%29  
2. Commercial Shader Editor 商业shader编]]></description><category></category></item><item><title><![CDATA[优化之drawcall]]></title><link>https://blog.csdn.net/anmofeng/article/details/40477203</link><guid>https://blog.csdn.net/anmofeng/article/details/40477203</guid><author>anmofeng</author><pubDate>Sun, 26 Oct 2014 15:37:34 +0800</pubDate><description><![CDATA[在屏幕上渲染物体，引擎需要发出一个绘制调用来访问图形API（iOS系统中为OpenGL ES）。每个绘制调用需要进行大量的工作来访问图形API，从而导致了CPU方面显著的性能开销。

 

Unity在运行时可以将一些物体进行合并，从而用一个绘制调用来渲染他们。这一操作，我们称之为“批处理”。一般来说，Unity批处理的物体越多，你就会得到越好的渲染性能。

 

Unity中内建]]></description><category></category></item><item><title><![CDATA[Unity3D NGUI事件 UIEvents]]></title><link>https://blog.csdn.net/anmofeng/article/details/40430081</link><guid>https://blog.csdn.net/anmofeng/article/details/40430081</guid><author>anmofeng</author><pubDate>Fri, 24 Oct 2014 16:57:39 +0800</pubDate><description><![CDATA[原创文章如需转载请注明：转载自 脱莫柔Unity3D学习之旅 QQ群：【119706192】 本文链接地址: Unity3D
 NGUI事件 UIEvents

UIEvents-事件系统
void OnHover (bool isOver):当鼠标移出或者悬停在某个碰撞器上的时候返回布尔值.在触摸设备上不会有作用.
void OnPress (bool isDown):当鼠标或者触摸到]]></description><category></category></item><item><title><![CDATA[在Unity3D中使用ScriptableObject进行序列化]]></title><link>https://blog.csdn.net/anmofeng/article/details/40425389</link><guid>https://blog.csdn.net/anmofeng/article/details/40425389</guid><author>anmofeng</author><pubDate>Fri, 24 Oct 2014 11:51:40 +0800</pubDate><description><![CDATA[ScriptableObject类型经常用于存储一些unity3d本身不可以打包的一些object，比如字符串，一些类对象等。用这个类型的子类型，则可以用BuildPipeline打包成assetbundle包供后续使用，非常方便。这样除了playerpref和c#文件读取外，另外的一种存取一些数据对象的方法



[csharp] view
 plaincopyprint?


]]></description><category></category></item><item><title><![CDATA[NGUI在3D场景中点击穿透解决办法]]></title><link>https://blog.csdn.net/anmofeng/article/details/40408709</link><guid>https://blog.csdn.net/anmofeng/article/details/40408709</guid><author>anmofeng</author><pubDate>Thu, 23 Oct 2014 23:22:01 +0800</pubDate><description><![CDATA[参考资料：
1：http://www.unitymanual.com/thread-22018-1-1.html
2]]></description><category></category></item><item><title><![CDATA[Unity可视化路径的插件iTween的使用]]></title><link>https://blog.csdn.net/anmofeng/article/details/40393927</link><guid>https://blog.csdn.net/anmofeng/article/details/40393927</guid><author>anmofeng</author><pubDate>Thu, 23 Oct 2014 11:18:55 +0800</pubDate><description><![CDATA[http://www.unitymanual.com/forum.php?mod=viewthread&tid=7941&highlight=iTween]]></description><category></category></item><item><title><![CDATA[Unity3D教程：iTween插件的介绍和用法]]></title><link>https://blog.csdn.net/anmofeng/article/details/40393907</link><guid>https://blog.csdn.net/anmofeng/article/details/40393907</guid><author>anmofeng</author><pubDate>Thu, 23 Oct 2014 11:17:21 +0800</pubDate><description><![CDATA[一．iTween 介绍

iTween是一个动画库,目的是最小的投入实现最大的产出.让你做开发更轻松,用它可以轻松实现各种动画,晃动,旋转,移动,褪色,上色,控制音频等等。

二．iTween 原理

iTween的核心是数值插值，简单说就是给iTween两个数值(开始值，结束值)，它会自动生成一些中间值，例如：, 开始值-> 中间值 -> 中间值 …. -> 结束值。

这里的数]]></description><category></category></item><item><title><![CDATA[[NGUI插件] NGUI控件说明(中文) UICamera]]></title><link>https://blog.csdn.net/anmofeng/article/details/40392179</link><guid>https://blog.csdn.net/anmofeng/article/details/40392179</guid><author>anmofeng</author><pubDate>Thu, 23 Oct 2014 10:02:23 +0800</pubDate><description><![CDATA[注意：本文翻译时NGUI版本已经更新到3.0.7

原文地址：http://www.tasharen.com/forum/index.php?topic=6711


总览

UICamera是一个命名不太好的组件。实际上，它的名字某种原因只是为了保持向后兼容。

UICamera脚本实际做的事是发送NGUI事件给所有被它所附加的摄像机所看见的对象。除此之外，它不对UI做任何事情]]></description><category></category></item><item><title><![CDATA[NGUI所见即所得之UICamera]]></title><link>https://blog.csdn.net/anmofeng/article/details/40392055</link><guid>https://blog.csdn.net/anmofeng/article/details/40392055</guid><author>anmofeng</author><pubDate>Thu, 23 Oct 2014 09:59:43 +0800</pubDate><description><![CDATA[NGUI所见即所得之UICamera]]></description><category></category></item><item><title><![CDATA[NGUI 鼠标事件点击时屏蔽其它鼠标事件]]></title><link>https://blog.csdn.net/anmofeng/article/details/40392003</link><guid>https://blog.csdn.net/anmofeng/article/details/40392003</guid><author>anmofeng</author><pubDate>Thu, 23 Oct 2014 09:57:15 +0800</pubDate><description><![CDATA[在处理鼠标事件时加上以下判断




注：NGUI 组件上加上 BoxCollider 并设置区域大小







if(UICamera.hoveredObject!=null)
{
      print("点到NGUI");
}





或




Ray ray=UICamera.mainCamera.ScreenPointToRa]]></description><category></category></item></channel></rss>