Inheritance: MonoBehaviour
Esempio n. 1
0
    private void Awake()
    {
        if (BgInstance != null && BgInstance != this)
        {
            Destroy(this.gameObject);
            return;
        }

        BgInstance = this;
        DontDestroyOnLoad(this);
    }
Esempio n. 2
0
 // Use this for initialization
 void Start()
 {
     bgScript  = FindObjectOfType <BgScript>();
     thisImage = GetComponent <Image>();
 }
Esempio n. 3
0
 void Start()
 {
     s_instance = this;
 }