private void Update() { if (Input.GetKeyUp(27)) { if ((!string.IsNullOrEmpty(MonoBehaviourSingleton <UserInfoManager> .I.userStatus.tutorialBit) && !MonoBehaviourSingleton <UserInfoManager> .I.CheckTutorialBit(TUTORIAL_MENU_BIT.SKILL_EQUIP)) || !TutorialStep.HasAllTutorialCompleted()) { if (MonoBehaviourSingleton <GameSceneManager> .IsValid()) { string currentSectionName = MonoBehaviourSingleton <GameSceneManager> .I.GetCurrentSectionName(); if (!string.IsNullOrEmpty(currentSectionName) && MonoBehaviourSingleton <ToastManager> .IsValid() && !MonoBehaviourSingleton <ToastManager> .I.IsShowingDialog()) { string text = (!(MonoBehaviourSingleton <GameSceneManager> .I.GetCurrentSceneName() == "TitleScene")) ? StringTable.Get(STRING_CATEGORY.TEXT_SCRIPT, 36u) : "You are unable to go back to Town Scene during this Tutorial Mission"; ToastManager.PushOpen(text, 1.8f); } } } else if (IsEnableTutorialMessage()) { if (tutorialMessage.IsOnlyShowImage() && TutorialMessage.GetCursor(0) == null) { tutorialMessage.TutorialClose(); } } else if (!(tutorialMessage != null) || !(TutorialMessage.GetCursor(0) != null)) { ProcessBackKey(); } } }
private void OnClick() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Expected O, but got Unknown if (TutorialMessage.IsActiveButton(this.get_gameObject()) && wasSetup && this.get_enabled() && null != effect) { if (isToggle) { ToggleSprite(); } effectObj.SetActive(true); TraceActivate(); if (null != tweenScale) { tweenScale.ResetToBeginning(); tweenScale.PlayForward(); } if (null != tweenAlpha) { tweenAlpha.ResetToBeginning(); tweenAlpha.PlayForward(); } UpdateTransform(); } }
private void ProcessMessage(TutorialMessage message) { TutorialMessage(message.lines[0]); for (int i = 1; i < message.lines.Length; i++) { TutorialNextLine(message.lines[i]); } }
private IEnumerator DoClicks(TutorialMessage message) { foreach (var click in message.Clicks) { clicker.Click(click); tapAnimation.Play(click); yield return(new WaitForSeconds(message.ClickInterval)); } locked = false; }
protected virtual void OnClick() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown if (current == null && isEnabled && TutorialMessage.IsActiveButton(this.get_gameObject())) { current = this; EventDelegate.Execute(onClick); current = null; } }
private IEnumerator OpenTutorial(TutorialMessage tutorial) { if (PlayerPrefs.GetString(tutorial.uniqueId) != "closed") { tutorial.ExternalTriggerCall(TutorialMessage.TriggerBehaviour.Open); yield return(new WaitForSeconds(tutorial.timeOut)); PlayerPrefs.SetString(tutorial.uniqueId, "closed"); PlayerPrefs.Save(); } }
public void DisplayMessage(TutorialMessage messageObject) { if (PlayerPrefs.GetInt("TutEnabled") == 1) { //ensure that any previous message is overriden if (messageObject != currentMessage) //do not redisplay if already on display { HideMessage(); currentMessage = messageObject; StartCoroutine("SetupMessage"); } } }
//hides the message public void HideMessage(TutorialMessage messageToHide = null) { if (messageToHide == currentMessage) { messageToHide = null; StopCoroutine("SetupMessage"); currentMessage = null; } if (messageToHide == null) { leftDisplayPanel.transform.DOLocalMoveX(leftPanelStartX - (Screen.width / 2), 0.5f).Play(); rightDisplayPanel.transform.DOLocalMoveX(rightPanelStartX + (Screen.width / 2), 0.5f).Play().OnComplete(FinishHiding); } }
protected virtual void OnPress(bool isPressed) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Expected O, but got Unknown if (TutorialMessage.IsActiveButton(this.get_gameObject())) { if (isPressed) { time = 0.75f; } else { time = 0f; } } }
private void UpdateHighlight(TutorialMessage message) { text.text = message.Text; StartCoroutine(FillBar()); Vector3 position = message.target.OffGrid ? (Vector3)message.target.Position : message.target.Transform.position; StartCoroutine(DoClicks(message)); StartCoroutine(MoveHighlight( position, new Vector2( message.target.Size.x * blockSize + paddingSize, message.target.Size.y * blockSize + paddingSize), highlightSpeed)); }
private bool IsActiveButton() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Expected O, but got Unknown if (!TutorialMessage.IsActiveButton(this.get_gameObject())) { if (eventName == "TUTORIAL_NEXT") { return(true); } if (MonoBehaviourSingleton <GameSceneManager> .I.isOpenImportantDialog || MonoBehaviourSingleton <GameSceneManager> .I.GetCurrentSectionName() == "CommonErrorDialog") { return(true); } return(false); } return(true); }
private void LateUpdate() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit(target)) { TutorialMessage.RemoveCursor(_transform); } else if (!target.get_gameObject().get_activeInHierarchy()) { sprite.set_enabled(false); } else { if (!sprite.get_enabled()) { sprite.set_enabled(true); } if (isInScrollView) { Vector3 val = target.get_position() + offset; if (val.y > scrollViewSize.get_yMax() || val.y < scrollViewSize.get_yMin()) { sprite.set_enabled(false); CalcScrollRect(scroll); return; } if (!sprite.get_enabled()) { sprite.set_enabled(true); } } _transform.set_position(target.get_position() + offset); } }
public override void Update(GameTime gameTime) { if (!Facet.IsTutorialMode) return; ticker -= gameTime.ElapsedGameTime.Milliseconds; if (ticker < 0) { Facet.FacetManager.AddFacet(nextmessage, new FadeTransition(400)); ticker = NOTICKER; if (finished && !totallyFinished) { string messageStr = Chromathud.Strings.TutorialCompleted; nextmessage = new TutorialMessage(Facet, messageStr, MessageDest); ticker = 4000; totallyFinished = true; } } }
public void NotifyReady(TutorialEvent happened, object arg0, object arg1) { const int stdFuse = 400; //usual time to delay before popping up a tutorial message string messageStr = ""; Rectangle dest = MessageDest; Rectangle imageDest = dest; imageDest.Y += imageDest.Height; // Don't show tutorial messages more than once if (done.Keys.Contains(happened) && done[happened]) return; done.Add(happened, true); if (done.Count >= 7) // TODO don't hardcode # events finished = true; string pushing, selectLimit, intro; if (Util.UseXboxUI()) { pushing = Chromathud.Strings.TutorialPushingXbox; selectLimit = Chromathud.Strings.TutorialSelectLimitXbox; intro = Chromathud.Strings.TutorialIntroXbox; } else { pushing = Chromathud.Strings.TutorialPushingPC; selectLimit = Chromathud.Strings.TutorialSelectLimitPC; intro = Chromathud.Strings.TutorialIntroPC; } switch (happened) { case TutorialEvent.Intro: messageStr = String.Format(Chromathud.Strings.TutorialIntro, (int)arg0, intro); nextmessage = new TutorialMessage(Facet, messageStr, dest); ticker = 500; break; case TutorialEvent.TargetChanged: messageStr = String.Format(Chromathud.Strings.TutorialTargetChanged, (int)arg0); nextmessage = new TutorialMessage(Facet, messageStr, dest); ticker = stdFuse; break; case TutorialEvent.LotsaBlocks: messageStr = String.Format(Chromathud.Strings.TutorialHowToLose); nextmessage = new TutorialMessage(Facet, messageStr, dest); ticker = stdFuse; break; case TutorialEvent.FewBlocks: messageStr = String.Format(Chromathud.Strings.TutorialPushing, pushing); nextmessage = new TutorialMessage(Facet, messageStr, dest); if (Util.UseWindowsUI()) { nextmessage.Image = Content.LoadImage("instros/spacebar"); nextmessage.ImageArea = imageDest; } ticker = stdFuse; break; case TutorialEvent.DeadBlockCreated: messageStr = String.Format(Chromathud.Strings.TutorialDeadBlocks); nextmessage = new TutorialMessage(Facet, messageStr, dest); ticker = stdFuse; break; case TutorialEvent.SelectLimitReached: messageStr = String.Format(Chromathud.Strings.TutorialSelectLimitReached, selectLimit); nextmessage = new TutorialMessage(Facet, messageStr, dest); ticker = 600; break; case TutorialEvent.LimitIncreased: messageStr = String.Format(Chromathud.Strings.TutorialLimitIncreased, arg0); nextmessage = new TutorialMessage(Facet, messageStr, dest); ticker = stdFuse; break; } }
public override bool DispatchEvent() { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Expected O, but got Unknown if (!TutorialStep.HasAllTutorialCompleted() || MonoBehaviourSingleton <UIManager> .I.IsEnableTutorialMessage() || TutorialMessage.GetCursor(0) != null) { return(false); } if (HomeBase.OnAfterGacha2Tutorial) { return(false); } if (GetFriendCharaInfo() != null) { MonoBehaviourSingleton <GameSceneManager> .I.ExecuteSceneEvent("HomePlayerCharacter", this.get_gameObject(), "HOME_FRIENDS", GetFriendCharaInfo(), null, true); return(true); } return(false); }
private void LoadPuzzleIntoTable() { // Clear the animation queue this.setAnimationQueue.Clear(); // Clear the history this.movesHistory = new Stack <BlockMovement>(); // Fudge Factor so it doesn't use up the whole space, just most of it const float FudgeFactor = .95f; string puzzleName = this.specialStageMode ? this.SpecialStage.LevelMapping.Mapping[this.Level] : this.levelMapping.Mapping[this.Level]; this.GameBoard = GameBoardXmlIo.ReadGameBoard(puzzleName); TutorialMessage tutorial = null; if (!this.specialStageMode) { tutorial = this.Tutorials.FirstOrDefault(t => t.Level == this.Level); } // Set the number of columns IGameBlock[,] trimmedBoard = this.GameBoard.GetTrimmedBoard(); int rows = trimmedBoard.GetLength(0); int columns = trimmedBoard.GetLength(1); this.Table.columns = columns; GamePiece[,] gamePieces = new GamePiece[rows, columns]; // Calculate what is available for width and height float availableWidth = this.TableLimits.localSize.x * FudgeFactor; float availableHeight = this.TableLimits.localSize.y * FudgeFactor; // Show the tutorial if (tutorial != null) { // Account for the size of the tutorial tip availableHeight -= this.TutorialSize; this.TutorialTipStripObject.SetActive(true); this.TutorialTipStripMessage.text = tutorial.Message; } else { this.TutorialTipStripObject.SetActive(false); } availableWidth /= columns; availableHeight /= rows; // Choose the smallest size otherwise it will be too big to fit this.BlockSize = Math.Min((int)Math.Floor(Math.Min(availableWidth, availableHeight)), this.MaxBlockSize); for (int i = 0; i < rows; i++) { for (int j = 0; j < columns; j++) { IGameBlock gameBlock = trimmedBoard[i, j]; GamePiece block = NGUITools.AddChild(this.Table.gameObject, this.GamePiece.gameObject).GetComponent <GamePiece>(); block.GameBlock = gameBlock; block.SetBlockSize(this.BlockSize); block.SetAnimationMappings(this.animationMappingsDictionary); block.LoadImage(); block.SubscribeToGameBlockEvents(); if (gameBlock != null) { block.name = string.Format("{0}-{1}: {2}", gameBlock.IndexRow, gameBlock.IndexColumn, gameBlock.GetBlockString()); } else { block.name = "Null Block"; } this.Table.children.Add(block.transform); gamePieces[i, j] = block; } } // Center the table float heightOffset = (float)(rows * this.BlockSize) / 2; float widthOffset = -(float)(columns * this.BlockSize) / 2; this.Table.transform.localPosition = new Vector3(widthOffset, heightOffset + this.VerticalOffset); this.Table.enabled = true; this.Table.repositionNow = true; this.firstMove = true; // Show the indicator that this is the first time the level is played string key = this.specialStageMode ? string.Format("{0}_{1}_{2}", SharedResources.TimesLevelPlayedPrefix, this.SpecialStage.StageId, this.Level) : string.Format("{0}_{1}", SharedResources.TimesLevelPlayedPrefix, this.Level); int timesPlayed = PlayerPrefsFast.GetInt(key, 0); this.FirstTimeIndicator.SetActive(timesPlayed == 0); this.CurrentLevelText.text = string.Format("Level {0}", this.Level); if (!this.specialStageMode) { foreach (TutorialAnimation tutorialAnimation in this.TutorialAnimations) { if (tutorialAnimation.Level == this.Level) { NGUITools.AddChild(gamePieces[tutorialAnimation.Row, tutorialAnimation.Column].gameObject, tutorialAnimation.Animation); } } } }
public override bool DispatchEvent() { //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown if (!TutorialStep.HasAllTutorialCompleted() || MonoBehaviourSingleton <UIManager> .I.IsEnableTutorialMessage() || TutorialMessage.GetCursor(0) != null) { return(false); } if (HomeBase.OnAfterGacha2Tutorial) { return(false); } if (state == STATE.FREE && npcInfo != null && !string.IsNullOrEmpty(npcInfo.eventName)) { MonoBehaviourSingleton <GameSceneManager> .I.ExecuteSceneEvent("HomeNPCCharacter", this.get_gameObject(), npcInfo.eventName, null, null, true); return(true); } return(false); }
public override void UpdateUI() { UserInfo userInfo = MonoBehaviourSingleton <UserInfoManager> .I.userInfo; UserStatus userStatus = MonoBehaviourSingleton <UserInfoManager> .I.userStatus; SetSupportEncoding(base._transform, UI.LBL_NAME, true); SetLabelText((Enum)UI.LBL_NAME, Utility.GetNameWithColoredClanTag(string.Empty, userInfo.name, true, true)); SetLabelText((Enum)UI.LBL_LEVEL, userStatus.level.ToString()); SetLabelText((Enum)UI.LBL_CRYSTAL, userStatus.crystal.ToString("N0")); SetLabelText((Enum)UI.LBL_MONEY, userStatus.money.ToString("N0")); SetProgressValue((Enum)UI.PBR_EXP, userStatus.ExpProgress01); InitDeactive((Enum)UI.SPR_EXP_NEXT); if (TutorialStep.HasAllTutorialCompleted() && !MonoBehaviourSingleton <UIManager> .I.IsEnableTutorialMessage() && TutorialMessage.GetCursor(0) == null) { SetTouchAndRelease((Enum)UI.SPR_BG02, "EXP_NEXT_SHOW", "EXP_NEXT_HIDE", (object)null); } SetBadge((Enum)UI.BTN_MENU, MonoBehaviourSingleton <PresentManager> .I.presentNum + MonoBehaviourSingleton <FriendManager> .I.noReadMessageNum + (GameSaveData.instance.IsShowNewsNotification() ? 1 : 0), 3, -15, -8, false); if (boostAnimator == null) { boostAnimator = this.GetComponentInChildren <StatusBoostAnimator>(); } boostAnimator.SetupUI(delegate(BoostStatus update_boost) { if (update_boost != null) { UpdateShowBoost(update_boost); } else { EndShowBoost(); } }, delegate(BoostStatus change_boost) { if (change_boost != null) { ChangeShowBoost(change_boost.type); UpdateShowBoost(change_boost); } else { EndShowBoost(); } }); SetFontStyle((Enum)UI.LBL_BOOST_RATE, 2); SetFontStyle((Enum)UI.LBL_BOOST_TIME, 2); }
private IEnumerator DisplayMessageRoutine(TutorialMessage tutorial) { if (!tutorial.Recurring) { TutorialMessages.Remove(tutorial); } CurrentEvent = tutorial.EventTrigger; if (tutorial.EventTrigger == EventManager.GameEvent.GuidingCharacterHelp) { Button.interactable = true; Animation.Play(); } else { Button.interactable = false; StopBlinking(); } //if (tutorial.LockOtherInteraction) // BackgroundTintImage.FadeIn(); if (tutorial.AnchorPositions.Any()) { StartCoroutine(MoveCharacterToAnchorPos(CharacterPositionHolder, tutorial.AnchorPositions[Random.Range(0, tutorial.AnchorPositions.Length)], !Holder.activeSelf)); } if (!Holder.activeSelf) { SoundController.PlaySound(SoundController.UISound.GuidePopup); PuffParticles.Play(); Holder.SetActive(true); } if (tutorial.SelectOneAtRandom) { Text.text = ""; yield return(new WaitUntil(() => !SoundController.SpeechPlaying())); yield return(new WaitForSecondsRealtime(PlayLine(tutorial.Lines[Random.Range(0, tutorial.Lines.Length)].Line) + DisplayTime)); } else { foreach (var t in tutorial.Lines) { Text.text = ""; yield return(new WaitUntil(() => !SoundController.SpeechPlaying())); yield return(new WaitForSecondsRealtime(PlayLine(t.Line) + DisplayTime)); } } //if (tutorial.LockOtherInteraction) // BackgroundTintImage.FadeOut(); if (MessageQueue.Any()) { StartCoroutine(DisplayMessageRoutine(MessageQueue.Dequeue())); } else if (tutorial.EventTrigger != EventManager.GameEvent.GuidingCharacterHelp) { Close(); } }
public void DispatchEvent() { //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Expected O, but got Unknown //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Expected O, but got Unknown if (!HomeBase.OnAfterGacha2Tutorial || eventName.Contains("QUEST_COUNTER")) { if (eventName.Contains("QUEST_COUNTER")) { if ((TutorialStep.HasFirstDeliveryCompleted() && !TutorialStep.HasAllTutorialCompleted()) || MonoBehaviourSingleton <UIManager> .I.IsEnableTutorialMessage() || TutorialMessage.GetCursor(0) != null) { return; } } else if (!TutorialStep.HasAllTutorialCompleted() || MonoBehaviourSingleton <UIManager> .I.IsEnableTutorialMessage() || TutorialMessage.GetCursor(0) != null) { return; } if (eventName.Contains("EVENT_COUNTER") && (int)MonoBehaviourSingleton <UserInfoManager> .I.userStatus.level < 20) { MonoBehaviourSingleton <GameSceneManager> .I.ExecuteSceneEvent("HomeStageEventBase", this.get_gameObject(), "QUEST_LOCK", null, null, true); } else if (!eventName.Contains("POINT_SHOP") && (!eventName.Contains("ARENA_LIST") || (MonoBehaviourSingleton <UserInfoManager> .I.isArenaOpen && (int)MonoBehaviourSingleton <UserInfoManager> .I.userStatus.level >= 50)) && (!eventName.Contains("BINGO") || MonoBehaviourSingleton <QuestManager> .I.IsBingoPlayableEventExist()) && MonoBehaviourSingleton <GameSceneManager> .I.IsEventExecutionPossible()) { MonoBehaviourSingleton <GameSceneManager> .I.ExecuteSceneEvent("HomeStageEventBase", this.get_gameObject(), eventName, eventData, null, true); } } }
// Update is called once per frame void Update() { for (int i = 0; i < tower_name.Count; i++) { string name = tower_name[i]; int price = prices[i]; GameObject tower = GameObject.Find("Shop/" + name); if (tower != null) { AbstractEmitter a = tower.GetComponent <AbstractEmitter>(); a.price = price; DragAndDrop drag_and_drop = tower.GetComponent <DragAndDrop>(); SpriteRenderer tower_base = GameObject.Find("Shop/" + name + "/Turret_Base").GetComponent <SpriteRenderer>(); SpriteRenderer tower_cannon = GameObject.Find("Shop/" + name + "/Turret_Cannon").GetComponent <SpriteRenderer>(); SpriteRenderer tower_top = GameObject.Find("Shop/" + name + "/Turret_Top").GetComponent <SpriteRenderer>(); SpriteRenderer light = GameObject.Find("Shop/" + name + "/TowerLight").GetComponent <SpriteRenderer>(); if (!buyed[i]) { // Color dark = Color.black; Color dark = new Color(0.32f, 0.32f, 0.32f, 1f); if (price <= player_info.music_energy) { if (!displayed_tutorial) { TutorialMessage tutorial = GameObject.Find("Tutorial").GetComponent <TutorialMessage>(); tutorial.DisplayEnergyMessage(); displayed_tutorial = true; } drag_and_drop.disabled = false; tower_base.color = dark; tower_cannon.color = dark; tower_top.color = dark; light.enabled = true; } else { light.enabled = false; drag_and_drop.disabled = true; tower_base.color = dark; tower_cannon.color = dark; tower_top.color = dark; } } else { light.enabled = false; tower_base.color = Color.white; tower_cannon.color = Color.white; tower_top.color = Color.white; } if (tower.transform.position.x > -6.37) { if (!buyed[i]) { Debug.Log("Spend money on tower"); player_info.music_energy -= price; buyed[i] = true; drag_and_drop.disabled = false; tower_base.color = Color.white; tower_cannon.color = Color.white; tower_top.color = Color.white; } } } } }
void Start() { resources = GameObject.FindObjectOfType <Resources>(); timestepManager = GameObject.FindObjectOfType <TimestepManager>(); transform.GetChild(0).gameObject.SetActive(false); messages = new List <TutorialMessage>(); gameObject.AddComponent <AudioSource>(); if (Application.loadedLevelName.Contains("OneBulletPrototype")) { // Level 1 messages TutorialMessage message = new TutorialMessage(); message.trigger = () => { return(true); }; message.message = "Friends. We find ourselves on a metal planet, flying through space. Leadership is needed. We have formed the Nanocouncil. This planet is made of <placement resource>, which can be converted into additional nanobots. Begin <placement resource> assimilation."; messages.Add(message); message = new TutorialMessage(); message.trigger = () => { return(resources.getJumpResourceAmount() >= LevelWinDetector.jumpResourceForJump); }; message.message = "Joyous accomplishment. We have assimilated <jump resource> in sufficiency to facilitate propulsion system fabrication. Begin interplanetary transit procedure."; messages.Add(message); message = new TutorialMessage(); message.trigger = () => { return(resources.getJumpResourceAmount() > 0); }; message.message = "Friends. We have encountered a foreign substance. <jump resource> may be useful for nanobot acceleration. With enough <jump resource>, the Nanocouncil may be capable of propulsion system fabrication. Begin <jump resource> assimilation."; messages.Add(message); message = new TutorialMessage(); message.trigger = () => { return(resources.getPlacementResourceAmount() >= 10); }; message.message = "Friends. The Nanocouncil has calculated that this planet’s resources cannot sustain infinite expansion. Favorably we have detected a nearby planet with more plentiful resources. No methods of transit to alien planet known at this time. Further exploration required."; message.image = jumpImage; messages.Add(message); message = new TutorialMessage(); message.trigger = () => { return(pitEncounteredTime > 0 && (Time.time - pitEncounteredTime > 2)); }; message.message = "Unfavorable! We have lost a fellow friend to a hole on the planetary surface. Planetary integrity decreasing. Caution encouraged."; messages.Add(message); } if (Application.loadedLevelName.Contains("Level 2")) { // Level 2 messages TutorialMessage message = new TutorialMessage(); message.trigger = () => { return(true); }; message.message = "Friends. We have achieved planetary arrival. Unfavorably, extraterrestrial wind currents make leftward movement laborious. Be not debilitated. Begin planet assimilation."; messages.Add(message); message = new TutorialMessage(); message.trigger = () => { return(resources.getUpgradeResourceAmount() > 0); }; message.message = "#12A7()?; .*\\1ave encountered a miraculous substance. <upgrade resource> may be used for extreme nanobot enhancement. Begin <upgrade resource> assimilation. Atypical rapidity encouraged."; messages.Add(message); } if (Application.loadedLevelName.Contains("Level 3")) { // Level 3 messages TutorialMessage message = new TutorialMessage(); message.trigger = () => { return(true); }; message.message = "Friends. This planet is populated with a substance identified as danger inducing. Approach <detonating terrain> with caution."; messages.Add(message); message = new TutorialMessage(); message.trigger = () => { return(bombExploded); }; message.message = "Let us take a microsecond to regret the untimely combustion of our fellow friends."; messages.Add(message); message = new TutorialMessage(); message.trigger = () => { return(resources.getJumpResourceAmount() > 10); }; message.message = "Most unfavorable of verifications. The Nanocouncil has calculated that our planet is on a collision course with an unknown body of unfathomable proportions. Continuation of backwards trajectory is imperative. Atypical rapidity advised."; message.image = collisionImage; messages.Add(message); } }
private void OnPress(bool isDown) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Expected O, but got Unknown //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Expected O, but got Unknown //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) if (TutorialMessage.IsActiveButton(this.get_gameObject())) { if (existsIcon && isDown && !isSimple) { this.get_gameObject().GetComponentsInChildren <ItemIcon>(true, Temporary.itemIconList); for (int i = 0; i < Temporary.itemIconList.Count; i++) { if (!(Temporary.itemIconList[i].icon.mainTexture == null) && !cacheIconNames.Contains(Temporary.itemIconList[i].icon.mainTexture.get_name())) { Reset(); break; } } Temporary.itemIconList.Clear(); } if (isDown && !wasSetup && !isSimple) { cacheObjects = new List <CacheParam>(); Transform val = CreateSprites(thisTransform, MonoBehaviourSingleton <UIManager> .I.buttonEffectTop, cacheObjects); val.set_position(thisTransform.get_position()); Setup(val); this.get_gameObject().GetComponentsInChildren <ItemIcon>(true, Temporary.itemIconList); if (Temporary.itemIconList.Count > 0) { cacheIconNames = new List <string>(); for (int j = 0; j < Temporary.itemIconList.Count; j++) { if (!(Temporary.itemIconList[j].icon.mainTexture == null)) { cacheIconNames.Add(Temporary.itemIconList[j].icon.mainTexture.get_name()); } } existsIcon = true; } Temporary.itemIconList.Clear(); } if (this.get_enabled()) { if (!mStarted) { Start(); } TweenScale.Begin(buttonScale_tweenTarget.get_gameObject(), buttonScale_duration, (!isDown) ? buttonScale_mScale : Vector3.Scale(buttonScale_mScale, buttonScale_pressed)).method = UITweener.Method.EaseInOut; if (buttonScale_Collider != null) { if (isDown) { buttonScale_Collider.set_size(buttonScale_ColliderSize.Div(buttonScale_pressed) + new Vector3(0.01f, 0.01f, 0.01f)); } else { buttonScale_Collider.set_size(buttonScale_ColliderSize); } } } } }