Unity3D 註釋工具

本章讓我們學習註釋工具的用途

我們自己寫的代碼一定要給註釋 時間一長也許什麼都會忘記

註釋工具也可以寫在一些類型上


using UnityEngine;
using System.Collections;
public class NewBehaviourScript : MonoBehaviour {
    public Transform target;
    void Start () {
        transform.rotation = Quaternion.Inverse(target.rotation);
        Debug.Log(target.rotation);
        //Debug.Log("打印的值爲:   "+c+"-------"+d);
    }
    TestA aa;
    void Update() {
        aa = new TestA();
        aa.Big("aaa");       //
    }
}
//*************************注視寫在類名的上面***********************************
/// <summary>
/// 這個一個類名
/// </summary>
public class TestA {

    private static TestA instance;
    public static TestA GetInstance() {
        if (instance == null)
        {
            instance = new TestA();
        }
            return instance;
    }
//*************************注視一定要寫在函數的上面********************************
    /// <summary>
    /// 這是一個Big的函數
    /// </summary>
    /// <param name="str"></param>
    public void Big(string str) { 

    }
}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章