Ejemplo n.º 1
0
        public void Initialize()
        {
            _userInterfaceCanvasInstance = Instantiate(UserInterfaceCanvasPrefab);

            _windowsCanvasInstance = Instantiate(WindowsCanvasPrefab);

            _userInterfaceViewInstance = InstantiateElement(UserInterfaceViewPrefab, _userInterfaceCanvasInstance.transform);

            GameManager.Instance.GameFlowManager.CurrentGameStatusChanged += CurrentGameFlowManagerOnCurrentGameStatusChanged;
        }
Ejemplo n.º 2
0
        public MainWindow()
        {
            Instance = this;
            InitializeComponent();

            Border        = BLUE_BRUSH;
            StatusbarText = STATUS_IDLE;

            var view = new UserInterfaceView(new UserInterfaceViewModel());

            GridUserControlLayout.Children.Add(view);
        }
Ejemplo n.º 3
0
        public void Uninitialize()
        {
            if (_userInterfaceCanvasInstance != null)
            {
                Destroy(_userInterfaceCanvasInstance.gameObject);
                _userInterfaceCanvasInstance = null;
            }

            if (_userInterfaceViewInstance)
            {
                Destroy(_userInterfaceViewInstance.gameObject);
                _userInterfaceViewInstance = null;
            }

            GameManager.Instance.GameFlowManager.CurrentGameStatusChanged -= CurrentGameFlowManagerOnCurrentGameStatusChanged;

            if (_gameOverWindowViewInstance != null)
            {
                Destroy(_gameOverWindowViewInstance.gameObject);
                _gameOverWindowViewInstance.Uninitialize();
                _gameOverWindowViewInstance = null;
            }
        }