// Called when the node enters the scene tree for the first time.
    public override void _Ready()
    {
        surplus     = GetNode <ReactiveLabel>("CenterContainer/PanelContainer/AdjustContainer/AdjustSurplusContainer/MarginContainer/VBoxContainer/HBoxContainer/Value");
        incomeTotal = GetNode <ReactiveLabel>("CenterContainer/PanelContainer/AdjustContainer/AdjustInputContainer/MarginContainer/HBoxContainer/VBoxContainer/HBoxContainer/Value");
        outputTotal = GetNode <ReactiveLabel>("CenterContainer/PanelContainer/AdjustContainer/AdjustOutputContainer/MarginContainer/HBoxContainer/VBoxContainer/HBoxContainer/Value");

        surplus.Assoc(GMRoot.runner.economy.OBSProperty(x => x.monthSurplus));
        incomeTotal.Assoc(GMRoot.runner.economy.OBSProperty(x => x.incomeTotal));
        outputTotal.Assoc(GMRoot.runner.economy.OBSProperty(x => x.outputTotal));

        adjustInputContainer  = GetNode <VBoxContainer>("CenterContainer/PanelContainer/AdjustContainer/AdjustInputContainer/MarginContainer/HBoxContainer/VBoxContainer");
        adjustOutputContainer = GetNode <VBoxContainer>("CenterContainer/PanelContainer/AdjustContainer/AdjustOutputContainer/MarginContainer/HBoxContainer/VBoxContainer");

        var adjustEnumTypes = EnumEx.GetValues <RunnerAdjust.EType>();

        foreach (var elem in adjustEnumTypes.Where(x => x.HasAttribute <RunnerAdjust.EconomyInput>()))
        {
            var adjustPanel = AdjustPanel.Instance(adjustInputContainer, GMRoot.runner.adjusts.Single(x => x.etype == elem));
        }

        foreach (var elem in adjustEnumTypes.Where(x => x.HasAttribute <RunnerAdjust.EconomyOutput>()))
        {
            var adjustPanel = AdjustPanel.Instance(adjustOutputContainer, GMRoot.runner.adjusts.Single(x => x.etype == elem));
        }
    }
Example #2
0
    // Called when the node enters the scene tree for the first time.
    public override void _Ready()
    {
        Name  = GetNode <Label>("CenterContainer/PanelContainer/HBoxContainer/RightContainer/VBoxContainer/HBoxContainer/VBoxContainer/Name/Value");
        Party = GetNode <Label>("CenterContainer/PanelContainer/HBoxContainer/RightContainer/VBoxContainer/HBoxContainer/VBoxContainer/Party/Value");
        Age   = GetNode <ReactiveLabel>("CenterContainer/PanelContainer/HBoxContainer/RightContainer/VBoxContainer/HBoxContainer/VBoxContainer/Age/Value");

        Name.Text  = RunData.Taishou.inst.name;
        Party.Text = RunData.Taishou.inst.party.name;
        Age.Assoc(RunData.Taishou.inst.age);
    }