Example #1
0
 void Awake()
 {
     if (Singleton == null)
     {
         Singleton = this;
         DontDestroyOnLoad(gameObject);
     }
     else
     {
         Destroy(gameObject);
     }
 }
Example #2
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Debug.LogWarning("More than one Viewchanger");
     }
     CodeControl.Message.AddListener <RandomLevelRequest>(OnRandomLevelRequested);
 }
Example #3
0
 public MainWindow()
 {
     InitializeComponent();
     DataContext = new ViewChanger();
 }
Example #4
0
 private void Start()
 {
     Instance      = this;
     currentCamera = mainCamera;
 }
 private void Start()
 {
     Instance        = this;
     SocketLinkerObj = GameObject.Find("SocketManager").GetComponent <SocketLinkerObj>();
 }
Example #6
0
 // 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);
 }