Skip to content

Instantly share code, notes, and snippets.

@kazuooooo
Created May 28, 2015 01:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kazuooooo/cb6c018683a32f497ae0 to your computer and use it in GitHub Desktop.
Save kazuooooo/cb6c018683a32f497ae0 to your computer and use it in GitHub Desktop.
using UnityEngine;
using System.Collections;
public class Player : MonoBehaviour
{
//メンバ変数(privateにしてカプセル化)
private int experience = 3;
//プロパティ
public int Experience {
//get
get {
return experience;
}
//set(valueという値を用いる)
set {
experience = value;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment