public class ClassName {
// 變數
// 建構子
// 方法
}
ClassName instance = new ClassName();
public ClassName(string name) {
this.name = name;
}
public struct StructName {
public string name;
public int value;
public StructName(string name, int value) {
this.name = name;
this.value = value;
}
}
StructName instance = new StructName("Name", 100);
public class ChildClass : ParentClass { }
public virtual void Method() { }
public override void Method() { }
Transform transform = gameObject.GetComponent<Transform>();
第六章
筆記:Unity 遊戲開發基礎