private Texture2D rightPortrait = null; //Resources.Load<Texture2D>("Portraits/DawnHappy"); public static Dialogue StartDialogue(string dialogue, StartDialogue callback) { StateManager.Instance.DebugPush(GameState.dialogue); GameObject go = new GameObject("Dialogue Box"); Dialogue d = go.AddComponent <Dialogue>(); d.Parse(dialogue); d.callback = callback; d.box = Resources.Load <Texture>("TextBox"); d.HEIGHT = d.box.height; d.WIDTH = d.box.width; return(d); }
void Start() { script = this.GetComponent <StartDialogue>(); scriptAhmad = Ahmad.GetComponent <NPCWalking>(); //scriptBruce = Bruce.GetComponent<NPCWalking>(); //scriptMaria = Maria.GetComponent<NPCWalking>(); //Bruce1 = Bruce.GetComponent<NavMeshAgent>(); animator1 = Ahmad.GetComponent <Animator>(); Debug.Log("SaveCorgiIntro script started"); Video.GetComponent <VideoPlayer>().source = VideoSource.Url; string filepath = System.IO.Path.Combine(Application.streamingAssetsPath, "CorgiSadScene.mp4"); Video.GetComponent <VideoPlayer>().url = filepath; //Video.GetComponent<VideoPlayer>().Prepare(); }
private static async void BotOnMessageReceived(object sender, MessageEventArgs messageEventArgs) { if (!TryFindUser(messageEventArgs, out var user)) { var startDialog = new StartDialogue(async(string msg, IReplyMarkup markup) => { await Bot.SendTextMessageAsync( messageEventArgs.Message.Chat.Id, msg, replyMarkup: markup); return(true); }); users.TryAdd(messageEventArgs.Message.From.Id, startDialog); startDialog.PrintInitialMessage(); } var dialog = await users[messageEventArgs.Message.From.Id].OnMessage(messageEventArgs); users[user.GetValueOrDefault()] = dialog; }
void Start() { s_dialogue = GetComponent <StartDialogue>(); }