Script Do Simulador De Lavagem De Pressao Apr 2026
UpdateUI() // Refresh HUD PlaySound("pump_idle_loop") This is the main loop triggered every frame while the player holds the trigger.
// Soap effect: reduces dirt resistance for a few seconds if active_nozzle == NozzleType.SOAP: hit_surface.temp_dirt_resistance *= 0.7
return final_power Prevents infinite spraying and simulates engine wear.
// Overheat logic if current_temp >= 100.0: is_overheated = true ForceStopSpray() PlaySound("overheat_alarm") ShowMessage("Machine Overheated! Wait to cool down.") Script do Simulador de Lavagem de Pressao
if IsSpraying(): current_temp += heat_generated else: current_temp -= cooling
float final_power = base * nozzle_mod * temp_mod
function IsFullyClean(): return GetAverageDirt() < 0.01 To reward continuous cleaning without stopping. Wait to cool down
// --- Cleaning System --- float dirt_resistance = 0.0 to 1.0 (0 = clean, 1 = muddy) float heat_effectiveness = 0.5 // Hotter water cleans grease faster
// 5. Thermal buildup UpdateTemperature(delta_time, cleaning_power) function CalculateCleaningPower(): // Base PSI * Nozzle Modifier * Temperature Bonus * Impact distance float base = current_psi
// --- UI & Progression --- int player_score = 0 int current_level = 1 float combo_timer = 0.0 // Timer for consecutive cleaning bool is_overheated = false Executed when the level loads or the simulator resets. function InitializeSimulator(): current_psi = 300
function InitializeSimulator(): current_psi = 300.0 // Start with medium pressure current_temp = 20.0 // Cold water active_nozzle = NozzleType.GREEN fuel_level = 100.0 soap_level = 100.0 is_overheated = false combo_timer = 0.0 // Reset all dirt decals on surfaces for each surface in scene_surfaces: surface.dirt_amount = GetInitialDirtByLevel(current_level)
if is_overheated and current_temp <= 70.0: is_overheated = false ShowMessage("Machine cooled. Ready to spray.") function RefillResources(): // Called at refill stations fuel_level = 100.0 soap_level = 100.0 current_temp = 40.0 // Reset to warm but not hot PlaySound("refill_click") Each cleanable object (wall, floor, vehicle) follows this interface.
// 3. Apply cleaning to surface float dirt_removed = hit_surface.Clean(cleaning_power, hit_point, spray_angle)