Unity - A计划(一年有效期) 扫二维码继续学习 二维码时效为半小时

(61评价)
价格: 2155.00元

依赖倒转原则

      高层模块不依赖底层模块,都依赖于接口

      抽象不依赖于细节,细节依赖于抽象

 

      针对接口编程,不针对实现编程

      

[展开全文]
zhoulk · 2018-02-07 · 0

设计原则

单一职责

开闭原则

     对扩展开放

     对修改关闭

 

 

[展开全文]
zhoulk · 2018-02-07 · 0

只需要把assets目录下的内容拷贝到unity就行了

[展开全文]
ivan29 · 2018-02-06 · 0

页面的关闭遇到大型的建议直接Destroy,以提高性能,需将UI框架稍作修改,地方比较零散就不贴码了。

[展开全文]
浪迹天涯义 · 2018-01-12 · 0

 

//创建物体的3种方式
    public GameObject prefab;
	
	void Start () {        
        GameObject go = new GameObject("cube");
        GameObject.Instantiate(prefab);
        GameObject.CreatePrimitive(PrimitiveType.Capsule);
	}
//测试方法的性能用的
public int count = 10000000;
    void Start()
    {
        float time1 = Time.realtimeSinceStartup;
        for (int i = 0; i < count; i++)
        {
            Method1();
        }
        float time2 = Time.realtimeSinceStartup;
        Debug.Log(time2-time1);

        float time3 = Time.realtimeSinceStartup;
        for (int i = 0; i < count; i++)
        {
            Method2();
        }
        float time4 = Time.realtimeSinceStartup;
        Debug.Log(time4-time3);               
    }

 

 

[展开全文]
长颈鹿 · 2018-01-12 · 1