Glowing fireballs, no gravity

This commit is contained in:
timokoesters 2020-03-23 13:55:52 +01:00
parent 5194cef03a
commit 0eebf945fe
4 changed files with 9 additions and 9 deletions

View File

@ -123,15 +123,15 @@ impl ToolData {
CastFireball {
projectile: Projectile {
hit_ground: vec![
projectile::Effect::Explode { power: 5.0 },
projectile::Effect::Explode { power: 1.5 },
projectile::Effect::Vanish,
],
hit_wall: vec![
projectile::Effect::Explode { power: 5.0 },
projectile::Effect::Explode { power: 1.5 },
projectile::Effect::Vanish,
],
hit_entity: vec![
projectile::Effect::Explode { power: 5.0 },
projectile::Effect::Explode { power: 1.5 },
projectile::Effect::Vanish,
],
time_left: Duration::from_secs(20),

View File

@ -1,5 +1,5 @@
use crate::{
comp::{Body, CharacterState, Gravity, Projectile, StateUpdate},
comp::{Body, CharacterState, LightEmitter, Projectile, StateUpdate},
event::ServerEvent,
states::utils::*,
sys::character_behavior::*,
@ -46,9 +46,12 @@ impl CharacterBehavior for Data {
entity: data.entity,
dir: data.inputs.look_dir,
body: self.projectile_body,
light: None,
light: Some(LightEmitter {
col: (0.0, 1.0, 0.3).into(),
..Default::default()
}),
projectile,
gravity: Some(Gravity(0.1)),
gravity: None,
});
update.character = CharacterState::CastFireball(Data {

View File

@ -5,7 +5,6 @@ use crate::{
sys::{character_behavior::JoinData, phys::GRAVITY},
util::safe_slerp,
};
use std::time::Duration;
use vek::vec::Vec2;
pub const MOVEMENT_THRESHOLD_VEL: f32 = 3.0;

View File

@ -10,8 +10,6 @@ use specs::{Entities, Join, Read, ReadStorage, System, WriteStorage};
use vek::*;
const BLOCK_EFFICIENCY: f32 = 0.9;
const ATTACK_RANGE: f32 = 3.5;
const BLOCK_ANGLE: f32 = 180.0;
/// This system is responsible for handling accepted inputs like moving or