コード例 #1
0
 private void OnDestroy()
 {
     if (Instance == this)
     {
         Instance = null;
     }
 }
コード例 #2
0
 private void Awake()
 {
     lr    = GetComponent <LineRenderer>();
     score = 0;
     if (!clickToFire)
     {
         Time.timeScale = 0.05f;
     }
     //creating instance of self
     if (Instance == null)
     {
         Instance = this;
     }
 }