摘要: RT,具体的模板可用:public class MyClass : MonoBehaviour { private static MyClass s_Instance = null; public static MyClass instance { get { if (s_Instance == null) { s_Instance = FindObjectOfType(typeof(MyClass)) as MyClass; if (s_Ins... 阅读全文
posted @ 2012-03-09 09:03 GM 320号 阅读(270) 评论(0) 推荐(0)
摘要: Unity3D的脚本属性用法:// JavaScript@script AddComponentMenu ("Transform/Follow Transform")// CSharp[AddComponentMenu("Transform/Follow Transform")]以下是具体说明(部分无关紧要的不翻译):AddComponentMenu(函数)允许你从其他的"Components"菜单途径添加脚本(如果不使用AddComponentMenu那么你只能从Components->Scripts下添加)。注意需resta 阅读全文
posted @ 2012-03-08 17:01 GM 320号 阅读(1348) 评论(0) 推荐(0)
摘要: 考虑未来可能面临的游戏数值模型问题,轻轻接触 mathematica 7.0 数学软件。以下记录可能会用得到最简单的 mathematica 功能(shift + enter执行):简单求值(2^10 - 32) / 9自定义函数f[x_] := (Sin[x] + 3) * x^2 + 5x绘制曲线Plot[f[x], {x, -3, 3}]Plot[x^2 + sin(y), {x, -1, 1}, {y, -Pi, Pi}]绘制点集dataF = Table[f[x], {x, 1, 5, 0.5}]ListPlot[dataF]ListPlot[dataF, PlotJoined-&g 阅读全文
posted @ 2012-03-06 19:35 GM 320号 阅读(333) 评论(0) 推荐(0)