예제 #1
0
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else
     {
         throw new Exception("There can only be one TurtleHealth in a scene!");
     }
 }
예제 #2
0
 private void OnDestroy()
 {
     Instance = null;
 }
예제 #3
0
 private void Start()
 {
     turtleHealth = TurtleHealth.Instance;
 }