public PlayerManager() { score = 0; //scoreText = new GUIText(); //scoreText.text = "Score: " + score; _cistern = new Cistern(); _plant = new Plant(); }
//Проверяем подключены ли цистрены с нужным топливом bool CheckFuelType() { foreach (var cistern in cisternsArray) { if (cistern) { if (cistern.fuelType == connectedCar.carCistern.fuelType) { currentCistern = cistern; return(true); } } } Debug.Log("К колонке не подключены цистерны с подходящим топливом"); currentCistern = null; CarOut(); return(false); }