本章让我们学习注释工具的用途
我们自己写的代码一定要给注释 时间一长也许什么都会忘记
注释工具也可以写在一些类型上
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) {
}
}