Exemplo n.º 1
0
    public void Log(string logText)
    {
        SmartText label = (SmartText)smartTextTemplate.Duplicate();

        label.BbcodeText = BB.Format(logText);
        AddChild(label);
    }
Exemplo n.º 2
0
    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();
    }
Exemplo n.º 3
0
 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]";
 }
Exemplo n.º 4
0
    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);
    }
Exemplo n.º 5
0
 public void OpenCustomMessage(string message)
 {
     PopupCentered();
     text.BbcodeText = $"[center]{BB.Format(message)}[/center]";
 }
Exemplo n.º 6
0
 public void Open(string key)
 {
     PopupCentered();
     text.BbcodeText = $"[center]{BB.Format(Help.Explanations[key])}[/center]";
 }
Exemplo n.º 7
0
 public static string Get(string key)
 {
     return(BB.Format(Explanations[key]));
 }