private void CompleteTypeStory() { if (AniRepeatBehavior.HasValue) { Story.RepeatBehavior = AniRepeatBehavior.Value; } if (AniAutoReverse.HasValue) { Story.AutoReverse = AniAutoReverse.Value; } Story.Completed += (sndr, evtArgs) => { RaiseStoryComplete(); }; try { Story.Begin(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public virtual void Start() { State = StoryboardState.Running; Story.Completed += OnStoryboardEnd; Story.Begin(); }
/// <summary> /// 开始动画,内部会设置IsInitialized=true /// </summary> public virtual void Begin() { if (!IsInitialized) { Initialize(); IsInitialized = true; } if (Story == null) { return; } if (IsEveryTimeStartOver) { SetBaseView(); Story.Begin(Element, true); IsBegined = true; } else { if (IsBegined) { return; } SetBaseView(); Story.Begin(Element, true); IsBegined = true; } }
//when u click on friend, this object will pop up the dialogue. //if friend is talking, the dialogue box will pop up once and //twine will take over. void OnMouseDown() { //set bool to true to allow only one click to start dialogue. if (customerInteract == false) { customerInteract = true; //code block that pops up dialogue and runs twine dialogue. twinePlayer1.GetComponent <TwineTextPlayer>().AutoDisplay = true; twinePlayer1.GetComponent <TwineTextPlayer>().StartStory = true; background1.GetComponent <RectTransform>().localScale = new Vector3(0.4f, background1.GetComponent <RectTransform>().localScale.y, background1.GetComponent <RectTransform>().localScale.z); //start the beginning of the story when click player if (twinePlayer1.GetComponent <TwineTextPlayer>().AutoDisplay) { story1.Begin(); } } //if the customer is waiting on on their drink. //for the purpose of this test, we trigger new dialogue by clicking. //Ideally these flags would trigger when handing the customer their drink. if (waitingDrink) { isPaused = false; waitingDrink = false; } //if (passageTwoRun && background2.GetComponent<RectTransform>().localScale.x != 0.4f) //{ // gaveDrink(); //} }
private void Button_Click_1(object sender, RoutedEventArgs e) { if (answer == userAns) { ToastPhoto.Source = new BitmapImage(new Uri("images/correct.png", UriKind.Relative)); ToastPhoto.Visibility = Visibility.Visible; Story.Begin(); } else { ToastPhoto.Source = new BitmapImage(new Uri("images/incorrect.png", UriKind.Relative)); ToastPhoto.Visibility = Visibility.Visible; Story.Begin(); } postAnswer.Add("uid", userAns); postAnswer.Add("publish", App.Check); PostClient pc = new PostClient(postAnswer); pc.DownloadStringCompleted += pc_DownloadStringCompleted; pc.DownloadStringAsync(new Uri("http://facebookfriendsquiz.appspot.com/choose", UriKind.Absolute)); VarOneFrame.Source = new BitmapImage(new Uri("images/photo.png", UriKind.Relative)); VarTwoFrame.Source = new BitmapImage(new Uri("images/photo.png", UriKind.Relative)); VarThreeFrame.Source = new BitmapImage(new Uri("images/photo.png", UriKind.Relative)); nextButton.IsEnabled = false; postAnswer.Clear(); getQuestions(); }
private static void Main(string[] args) { var file = args.FirstOrDefault(x => x.EndsWith(".apst")); check: if (string.IsNullOrEmpty(file) || !System.IO.File.Exists(file)) { Console.WriteLine("Select Apollo story file"); Console.WriteLine("\r" + new string('-', Console.WindowWidth - 1)); var sel = FileExplorer.SelectFile("*.apst", 2); if (sel != null) { file = sel.FullName; } Console.Clear(); goto check; } Story s = Story.LoadCompressed(file); s.StoryEnded += (s, e) => { Console.Clear(); Console.WriteLine("Story ended. Press any key to exit."); Console.ReadKey(); Environment.Exit(0); }; s.Begin(); while (true) { ; } }
public void StartDialog(Story newStory) { EndDialog(); SignInStory(newStory); currentStory.Begin(); Game.Pause(); }
//public GameObject bread; //void Start() // Start is called before the first frame update void Start() { story.Begin(); HuntingKnife.SetActive(false); KitchenKnife.SetActive(false); ButcherKnife.SetActive(false); ButterKnife.SetActive(false); SerratedKnife.SetActive(false); Debug.Log("story begun"); }
public void OpenDialogueWindow() { Debug.Log("start"); if (!DialogueSingletonManager.IsAvailable()) { return; } dialogueHolder.SetActive(true); DialogueSingletonManager.SetDialogueRunning(); story.Begin(); open = true; }