/// <summary>Implements the constructor for the Add-in object. Place your initialization code within this method.</summary> //public Connect() //{ //} /// <summary>Implements the OnConnection method of the IDTExtensibility2 interface. Receives notification that the Add-in is being loaded.</summary> /// <param term='application'>Root object of the host application.</param> /// <param term='connectMode'>Describes how the Add-in is being loaded.</param> /// <param term='addInInst'>Object representing this Add-in.</param> /// <seealso class='IDTExtensibility2' /> public void OnConnection(object application, ext_ConnectMode connectMode, object addInInst, ref Array custom) { applicationObject = (DTE2) application; addInInstance = (AddIn) addInInst; // Only execute the startup code if the connection mode is a startup mode //if( connectMode == ext_ConnectMode.ext_cm_UISetup ) { if (connectMode == ext_ConnectMode.ext_cm_AfterStartup) { //Initializing Context Context.ApplicationObject = applicationObject; Context.AddInInstance = addInInstance; //Initializing EventSinks SolutionEventSink solutionEventSink = new SolutionEventSink(); addinEventSink = new AddinEventSink(); //Initializing Controller controller = new UIController(); controller.Sinks.Add(solutionEventSink); controller.Sinks.Add(addinEventSink); controller.Init(solutionEventSink, addinEventSink); addinEventSink.OnStartup(applicationObject); if (Context.ApplicationObject.Solution.IsOpen){ solutionEventSink.OnOpenSolution(); } } }
// Use this for initialization void Start() { _instance = this; isShowPanel = false; npcManager =NPCManager._instance; NPCDictionary = npcManager.GetNPCDctionary(); playerState = PlayerState._instance; mainControllerUI = UIController._instance; foreach (KeyValuePair<int, GameObject> item in NPCDictionary) { item.Value.GetComponent<NPCInfomation>().CommunicationStart += CommunicationTalk; } #region UI containItems = transform.Find("TalkContainer").Find("Scroll View").Find("Items").gameObject; talkLabel = containItems.transform.Find("TalkLabel").GetComponent<UILabel>(); shopButton = containItems.transform.Find("ShopButton").GetComponent<UIButton>(); questButton = containItems.transform.Find("QuestButton").GetComponent<UIButton>(); bagManagerUI = GameObject.FindGameObjectWithTag(Tags.UIRoot).transform.Find("EquepMenu").GetComponent<UIBagManager>(); npcQuestManagerUI = GameObject.FindGameObjectWithTag(Tags.UIRoot).transform.Find("NPCQuestPanel").GetComponent<UINPCQuestManager>(); #endregion gameObject.SetActive(false); }
void Awake() { defaultShader = Shader.Find("Diffuse"); highlight = Shader.Find("Self-Illumin/Bumped Diffuse"); uiController = GameObject.FindWithTag("UI Controller").GetComponent<UIController>(); }
public void ShowingCloneDialogWithoutBeingLoggedInShowsLoginDialog() { var provider = Substitutes.GetFullyMockedServiceProvider(); var hosts = provider.GetRepositoryHosts(); var factory = SetupFactory(provider); var loginView = factory.GetView(GitHub.Exports.UIViewType.Login); loginView.Value.Cancel.Returns(Observable.Empty<object>()); var cm = provider.GetConnectionManager(); var cons = new System.Collections.ObjectModel.ObservableCollection<IConnection>(); cm.Connections.Returns(cons); using (var uiController = new UIController((IUIProvider)provider, hosts, factory, cm, LazySubstitute.For<ITwoFactorChallengeHandler>())) { var list = new List<IView>(); uiController.SelectFlow(UIControllerFlow.Clone) .Subscribe(uc => list.Add(uc as IView), () => { Assert.True(list.Count > 1); Assert.IsAssignableFrom<IViewFor<ILoginControlViewModel>>(list[0]); }); uiController.Start(null); } }
// Use this for initialization void Start() { controller = FindObjectOfType<UIController>(); controller.dateText = GetComponent<UnityEngine.UI.Text>(); text = GetComponent<Text>(); }
// Use this for initialization void Start() { updateTime = Time.time; uic = UIobject.GetComponent<UIController>(); for (int i = 0; i < 5; i++) { //if(launchers[i].name != "launcher1") //launchers[i].SetActive(true); lScript = launchers[i].GetComponent<MissileLaucher> (); lScript.GetReady(); // } //remove loading slide for (int i = 0; i < 5; i++) { if(launchers[i].name == "launcher1") { //launchers[i].SetActive(true); lScript = launchers[i].GetComponent<MissileLaucher> (); lScript.ready = true; } } startTime = Time.time; }
void InitGame() { gameState = GameState.READY; MakeGround(); MakeCharacter("1"); uiController = GameObject.Find("UIRoot").GetComponent<UIController>(); }
//private Transform[] path; //private float dist; // Use this for initialization void Start() { id++; //dist = 0.0f; health = maxHealth; pathPoints = GameObject.Find("SpawnLocation").GetComponent<PathScript>().GetRandomPath(); ui = Camera.main.GetComponent<UIController>(); }
public SpellbookUI(int id, UIController controller) : base(id, controller) { windowDimensions = new Rect(Screen.width - (WIDTH + 50), Screen.height / 2 - HEIGHT / 2, WIDTH, HEIGHT); scrollViewVector = Vector2.zero; draggedAbility = null; }
public CharacterUI(int id, UIController controller) : base(id, controller) { windowDimensions = new Rect(Screen.width - (WIDTH + 50), Screen.height / 2 - HEIGHT / 2, WIDTH, HEIGHT); scrollViewVector = Vector2.zero; totalInvWidth = Convert.ToInt32(WIDTH) - 62; }
// Use this for initialization void Start() { healthController = GameObject.FindGameObjectWithTag("Player").GetComponent<HealthController>(); uiController = GetComponent<UIController>(); SceneStart(); CheckRuntimePlatform(); }
void Awake() { levelInfoText = GetComponent<Text>(); uiController = GameObject.FindGameObjectWithTag("UI").GetComponent<UIController>(); UIEventsHandler.OnSceneRestart += this.SceneRestart; UIEventsHandler.OnPlayerDeath += this.SceneRestart; }
// Use this for initialization void Start() { charController = (CharController)character.GetComponent(typeof(CharController)); scoreController = (ScoreController)camera.GetComponent(typeof(ScoreController)); uiController = (UIController)camera.GetComponent(typeof(UIController)); objectPosition = GetComponent<Transform>().position; moveChar = false; }
void Start() { //THERE CAN BE ONLY ONE! if (UI != null && UI != this) { Destroy (this); } UI = this; }
/** * Runs at load time */ void Start () { playersCollection = Players.S; gameController = GameController.S; mapsController = MapsController.S; networkController = NetworkController.S; uiController = UIController.S; unitsController = UnitsController.S; }
public LootUI(int id, UIController controller) : base(id, controller) { windowDimensions = new Rect(50, Screen.height / 2 - HEIGHT / 2, WIDTH, HEIGHT); totalInvWidth = WIDTH - 10; scrollViewVector = Vector2.zero; }
void Awake() { defaultShader = Shader.Find("Diffuse"); highlight = Shader.Find("Self-Illumin/Bumped Diffuse"); uiController = GameObject.FindWithTag("UI Controller").GetComponent<UIController>(); lootTrigger = transform.parent.GetComponentInChildren<LootTrigger>(); }
void Start() { uiControl = FindObjectOfType<UIController>(); iconControl = FindObjectOfType<IconController>(); player = FindObjectOfType<Player>(); nameElements = panels[0].GetComponentsInChildren<Text>(); sliders = GetComponentsInChildren<StatSlider>(); values = new float[4]; }
public void Init(BuildingDefinition bd, UIController uiCtrl) { nameText.text = bd.name; priceText.text = "$" + bd.buildPrice; powerText.text = "¤" + bd.powerUse; buildingType = bd.type; this.uiCtrl = uiCtrl; }
/** * Runs at load time */ void Start () { networkController = NetworkController.S; playerController = PlayerController.S; turnsController = TurnsController.S; uiController = UIController.S; unitsController = UnitsController.S; // Force the screen mode into landscape mode Screen.orientation = ScreenOrientation.LandscapeLeft; }
void Awake() { if(instance == null){ instance = this; DontDestroyOnLoad(gameObject); initUI(); }else{ DestroyImmediate(this); } }
public AttributesUI(int id, UIController controller) : base(id, controller) { windowDimensions = new Rect(Screen.width - (WIDTH + 50), Screen.height / 2 - HEIGHT / 2, WIDTH, HEIGHT); labelStyle = new GUIStyle(); labelStyle.alignment = TextAnchor.MiddleCenter; labelStyle.fontSize = 14; labelStyle.normal.textColor = Color.white; }
/** * Runs at load time */ void Start () { gameController = GameController.S; lobbyController = LobbyController.S; multiplayerController = MultiplayerController.S; networkController = NetworkController.S; uiController = UIController.S; // Setup the UI's buttons construct (); }
// Use this for initialization void Awake () { if (instance == null) { instance = this; } else { Destroy(this); } }
void Awake () { Object.DontDestroyOnLoad (GameObject.Find ("PC Packet")); PC = GameObject.Find ("PC Packet").GetComponent<Character> (); UI = GetComponent<UIController> (); ClassSelectList = GameObject.Find ("Class Select: List") .GetComponent<UIPopupList> (); NameInput = GameObject.Find ("Name: Input") .GetComponent<UIInput> (); }
// Game init ------------------------------------ void Awake() { player = gameObject.GetComponent<Player>(); uiController = gameObject.GetComponent<UIController>(); fullOppKnocksDeck = gameObject.GetComponent<OppKnocksDeck>(); fullPropertyDeck = gameObject.GetComponent<PropertyDeck>(); cardsOppKnocks = fullOppKnocksDeck.Cards; cardsPropertyHunt = fullPropertyDeck.Cards; uiController.AwakeUI(); audioNew = gameObject.GetComponent<AudioSource>(); }
private void btnTest_Click(object sender, EventArgs e){ this.lblTesting.Visible = true; this.lblTesting.Text = "TESTING..."; Cursor.Current = Cursors.WaitCursor; Solution.Settings.Url = txtUrl.Text; Solution.Settings.Port = txtPort.Text; Solution.Settings.Username = txtUserName.Text; Solution.Settings.Password = txtPassword.Text; UIController controller = new UIController(); controller.HandleTestSettingsRequest(this); }
private void removecomplete() { m_nowController = null; Destroy(m_nowObject); SetStartAction(StartAction); SetEndAction(EndAction); m_nowObject = gameObject; m_nowController = this; m_onstartaction(onstartcomplete); ResetBG(); }
public void WithMultipleCallsDoesNotThrowException() { var uiProvider = Substitute.For<IUIProvider>(); var hosts = Substitute.For<IRepositoryHosts>(); var factory = Substitute.For<IExportFactoryProvider>(); var cm = Substitutes.ConnectionManager; var uiController = new UIController(uiProvider, hosts, factory, cm, LazySubstitute.For<ITwoFactorChallengeHandler>()); uiController.Dispose(); uiController.Dispose(); }
private void onendcomplete() { m_nowController = null; if(m_nowObject)Destroy(m_nowObject); SetStartAction(StartAction); SetEndAction(EndAction); m_nowObject = gameObject; m_nowController = this; m_onstartaction(onstartcomplete); CloseBG(); }
private void Awake() { InitializeDictonary(); _uiScript = GetComponentInChildren <UIController>(); }
// Function run when we pause the game private static void OnGameStarted() { UIController.ShowScreen("GameStarted"); Time.timeScale = 0; }
void OnUnitsMoved(MovedUnitsInfo info) { UIController.DisableHelpUI(); }
private void btSave_Click(object sender, EventArgs e) { if (!File.Exists(textBoxGame.Text)) { DialogResult = DialogResult.None; textBoxGame.Focus(); MessageBox.Show("Invalid witcher3.exe path", "failed to save."); return; } if (!File.Exists(textBoxWcc.Text)) { DialogResult = DialogResult.None; textBoxWcc.Focus(); MessageBox.Show("Invalid wcc_lite.exe path", "failed to save."); return; } MainController.Get().ProjectStatus = EProjectStatus.Busy; MainController.Get().StatusProgress = 0; // get configs var config = MainController.Get().Configuration; var uiconfig = UIController.Get().Configuration; // Apply Theme bool applyTheme = uiconfig.ColorTheme != (EColorThemes)comboBoxTheme.SelectedItem; // save settings config.ExecutablePath = textBoxGame.Text; config.WccLite = textBoxWcc.Text; // double check that r4depot exists if (string.IsNullOrEmpty(config.DepotPath)) { DirectoryInfo wccDir = new FileInfo(textBoxWcc.Text).Directory.Parent.Parent; string wcc_r4data = Path.Combine(wccDir.FullName, "r4data"); if (Directory.Exists(wcc_r4data)) { config.DepotPath = wcc_r4data; } } config.DepotPath = textBoxDepot.Text; config.GameModDir = textBoxModDir.Text; config.GameDlcDir = textBoxDlcDir.Text; config.TextLanguage = txTextLanguage.Text; config.VoiceLanguage = txVoiceLanguage.Text; config.UncookExtension = (EUncookExtension)comboBoxExtension.SelectedItem; config.IsWelcomeFormDisabled = checkBoxDisableWelcomeForm.Checked; config.IsAutoInstallModsDisabled = !checkBoxAutoInstall.Checked; uiconfig.ColorTheme = (EColorThemes)comboBoxTheme.SelectedItem; config.UpdateChannel = (EUpdateChannel)comboBoxUpdateChannel.SelectedItem; // save configs config.Save(); uiconfig.Save(); MainController.Get().UpdateWccHelper(config.WccLite); if (applyTheme) { MockKernel.Get().Window.GlobalApplyTheme(); RequestApplyTheme?.Invoke(); } /// debug console enabling try { IniParser ip = new IniParser(Path.Combine(MainController.Get().Configuration.GameRootDir, "bin\\config\\base\\general.ini")); if (!ip.HasSection("General") || ip.GetSetting("General", "DBGConsoleOn", true) != "true") { if (MessageBox.Show( "WolvenKit has detected that your game has the debug console disabled. It is a useful tool when testing mods. Would you like it to be enabled?", "Debug console enabling", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { ip.AddSetting("General", "DBGConsoleOn", "true"); ip.Save(); } } } catch (Exception exception) { MessageBox.Show(exception.ToString()); } // patch wcc_lite try { using (var fs = new FileStream(textBoxWcc.Text, FileMode.Open)) using (var bw = new BinaryWriter(fs)) { var shawcc = System.Security.Cryptography.SHA256.Create().ComputeHash(fs).Aggregate("", (c, n) => c += n.ToString("x2")); switch (shawcc) { case wcc_sha256: { if (MessageBox.Show("wcc_lite is a great tool by CD Projekt red but" + "due to some internal problems they didn't really have time to properly develop it, and is very slow " + "because it is searching for a CD Projekt red mssql server.\n" + "WolvenKit can patch this with a method figured out by blobbins on the witcher 3 forums." + "Would you like to perform this patch?", "wcc_lite faster patch", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { //We perform the patch bw.BaseStream.Seek(0x00713CD0, SeekOrigin.Begin); bw.Write(new byte[0xDD].Select(x => x = 0x90).ToArray()); //Recompute hash fs.Seek(0, SeekOrigin.Begin); shawcc = System.Security.Cryptography.SHA256.Create().ComputeHash(fs).Aggregate("", (c, n) => c += n.ToString("x2")); if (shawcc == wcc_sha256_patched) { MessageBox.Show("Succesfully patched!", "Patch completed", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("Failed to patch! Please reinstall wcc_lite and try again", "Patch completed", MessageBoxButtons.OK, MessageBoxIcon.Error); } } break; } case wcc_sha256_patched2: case wcc_sha256_patched: { //Do nothing we are cool. break; } default: { DialogResult = DialogResult.None; textBoxGame.Focus(); MessageBox.Show("Invalid wcc_lite.exe path you seem to have on older version", "failed to save."); return; } } } } catch (UnauthorizedAccessException) { //wcc_lite is installed to C:\\Program files MessageBox.Show("Please restart WolvenKit as administrator. Couldn't access " + textBoxWcc.Text, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); // Exit with error code 0 so we don't raise a windows error and the user can restart it so we have access to the files. Environment.Exit(0); } catch (Exception exception) { MessageBox.Show(exception.ToString()); } MainController.Get().StatusProgress = 100; MainController.Get().ProjectStatus = EProjectStatus.Ready; }
void Awake() { m_GameController = this.transform.Find("GamePart").GetComponent <GameController>(); m_UIPanelController = this.transform.Find("MenuPart").GetComponent <UIController> (); }
new void OnEnable() { base.OnEnable(); UIController.GetItemInDropDown(gameMode, UIController.ReturnGameMode(LobbyManager.currentRoom.gameMode)); }
private static void OnGameWon() { UIController.ShowScreen("GameWon"); Time.timeScale = 0; }
protected override void Start() { uic = FindObjectOfType <UIController>(); }
//Game Start Method private void Awake() { uiController = GetComponent <UIController>(); Init(); }
/// <summary> /// GetHandles haalt alle scripts op die gerefereerd worden in dit script. /// </summary> void GetHandles() { uIController = GameObject.FindWithTag("GameManager").GetComponent <UIController>(); }
private void Awake() { Instance = this; InitTryAgain(); InitDialog(); }
// Start is called before the first frame updatesas void Start() { StartCoroutine(AddOrder()); uIController = GetComponent <UIController>(); orders = new List <Order>(); }
private void Start() { uiController = FindObjectOfType <UIController>(); StartNewGame(true, true, true); }
// Use this for initialization void Start() { gameController = FindObjectOfType <GameController>(); UIcontroller = FindObjectOfType <UIController>(); DrawModeWall(); }
// Function run when we pause the game private static void OnGameRunning() { UIController.HideScreens(); Time.timeScale = 1; }
public void navigateToDashBoard() { UIController.navigateToDashBoardForm(this); }
public override void OnEnter(UIController uIController) { base.OnEnter(uIController); canvasGroup.alpha = 1; canvasGroup.blocksRaycasts = true; }
private void Awake() { uIController = GameObject.FindGameObjectWithTag("UIController").GetComponent <UIController>(); }
public override void Attacked(int hp) { base.Attacked(hp); UIController.OnMonsterUpdate(this); }
public void Continue() { if (mDialogEntries.Count == 0) { if (mDismissedCallback != null) { mDismissedCallback(0); mDismissedCallback = null; } return; } DialogEntry entry = mDialogEntries[0]; mDialogEntries.RemoveAt(0); AudioPlayer.PlaySound(entry.audio); if (entry.isInfoExchangeRequest) { UIController.Get().ShowMessage( entry.speaker, entry.sprites, entry.message, new string[] { "Yes", "No" }, new UIButtonCallback[] { buttonIndex => { InsertInformationExchange(0); Continue(); }, buttonIndex => { InsertDialogue(0, entry.speaker, entry.sprites, "Alright. Let's talk more later."); Continue(); }, }); } else if (entry.isInfoExchange) { if (entry.speaker.IsPlayer) { // Show prompt, and share the result with other participants of this dialog UIController.Get().AskForSentence(entry.sprites, sentence => { ShareInfo(GameState.Get().Player, sentence); Continue(); }); } else { // The GameState round-clues is guaranteed to be a recent clue that is not the result of combining multiple clues ClueInfo clueInfo = GameState.Get().mRoundClues[entry.speaker.PersonId]; string message; if (clueInfo != null) { Sentence newInfo = clueInfo.GetSentence(); message = "I found out " + entry.speaker.Speak(newInfo); // TODO: Announce the room where it was found if (newInfo.Subject.Type() == NounType.Unique) { message = "I found " + entry.speaker.Speak(newInfo); // TODO: Announce the room where it was found } ShareInfo(entry.speaker, newInfo); PlayerJournal.AddListen(entry.speaker.PersonId, newInfo); } else { message = "I found nothing."; } UIController.Get().ShowMessage(entry.speaker, entry.sprites, message, new string[] { "Continue" }, new UIButtonCallback[] { buttonIndex => Continue() }); } } else if (entry.isCustomSentence) { UIController.Get().AskForSentence(new Sprite[] { }, sentence => { if (entry.customSentenceCallback != null) { entry.customSentenceCallback(sentence); } Continue(); }, entry.subjectOverrides, entry.objectOverrides); } else // a regular message, just show it { UIController.Get().ShowMessage(entry.speaker, entry.sprites, entry.message, new string[] { "Continue" }, new UIButtonCallback[] { buttonIndex => Continue() }); } }
/// <summary> /// Control checking, and way more. /// </summary> void Update() { if (fullscreenSwitch != 0) { StartCoroutine(ChangeAspectRatio()); #if UNITY_STANDALONE_WIN if (!Screen.fullScreen && fullscreenSwitch == 1) { StartCoroutine(RepositionWindow()); } #endif fullscreenSwitch--; } stopScreenShake = false; if (isInFight) { frame++; } if (SceneManager.GetActiveScene().name == "ModSelect") { lastSceneUnitale = true; } else { lastSceneUnitale = false; } if (UserDebugger.instance && Input.GetKeyDown(KeyCode.F9)) { if (UserDebugger.instance.gameObject.activeSelf) { GameObject.Find("Text").transform.SetParent(UserDebugger.instance.gameObject.transform); } UserDebugger.instance.gameObject.SetActive(!UserDebugger.instance.gameObject.activeSelf); Camera.main.GetComponent <FPSDisplay>().enabled = !Camera.main.GetComponent <FPSDisplay>().enabled; } else if (isInFight && Input.GetKeyDown(KeyCode.H) && SceneManager.GetActiveScene().name != "Error" && UserDebugger.instance.gameObject.activeSelf) { GameObject.Find("Main Camera").GetComponent <ProjectileHitboxRenderer>().enabled = !GameObject.Find("Main Camera").GetComponent <ProjectileHitboxRenderer>().enabled; } else if (Input.GetKeyDown(KeyCode.Escape) && (canTransOW.Contains(SceneManager.GetActiveScene().name) || isInFight)) { if (isInFight && LuaEnemyEncounter.script.GetVar("unescape").Boolean&& SceneManager.GetActiveScene().name != "Error") { return; } if (SceneManager.GetActiveScene().name == "Error" && !modDev) { return; } if (GameOverBehavior.gameOverContainer) { if (GameOverBehavior.gameOverContainer.activeInHierarchy) { GameObject.FindObjectOfType <GameOverBehavior>().EndGameOver(); } else { UIController.EndBattle(); } } else { UIController.EndBattle(); } //StaticInits.Reset(); } else if (input.Menu == UndertaleInput.ButtonState.PRESSED && !nonOWScenes.Contains(SceneManager.GetActiveScene().name) && !isInFight) { if (!PlayerOverworld.instance.PlayerNoMove && EventManager.instance.script == null && !PlayerOverworld.instance.menuRunning[2] && !PlayerOverworld.instance.menuRunning[4] && EventManager.instance.script == null && GameObject.Find("FadingBlack").GetComponent <Fading>().alpha <= 0) { StartCoroutine(PlayerOverworld.LaunchMenu()); } } //else if (Input.GetKeyDown(KeyCode.L)) // MyFirstComponentClass.SpriteAnalyser(); if (isInFight) { switch (fleeIndex) { case 0: if (Input.GetKeyDown(KeyCode.F)) { fleeIndex++; } break; case 1: if (Input.GetKeyDown(KeyCode.L)) { fleeIndex++; } else if (Input.anyKeyDown) { fleeIndex = 0; } break; case 2: if (Input.GetKeyDown(KeyCode.E)) { fleeIndex++; } else if (Input.anyKeyDown) { fleeIndex = 0; } break; case 3: if (Input.GetKeyDown(KeyCode.E)) { fleeIndex++; } else if (Input.anyKeyDown) { fleeIndex = 0; } break; case 4: if (Input.GetKeyDown(KeyCode.S)) { fleeIndex = -1; UIController.instance.SuperFlee(); } else if (Input.anyKeyDown) { fleeIndex = 0; } break; } } if (Input.GetKeyDown(KeyCode.F4) || // F4 (Input.GetKeyDown(KeyCode.Return) && (Input.GetKey(KeyCode.LeftAlt) || // LAlt + Enter Input.GetKey(KeyCode.RightAlt)))) // RAlt + Enter { SetFullScreen(!Screen.fullScreen); } }
void Awake() { Instance = this; }
void Update() { #region Not null instances if (userInputMobileIntance == null) { userInputMobileIntance = UserInputMobile.instance; } if (userInputPcIntance == null) { userInputPcIntance = UserInputPC.instance; } if (uiControlerInstance == null) { uiControlerInstance = UIController.instance; } #endregion if (!userInputMobileIntance.isPressingTouch && !userInputPcIntance.isPressingKeys) // Reseta varariaveis de movimento se estiver parado { walkingLeft = false; walkingRight = false; if (isGrounded) { rb.velocity = new Vector2(0, rb.velocity.y); } } if (!isGrounded) { // Reduz a velocidade se não ta clicando pra andar ReduceVelocityIfNotClicking(); } else { if (!blockLoop) // Proíbe o pulo de resetar no momento do pulo { firstJump = false; } } #region Jump if (fRemenberJump >= 0) // Pulo timer { fRemenberJump -= Time.deltaTime; } if (userInputPcIntance.upKey | jumpTap) { fRemenberJump = fRemenberJumpTime; jumpTap = false; userInputPcIntance.upKey = false; } // Pulo if (fRemenberJump > 0) { Jump(); if (!firstJump) { fRemenberJump = 0; } } #endregion MovimentsMobile(); MovimentsPC(); PersonDontSlide(); IsTappedToJump(); IsGroundedFunc(); } // End Update
public void navigateToSignUpForm() { UIController.navigateToSignUpForm(this); }
private void Awake() { instance = this; }
public CreateRelationshipAction(CreateRelationshipDirection direction) { Direction = direction; UI = UIController.Current; }
private static void OnGameOver() { UIController.ShowScreen("GameEnded"); Time.timeScale = 0; }
void Start() { timer = FindObjectOfType <UIController>(); }
void Awake() { image = GetComponent <RawImage>(); uiController = UIController.Instance; }
private void Start() { _gc = FindObjectOfType <UIController>(); }