public void Clear() { fading = false; characterDisplayed = false; currentMessage = null; messages.Clear (); }
public void DispatchMesssage(FSMTransitionType msg, BaseFSM receiverId, bool condition) { CharacterMessage message = new CharacterMessage(msg, receiverId, condition); if (message.condition) { message.Receiver.PerformTransition(message.Msg); } }
public void Add(string text, string title, string subtitle, string imageUrl, CharacterMessage charMsg, ScreenMessage screenMsg) { Add(new NotificationState { ObjectId = NewId, Text = text, Title = title, Subtitle = subtitle, ImageUrl = imageUrl, Date = DateTime.Now, CharMsg = charMsg, ScreenMsg = screenMsg }); }
public void Update(GameTime gameTime) { if (characterDisplayed && this.currentMessage.Timed && !fading) { this.currentMessage.displayedTime += (float)gameTime.ElapsedGameTime.TotalSeconds; if (currentMessage.displayedTime >= currentMessage.Limit) StartFade (); } if (!characterDisplayed && messages.Count > 0) { currentMessage = messages.Dequeue (); characterDisplayed = true; InvalidateCharacterLocation (); } if (fading) { fadePassed += (float)gameTime.ElapsedGameTime.TotalSeconds; if (fadePassed >= fadeTotal) { characterDisplayed = false; fading = false; } } HandleInput (); }
public void ShowTimed(string name, string text, float time) { CharacterMessage message = new CharacterMessage { Message = text, Timed = true, Limit = time, Name = name, }; this.characterDisplayed = true; currentMessage = message; messages.Clear (); InvalidateCharacterLocation (); }
public void EnqueueTimed(string name, string text, float time) { CharacterMessage message = new CharacterMessage { Message = text, Timed = true, Limit = time, Name = name }; messages.Enqueue (message); }
public void EnqueueMessageBox(string name, string text, Action messageClosed = null) { CharacterMessage message = new CharacterMessage { Message = text, Action = messageClosed, Name = name }; messages.Enqueue (message); }
protected virtual void PushCharacterMessagePanel(ResourceActivationContext context, PlayableContent playable, CharacterMessage charMsg, ResourcePanelData <CharacterMessage> data, Action onClose) { Push(context, PanelStack, GetCharacterMessagePanel(context, playable), data, onClose); }