public override void _Ready() { SpeedContrl.Pause(); surplus = GetNode <ReactiveLabel>("CenterContainer/EconomyDetail/VBoxContainer/Bottom/Surplus/Value"); incomeTotal = GetNode <ReactiveLabel>("CenterContainer/EconomyDetail/VBoxContainer/HBoxContainer/Income/VBoxContainer/Total/Value"); outputTotal = GetNode <ReactiveLabel>("CenterContainer/EconomyDetail/VBoxContainer/HBoxContainer/Output/VBoxContainer/Total/Value"); surplus.Assoc(RunData.Economy.inst.monthSurplus); incomeTotal.Assoc(RunData.Economy.inst.incomes.total); outputTotal.Assoc(RunData.Economy.inst.outputs.total); foreach (var income in RunData.Economy.inst.incomes) { var incomPanel = (IncomePanel)ResourceLoader.Load <PackedScene>("res://Scenes/Main/Dynamic/EconomyDetail/IncomePanel.tscn").Instance(); incomPanel.gmObj = income; GetNode <VBoxContainer>("CenterContainer/EconomyDetail/VBoxContainer/HBoxContainer/Income/VBoxContainer/VBoxContainer").AddChild(incomPanel); } foreach (var output in RunData.Economy.inst.outputs) { var outputPanel = (OutputPanel)ResourceLoader.Load <PackedScene>("res://Scenes/Main/Dynamic/EconomyDetail/OutputPanel.tscn").Instance(); outputPanel.gmObj = output; GetNode <VBoxContainer>("CenterContainer/EconomyDetail/VBoxContainer/HBoxContainer/Output/VBoxContainer/VBoxContainer").AddChild(outputPanel); } ////UpDateTempOutputStatus(); }
// 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 = GMRoot.runner.taishou.name; Party.Text = GMRoot.runner.taishou.partyName; Age.Assoc(GMRoot.runner.taishou.OBSProperty(x => x.age)); }