Exemple #1
0
 protected void SetUpHUDAndScores()
 {
     if (PD.gameType == PersistData.GT.Challenge)
     {
         GameObject g = new GameObject("PuzzleHUD");
         hud = g.AddComponent <PuzzleHUD>();
         hud.Setup(1, PD.GetPuzzleLevel());
     }
     else if (PD.gameType == PersistData.GT.Campaign)
     {
         GameObject g = new GameObject("CampaignHUD");
         hud = g.AddComponent <CampaignHUD>();
         hud.Setup(1);
     }
     else
     {
         GameObject g = new GameObject("InGameHUD");
         hud = g.AddComponent <InGameHUD>();
         if (player2Human || (PD.isDemo && PD.demoPlayers == 2))
         {
             hud.Setup(2);
         }
         else if (PD.isTutorial)
         {
             hud.Setup(1, 1);
             tutorialAssist = hud.tutorialAssist;
             tutorialAssist.SetBoards(board1, board2);
             tutorialAssist.MoveHighlightToPosition(board1.GetScreenPosFromXY(4, 5));
         }
         else
         {
             hud.Setup(1);
         }
     }
 }
    public void RunPhase()
    {
        TutorialHelper th = Objects[currentPhase];

        DialogueManager.instance.SetDialogue(th.DialogueText);
        foreach (GameObject o in th.ToDisable)
        {
            o.SetActive(false);
        }

        foreach (Button b in th.SetToNotInteractable)
        {
            b.interactable = false;
        }

        foreach (GameObject o in th.ToEnable)
        {
            o.SetActive(true);
        }

        foreach (Button b in th.SetToInteractable)
        {
            b.interactable = true;
        }
    }
Exemple #3
0
    private void SetupTutorial(Vector3 offset)
    {
        Vector3 tootroielposietion = new Vector3(2.4f, 0.15f);

        tootoriel_candyslaws = GetGameObject(tootroielposietion, "Tutorial Box", Resources.Load <Sprite>(SpritePaths.TutorialBox), false, "HUD");
        TextMesh   t = GetMeshText(tootroielposietion + new Vector3(0.0f, -0.1f), "", new FontData(TextAnchor.UpperCenter, TextAlignment.Center, 0.025f));
        GameObject g = new GameObject("tutorialHandler");

        tutorialAssist = g.AddComponent <TutorialHelper>();
        tutorialAssist.Init(t, tootoriel_candyslaws);
    }
Exemple #4
0
    private void EnemyKilled()
    {
        TutorialHelper helper = FindObjectOfType <TutorialHelper>();

        if (helper != null)
        {
            helper.UpdateHelperText("");
            SplineFollow.pause = false;
            isCompleted        = true;
        }
    }
Exemple #5
0
 /// <summary>
 /// Initializes a new instance of the TutorialViewModel class.
 /// </summary>
 public TutorialViewModel()
 {
     AllControls     = TutorialHelper.getTutorials();
     Steps           = new List <TutorialStep>();
     currentStep     = 0;
     InTutorial      = false;
     ContinueCommand = new RelayCommand(Continue);
     StartCommand    = new RelayCommand <FrameworkElement>(Start, CanStart);
     //Messenger
     Messenger.Default.Register <NotificationMessage>(this, NotificationMessageReceived);
 }
 private void EditorButton_Click(object sender, RoutedEventArgs e)
 {
     if (User.Instance.IsConnected)
     {
         if (Profile.Instance.CurrentProfile.ShowEditorTutorial)
         {
             TutorialHelper.StartEditorTutorial();
         }
     }
     else
     {
         if (Properties.Settings.Default.ShowTutorial)
         {
             TutorialHelper.StartEditorTutorial();
         }
     }
     RequestChangeState(Enums.States.Edition);
 }
        public void ShowHelpIfNecessary(TutorialHelper tutorial, Action dismissed = null)
        {
#if DEBUG
            //return;
#endif
            if (CrossSettings.Current.GetValueOrDefault(tutorial.Id, false))
			{
				dismissed?.Invoke();
				return;
			}
			CrossSettings.Current.AddOrUpdateValue(tutorial.Id, true);

            var controller = Storyboard.InstantiateViewController<TutorialViewController>();
            controller.Model = tutorial;
            controller.Dismissed = dismissed;
            controller.ModalTransitionStyle = UIModalTransitionStyle.CrossDissolve;
            controller.ModalPresentationStyle = UIModalPresentationStyle.OverCurrentContext;
            PresentViewController(controller, true, null);
        }
        public void ShowHelpIfNecessary(TutorialHelper tutorial, Action dismissed = null)
        {
            if (CrossSettings.Current.GetValueOrDefault(tutorial.Id, false))
            {
                dismissed?.Invoke();
                return;
            }
            CrossSettings.Current.AddOrUpdateValue(tutorial.Id, true);


            View view = LayoutInflater.Inflate(Resource.Layout.TutorialLayout, null);

            ActivityExtensions.SetViewFont(view as ViewGroup);

            var lblTitle    = view.FindViewById <TextView>(Resource.Id.lblTitle);
            var lblSubtitle = view.FindViewById <TextView>(Resource.Id.lblSubtitle);
            var imgImage    = view.FindViewById <ImageView>(Resource.Id.imgImage);
            var btnOk       = view.FindViewById <Button>(Resource.Id.btnOk);
            var id          = Resources.GetIdentifier(tutorial.AndroidIcon.ToLower(), "drawable", PackageName);

            imgImage.SetImageResource(id);

            lblTitle.Text = tutorial.Title;

            btnOk.Typeface    = CustomTypefaces.RobotoBold;
            lblTitle.Typeface = CustomTypefaces.RobotoBold;

            btnOk.Text = tutorial.ButtonText;

            if (tutorial.Id == "Welcome")
            {
                var span = new SpannableString(tutorial.Title);
                span.SetSpan(new FanwordTypefaceSpan(CustomTypefaces.RobotoBold), 8, tutorial.Title.Length, SpanTypes.ExclusiveExclusive);
                span.SetSpan(new ForegroundColorSpan(new Color(249, 95, 6)), 8, tutorial.Title.Length, SpanTypes.ExclusiveExclusive);
                lblTitle.TextFormatted = span;
            }

            lblSubtitle.Text = tutorial.Subtitle;

            var dialog = new AlertDialog.Builder(this).SetView(view).Create();

            if (btnOk.Text == "Follow Profiles")
            {
                btnOk.Click += (sender, e) =>
                {
                    dialog.Dismiss();
                    StartActivity(typeof(SearchActivity));
                };
            }
            else
            {
                btnOk.Click += (sender, e) =>
                {
                    dialog.Dismiss();
                };
            }


            dialog.DismissEvent += (sender, e) =>
            {
                dismissed?.Invoke();
            };

            dialog.Show();
        }
Exemple #9
0
 void Awake()
 {
     Instance = this;
 }
Exemple #10
0
 public void setTC(TutorialHelper t)
 {
     tc = t;
 }