public override void Update(DwarfTime time) { if (Actor.Animation.IsPlaying) { SayTimer.Update(time); if (SayTimer.HasTriggered) { Actor.Animation.Stop(); } } Actor.LocalBounds = new Rectangle(0, LocalBounds.Height - ActorSize, ActorSize, ActorSize); ActorPanel.LocalBounds = Actor.LocalBounds; SpeechBubble.LocalBounds = new Rectangle(ActorSize, 0, LocalBounds.Width - ActorSize, LocalBounds.Height - ActorSize / 2); SpeechLabel.LocalBounds = new Rectangle(10, 10, SpeechBubble.LocalBounds.Width - 10, SpeechBubble.LocalBounds.Height - 10); base.Update(time); }
public void Say(string text) { SpeechLabel.Text = text; Actor.Animation.Play(); SayTimer.Reset(0.1f * text.Length); }