Created
May 28, 2015 01:28
-
-
Save kazuooooo/cb6c018683a32f497ae0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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