void Awake() { if (Singleton == null) { Singleton = this; DontDestroyOnLoad(gameObject); } else { Destroy(gameObject); } }
private void Awake() { if (instance == null) { instance = this; } else { Debug.LogWarning("More than one Viewchanger"); } CodeControl.Message.AddListener <RandomLevelRequest>(OnRandomLevelRequested); }
public MainWindow() { InitializeComponent(); DataContext = new ViewChanger(); }
private void Start() { Instance = this; currentCamera = mainCamera; }
private void Start() { Instance = this; SocketLinkerObj = GameObject.Find("SocketManager").GetComponent <SocketLinkerObj>(); }
// Use this for initialization void Start() { sentences = new Queue <string>(); viewChanger = FindObjectOfType <ViewChanger>(); }
/// <summary> /// MainViewModel Constructor /// </summary> public MainViewModel() { ViewChanger = new ViewChanger(this); DockButtons = new DockButtons(this); }