private void MessageForTraining(FirePlace main) { if (!trainingSuspendedTarget) { suspendedTargetTimerCount += 1; if (suspendedTargetTimerCount > Constants.TRAINING_TIMEOUT_BEFORE_FIRST_INFO) { main.SchoolMessage(Constants.SUSPENDED_TARGET_INFORMATION, Brushes.SeaGreen, ref trainingSuspendedTarget); } } if (!trainingTurgetTug && suspendedTargetDowned) { main.SchoolMessage(Constants.TRAINING_TUG_INFORMATION, Brushes.BlueViolet, ref trainingTurgetTug); } if (!trainingTurgetPlane && (allAircraftsInGame > Constants.TRAINING_IL28_AT_THE_START)) { main.SchoolMessage(Constants.TRAINING_PLANE_INFORMATION, Brushes.Crimson, ref trainingTurgetPlane); } if (!trainingTurgetDrone && (allAircraftsInGame > Constants.TRAINING_M16K_AT_THE_START)) { main.SchoolMessage(Constants.TRAINING_DRONE_INFORMATION, Brushes.LightSeaGreen, ref trainingTurgetDrone); } }
private void MessagesForSchool(FirePlace main) { if ((allAircraftsInGame > Constants.SCHOOL_AIRLINER_AT_THE_START) && !schoolMixAlready) { main.SchoolMessage(Constants.MIX_INFORMATION, Brushes.Gray, ref schoolMixAlready); } else if (airliner && !schoolAirlinerAlready) { main.SchoolMessage(Constants.AIRLINER_INFORMATION, Brushes.Blue, ref schoolAirlinerAlready); } else if (friend && !schoolFriendAlready) { main.SchoolMessage(Constants.FRIEND_INFORMATION, Brushes.Green, ref schoolFriendAlready); } else if (!schoolEnemyAlready) { main.SchoolMessage(Constants.ENEMY_INFORMATION, Brushes.Red, ref schoolEnemyAlready); } }
public static void HeatingOfGuns(bool shooting) { if (Functions.TossACoin()) { return; } degreeOfHeatingGunBurrels += (shooting ? 1 : -1); int currentDegreeOfHeatinMin = degreeOfHeatingGunBurrelsMin; if (Weather.currentWeather == Weather.WeatherTypes.rain) { currentDegreeOfHeatinMin += Constants.HEATING_IN_RAIN; } else if (Weather.currentWeather == Weather.WeatherTypes.snow) { currentDegreeOfHeatinMin += Constants.HEATING_UNDER_SNOW; } if (degreeOfHeatingGunBurrels < currentDegreeOfHeatinMin) { degreeOfHeatingGunBurrels = currentDegreeOfHeatinMin; } else if (degreeOfHeatingGunBurrels > Constants.GUNS_OVERHEATING) { reheatingGunBurrels = true; fire = false; } else if (degreeOfHeatingGunBurrels < Constants.GUNS_HEAT_UP) { reheatingGunBurrels = false; } if (Shilka.school && !schoolHeating && (degreeOfHeatingGunBurrels > Constants.GUNS_HEAT_UP)) { schoolHeating = true; _ = Application.Current.Dispatcher.BeginInvoke(new ThreadStart(delegate { FirePlace main = (FirePlace)Application.Current.MainWindow; bool _ = false; main.SchoolMessage(Constants.HEATING_INFORMATION, Brushes.Orange, ref _); })); } }