示例#1
0
 private void Awake()
 {
     bGScript         = FindObjectOfType <BGScript>();
     _taskDiscription = GetComponent <TaskDiscription>();
     _holder          = FindObjectOfType <Holder>();
     _ecnomySystem    = FindObjectOfType <EcnomySystem>();
 }
示例#2
0
    private void Awake()
    {
        if (BgInstance != null && BgInstance != this)
        {
            Destroy(this.gameObject);
            return;
        }

        BgInstance = this;
        DontDestroyOnLoad(this);
    }