@@ -47,32 +47,22 @@ pub(super) fn plugin(app: &mut App) {
4747 clocks : vec ! [
4848 ClockData {
4949 time_left: 0.0 ,
50- hour_start_rotation: 0.0 ,
51- minute_start_rotation: 1.0 ,
5250 audio: SfxKey :: Ticking2 ,
5351 } ,
5452 ClockData {
5553 time_left: 0.0 ,
56- hour_start_rotation: 2.0 ,
57- minute_start_rotation: 3.0 ,
5854 audio: SfxKey :: Ticking3 ,
5955 } ,
6056 ClockData {
6157 time_left: 0.0 ,
62- hour_start_rotation: 4.0 ,
63- minute_start_rotation: 5.0 ,
6458 audio: SfxKey :: Ticking4 ,
6559 } ,
6660 ClockData {
6761 time_left: 0.0 ,
68- hour_start_rotation: 6.0 ,
69- minute_start_rotation: 7.0 ,
7062 audio: SfxKey :: Ticking5 ,
7163 } ,
7264 ClockData {
7365 time_left: 0.0 ,
74- hour_start_rotation: 8.0 ,
75- minute_start_rotation: 9.0 ,
7666 audio: SfxKey :: Ticking6 ,
7767 } ,
7868 ] ,
@@ -133,8 +123,6 @@ pub struct Clocks {
133123
134124pub struct ClockData {
135125 pub time_left : f32 ,
136- pub hour_start_rotation : f32 ,
137- pub minute_start_rotation : f32 ,
138126 pub audio : SfxKey ,
139127}
140128
@@ -478,17 +466,6 @@ fn spawn_interact_clock(
478466 let translation = positions. clock_spawn ;
479467 let clock_data = & clock_data. clocks [ clock_count] ;
480468
481- let mut hour_transform = Transform {
482- translation : Vec3 :: new ( 0.0 , 0.0 , 300.0 ) ,
483- ..default ( )
484- } ;
485- // hour_transform.rotate_z(clock_data.hour_start_rotation);
486-
487- let mut minute_transform = Transform {
488- translation : Vec3 :: new ( 0.0 , 0.0 , 400.0 ) ,
489- ..default ( )
490- } ;
491- // minute_transform.rotate_z(clock_data.minute_start_rotation);
492469 commands
493470 . spawn ( (
494471 Name :: new ( "Clock" ) ,
@@ -517,7 +494,10 @@ fn spawn_interact_clock(
517494 parent. spawn ( (
518495 SpriteBundle {
519496 texture : image_handles[ & ImageKey :: ClockHour ] . clone_weak ( ) ,
520- transform : hour_transform,
497+ transform : Transform {
498+ translation : Vec3 :: new ( 0.0 , 0.0 , 300.0 ) ,
499+ ..default ( )
500+ } ,
521501 sprite : Sprite {
522502 custom_size : Some ( Vec2 :: new ( 90.0 , 90.0 ) ) ,
523503 ..default ( )
@@ -530,7 +510,10 @@ fn spawn_interact_clock(
530510 parent. spawn ( (
531511 SpriteBundle {
532512 texture : image_handles[ & ImageKey :: ClockMinute ] . clone_weak ( ) ,
533- transform : minute_transform,
513+ transform : Transform {
514+ translation : Vec3 :: new ( 0.0 , 0.0 , 400.0 ) ,
515+ ..default ( )
516+ } ,
534517 sprite : Sprite {
535518 custom_size : Some ( Vec2 :: new ( 90.0 , 90.0 ) ) ,
536519 ..default ( )
0 commit comments