private void Start() { IRTEState rteState = IOC.Resolve <IRTEState>(); if (rteState == null || !rteState.IsCreated) { m_isGameRunning = true; } EventSystem eventSystem = FindObjectOfType <EventSystem>(); if (eventSystem == null && GameUI != null) { GameUI.AddComponent <EventSystem>(); GameUI.AddComponent <StandaloneInputModule>(); } if (BtnReplay != null) { BtnReplay.onClick.AddListener(RestartGame); } if (GameUI != null) { GameUI.SetActive(false); } if (IsGameRunning) { StartCoroutine(StartGame()); } }
protected virtual void Awake() { m_rteState = IOC.Resolve <IRTEState>(); if (m_rteState != null) { if (m_rteState.IsCreated) { OnEditorExist(); } else { m_rteState.Created += OnEditorCreated; } } else { OnEditorExist(); } }