mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Ran fmt
Former-commit-id: 6acf43d8e4c446b3f50a673179b8df20d6da648c
This commit is contained in:
parent
30c2972852
commit
cf22cb99e7
@ -12,10 +12,7 @@ use crate::{
|
||||
pub struct Sys;
|
||||
|
||||
impl<'a> System<'a> for Sys {
|
||||
type SystemData = (
|
||||
Read<'a, DeltaTime>,
|
||||
WriteStorage<'a, AnimationHistory>,
|
||||
);
|
||||
type SystemData = (Read<'a, DeltaTime>, WriteStorage<'a, AnimationHistory>);
|
||||
|
||||
fn run(&mut self, (dt, mut anim_history): Self::SystemData) {
|
||||
for (mut anim_history) in (&mut anim_history).join() {
|
||||
|
@ -1,7 +1,7 @@
|
||||
pub mod agent;
|
||||
pub mod anim;
|
||||
pub mod control;
|
||||
pub mod phys;
|
||||
pub mod anim;
|
||||
|
||||
// External
|
||||
use specs::DispatcherBuilder;
|
||||
|
@ -29,8 +29,16 @@ impl Animation for IdleAnimation {
|
||||
let wave_dip = (wave_slow.abs() - 0.5).abs();
|
||||
|
||||
let head_look = Vec2::new(
|
||||
((global_time + anim_time) as f32 / 5.0).floor().mul(7331.0).sin() * 0.5,
|
||||
((global_time + anim_time) as f32 / 5.0).floor().mul(1337.0).sin() * 0.25,
|
||||
((global_time + anim_time) as f32 / 5.0)
|
||||
.floor()
|
||||
.mul(7331.0)
|
||||
.sin()
|
||||
* 0.5,
|
||||
((global_time + anim_time) as f32 / 5.0)
|
||||
.floor()
|
||||
.mul(1337.0)
|
||||
.sin()
|
||||
* 0.25,
|
||||
);
|
||||
next.head.offset = Vec3::new(5.5, 2.0, 11.5 + waveultra_slow * 0.4);
|
||||
next.head.ori = Quaternion::rotation_z(head_look.x) * Quaternion::rotation_x(head_look.y);
|
||||
|
Loading…
Reference in New Issue
Block a user