public void Update() { if (Program.MouseListener.IsAWindowShownNow() || CamControl.IsMainMenuOn() || _lastCompleted < 0) { return; } if (Program.gameScene.IsPassingTheTutoNow()) { return; } //to show others and loaded if (Time.time > _lastCompleted + _timeToNextQuest) { if (Dialog.IsActive() || BuildingPot.Control.CurrentSpawnBuild != null) { //so goes trhu again in 30s _lastCompleted = Time.time - 60; return; } if (_currentQuests.Count == 0) { AddANewQuest(); } else { ShowQuestBtn(); } } }
private MyForm main;//the main GUI public void LoadMainGUI() { if (main == null) { main = (MyForm)Create(Root.mainGUI, new Vector2()); } //can only be one on scene to work _buildingsMenu = FindObjectOfType <BuildingsMenu>(); _descriptionWindow = FindObjectOfType <BuildingDescriptionMenu>(); _personWindow = FindObjectOfType <PersonWindow>(); _buildingWindow = FindObjectOfType <BuildingWindow>(); _addOrderWindow = FindObjectOfType <AddOrderWindow>(); _notificationWindow = FindObjectOfType <NotificationWindowGO>(); BulletinWindow = FindObjectOfType <BulletinWindow>(); QuestWindow = FindObjectOfType <QuestWindow>(); _helpWindow = FindObjectOfType <HelpWindow>(); TutoWindow1 = FindObjectOfType <TutoWindow>(); //Debug.Log("LoadMainGUI() GUI"); if (CamControl.IsMainMenuOn()) { HideMainGUI(); } }
public void EscapeKey() { //means is playing //&& Program.GameFullyLoaded() is to not allow touch ESC while is loadig if (!CamControl.IsMainMenuOn() && Program.GameFullyLoaded()) { if (Program.MouseListener.IsAWindowShownNow()) { Program.MouseListener.HidePersonBuildOrderNotiBulletinHelpWin(); return; } CamControl.ChangeTo("Main"); Program.gameScene.PauseGameSpeed(); Program.MouseListener.HideMainGUI(); Program.MyScreen1.LoadMainMenuWithResumeBtn(); CamControl.CAMRTS.StopReportingAudioNow(); } //is on main Menu else if (CamControl.IsMainMenuOn() && Program.GameFullyLoaded()) { CamControl.ChangeTo("Game"); Program.gameScene.ResumeGameSpeed(); Program.MyScreen1.DestroyCurrentMenu(); Program.MouseListener.ShowMainGUI(); CamControl.CAMRTS.ReportAudioNow(); } }
// Update is called once per frame //void LateUpdate() private void Update() { if (Program.MouseListener.IsAWindowScrollableShownNow() || CamControl.IsMainMenuOn() || ScrollViewShowInventory.IsMouseOnMe || Program.IsMouseOnScrollableContent) { return; } //initiales current obj pos and rot to... InitializeObjects(); CreateTargetAndUpdate(); if (!Program.IsInputLocked && U2D.IsMouseOnScreen() && !MiniMapRTS.isOnTheLimits && BuildingPot.Control != null && BuildingPot.Control.Registro.AllBuilding.Count > 0) { ControlInput(); MouseInBorderDealer(); } AlignYInZero(); RotateScript(); rotateRTS.Update(); //CameraFOV(); }
protected void OnMouseEnter() { //so dont show on top of other while placing a building if (BuildingPot.InputMode == Mode.Placing) { return; } if (Program.MouseListener.IsAWindowShownNow() || CamControl.IsMainMenuOn()) { return; } PublicSpawnHelp(); }
// Update is called once per frame private void LateUpdate() { CenterCam(); FollowPersonCam(); if (_isFollowingPersonNow) { CamFollowAction(personToFollow); } if (Program.MouseListener.IsAWindowShownNow() || CamControl.IsMainMenuOn()) { return; } if (!_isFollowingPersonNow && BuildingPot.InputMode == Mode.None) { CheckIfKeyWasPressed(); } }