private void UpdateSprites(string battleText, string[] choices) { SpriteHash.Clear(); SpriteHash.Add("OpponentField", new OpponentFieldSprite(battlers[1], cursorLocation)); SpriteHash.Add("PlayerField", new PlayerFieldSprite(battlers[0], cursorLocation)); if (battlers[0] is Player) { SpriteHash.Add("Hand", new HandSprite(battlers[0], cursorLocation)); } if (heldCard != null) { SpriteHash.Add("HeldCard", new CardSprite(heldCard)); } Card highlighted = GetHighlightedCard(); if (highlighted != null) { SpriteHash.Add("HighlightedCard", new CardSprite(highlighted)); } if (battleText.Length > 0 || choices.Length > 0) { SpriteHash.Add("TextBox", new TextBox("", battleText, choices)); } Render(); }
public TextEnterScene(string prompt, bool cancellable) : base() { Prompt = prompt; Cancellable = cancellable; SpriteHash.Add("TextBox", new TextBox(prompt, "_")); SpriteHash.Add("WarningBox", null); }
public TextScene(string title, string[] texts, Dictionary <string, Action> choices) : base() { Title = title; Texts = texts; Choices = choices; TextIndex = 0; SpriteHash.Add("TextBox", new TextBox(Title, Texts[0], (ChoicesAvailable() ? Choices.Keys.ToArray() : null))); }