Skip to content

Instantly share code, notes, and snippets.

@kazumalab
Last active November 21, 2016 06:15
Show Gist options
  • Save kazumalab/6b0c789fed20501e6b9027adda78f267 to your computer and use it in GitHub Desktop.
Save kazumalab/6b0c789fed20501e6b9027adda78f267 to your computer and use it in GitHub Desktop.
public class Sample01 {
// private type.
private int n1 = 10;
private float n2 = 10.0f;
private string s1 = "文字を書けるよ!";
// public type.
public int n3 = 10;
public float n4 = 10.0f;
public string s2 = "文字を書けるよ!";
}
public class Sample01 {
private int n1 = 10;
private int n2 = 10;
private int sub = 0;
// UnityではデフォルトでStart関数とUpdate関数がある
private void Start () {
sub = n1 + n2;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment