Пример #1
0
 private void _Unit_Configuration(unit unt, int player_number, int column_number, int row_number, int UI_number)
 {
     unt.set_player(player_number);
     unt.AddToGroup("Player" + player_number.ToString());
     unt._Change_Tile(map[column_number, row_number]);
     GetNode("../NextTurnButton").Connect("pressed", unt, "_Refresh_AP");
     unt.Connect("_unit_selected", GetNode("../Selector"), "_on_Tile_selected");
     unt.Connect("_unit_died", GetNode("../TurnLabel"), "_On_P" + player_number.ToString() + "_unit_death");
     unt.Connect("_connect_to_UI", GetNode("../UnitUI_P" + player_number.ToString() + "_" + UI_number.ToString()), "_Texture_set");
     unt.EmitSignal("_connect_to_UI", this);
     unt.Connect("_selected_to_UI", GetNode("../UnitUI_P" + player_number.ToString() + "_" + UI_number.ToString()), "_Selected");
     unt.Connect("_deselected_to_UI", GetNode("../UnitUI_P" + player_number.ToString() + "_" + UI_number.ToString()), "_Deselected");
     unt.Connect("_stat_change", GetNode("../UnitUI_P" + player_number.ToString() + "_" + UI_number.ToString()), "_Stat_change");
 }