public void Log(string logText) { SmartText label = (SmartText)smartTextTemplate.Duplicate(); label.BbcodeText = BB.Format(logText); AddChild(label); }
public override void _Ready() { GameData.Instance.State = GameData.GameState.Narration; if (GameData.Instance.yokai == YokaiId.None) { Continue(); return; } // Sanity check to avoid the infamous win-crash int money = (100 + GameData.Instance.MoneyPercentageBonus) * GameData.Instance.yokai.Data().Reward / 100; GameData.Instance.yokai = YokaiId.None; GetNode <Label>(moneyPath).Text = $"+{money}"; GameData.Instance.Money += money; CardId card = CardData.AllSpecial().Random(); GetNode <CardVisual>(cardPath).ShowCard(card.Data()); GetNode <CardVisual>(cardPath).IsDisabled = true; GetNode <RichTextLabel>(descriptionPath).BbcodeText = BB.Format(card.Data().Description); GetNode <Button>(addCardbuttonPath).Connect("pressed", this, nameof(AddToDeck), new Godot.Collections.Array() { card }); GetNode <Button>(continuePath).Connect("pressed", this, nameof(Continue)); RNG.StartCycle(); Global.SaveGame(); }
public void OpenCard(int index) { opened = GameData.Instance.Deck[index].Data(); inspectField.BbcodeText = BB.Format(opened.Description); inspectField.Show(); banishField.Disabled = (GameData.Instance.Money < BANISHMENT_COST); priceField.BbcodeText = $"[center]Banish ({BANISHMENT_COST} {BB.Mon})[/center]"; }
public void OpenCard(int _, int index) { CardData card = GetCard(index).Data(); selected = index; bubbleText.BbcodeText = $"Want to buy a {card.Name}?\n\n{BB.Format(card.Description)}"; buyButton.Show(); buyButtonText.BbcodeText = $"[center]Buy ({card.MonPrice} {BB.Mon})[/center] "; buyButton.Disabled = (card.MonPrice > GameData.Instance.Money); }
public void OpenCustomMessage(string message) { PopupCentered(); text.BbcodeText = $"[center]{BB.Format(message)}[/center]"; }
public void Open(string key) { PopupCentered(); text.BbcodeText = $"[center]{BB.Format(Help.Explanations[key])}[/center]"; }
public static string Get(string key) { return(BB.Format(Explanations[key])); }