public void updateActualTurn(int idPlayerActual, bool isLocal, int turnNum) { this.actualIdPlayer = idPlayerActual; string strTurnNum = "TURN: " + turnNum; string strPlayerTurn = "Actual Player: " + idPlayerActual; lblTurnNum.Text = (strTurnNum); lblActualPlayer.Text = (strPlayerTurn); if (isLocal) { isLocalPlayerNow = true; //active panelUnitsControl //anim string: you turn! } else { isLocalPlayerNow = false; } //update mark on player listview for (int i = 0; i < playersListView.GetChildCount(); i++) { PlayerListViewElement plve = playersListView.GetChild(i) as PlayerListViewElement; plve.isActual = (idPlayerActual == i); } //animation lblAnimTurnNum.Text = (strTurnNum); lblAnimPlayerName.Text = (strPlayerTurn); animTurn.Play("show"); }
public override void _Ready() { container = GetNode <HBoxContainer>("Container"); for (var i = 0; i < container.GetChildCount(); i++) { var cardPanel = container.GetChildren()[i] as Panel; var infoBox = cardPanel.GetNode <Panel>("Info").GetNode <VBoxContainer>("VBoxContainer"); // add 2 first children, which are usually Title & Description Interface.LabelGroup.Add(infoBox.GetChildren()[0] as Label); Interface.LabelGroup.Add(infoBox.GetChildren()[1] as Label); // add the animation player for this card panel Interface.CardsGroup.Add(cardPanel); var detector = cardPanel.GetNode <Panel>("Detector"); detectors.Add(detector); detector.Connect("mouse_entered", this, "_on_Detector_mouse_entered", new Array { i }); detector.Connect("mouse_exited", this, "_on_Detector_mouse_exited", new Array { i }); detector.Connect("gui_input", this, "_on_Detector_gui_input", new Array { i }); } }
public override void _Ready() { container = GetNode <HBoxContainer>("Container"); for (int i = 0; i < container.GetChildCount(); i++) { Panel cardPanel = container.GetChildren()[i] as Panel; VBoxContainer infoBox = cardPanel.GetNode <Panel>("Info").GetNode <VBoxContainer>("VBoxContainer"); // add 2 first children, which are usually Title & Description Interface.LabelGroup.Add(infoBox.GetChildren()[0] as Label); Interface.LabelGroup.Add(infoBox.GetChildren()[1] as Label); // add the animation player for this card panel Interface.cardAnimationGroup.Add(cardPanel.GetNode <AnimationPlayer>("AnimationPlayer")); } Vars.load(); }