From 3165cfd7545b0eb0a6fe810b779577e42a8922ab Mon Sep 17 00:00:00 2001 From: yuni Date: Tue, 9 Jul 2024 02:28:55 +0200 Subject: [PATCH] bevy14: upgrade color palette usage --- src/chat.rs | 5 +++-- src/game.rs | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/chat.rs b/src/chat.rs index 8d5be8a..19c3083 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -12,6 +12,7 @@ // and manages the flow of conversations. use crate::prelude::*; +use bevy::color::palettes::css; use bevy::prelude::*; use bevy_xpbd_3d::prelude::*; use serde::Deserialize; @@ -926,14 +927,14 @@ pub fn handle_chat_scripts( } ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::WakeUp)); ew_effect.send(visual::SpawnEffectEvent { - class: visual::Effects::FadeIn(Color::CYAN), + class: visual::Effects::FadeIn(css::AQUA.into()), duration: 1.0, }); } } "cryofadeout" => { ew_effect.send(visual::SpawnEffectEvent { - class: visual::Effects::FadeOut(Color::CYAN), + class: visual::Effects::FadeOut(css::AQUA.into()), duration: 5.1, }); } diff --git a/src/game.rs b/src/game.rs index 6b7f413..c5a453c 100644 --- a/src/game.rs +++ b/src/game.rs @@ -11,6 +11,7 @@ // This module handles player input, and coordinates interplay between other modules use crate::prelude::*; +use bevy::color::palettes::css; use bevy::pbr::ExtendedMaterial; use bevy::prelude::*; use bevy::scene::SceneInstance; @@ -304,21 +305,21 @@ fn handle_player_death( actor::DamageType::Trauma => { settings.death_cause = "Trauma".to_string(); ew_effect.send(visual::SpawnEffectEvent { - class: visual::Effects::FadeIn(Color::MAROON), + class: visual::Effects::FadeIn(css::MAROON.into()), duration: 1.0, }); } actor::DamageType::GForce => { settings.death_cause = "Trauma from excessive g forces".to_string(); ew_effect.send(visual::SpawnEffectEvent { - class: visual::Effects::FadeIn(Color::MAROON), + class: visual::Effects::FadeIn(css::MAROON.into()), duration: 1.0, }); } _ => { settings.death_cause = "Unknown".to_string(); ew_effect.send(visual::SpawnEffectEvent { - class: visual::Effects::FadeIn(Color::MAROON), + class: visual::Effects::FadeIn(css::MAROON.into()), duration: 1.0, }); }