@@ -17,27 +17,14 @@ pub mod prelude {
17
17
}
18
18
19
19
use bevy_app:: prelude:: * ;
20
- use bevy_ecs:: {
21
- entity:: Entity ,
22
- schedule:: { ExclusiveSystemDescriptorCoercion , SystemLabel } ,
23
- system:: { IntoExclusiveSystem , ResMut } ,
24
- } ;
25
- use bevy_time:: { FixedTimesteps , Time , Timer } ;
20
+ use bevy_ecs:: entity:: Entity ;
26
21
use bevy_utils:: HashSet ;
27
22
use std:: ops:: Range ;
28
23
29
24
/// Adds core functionality to Apps.
30
25
#[ derive( Default ) ]
31
26
pub struct CorePlugin ;
32
27
33
- /// A `SystemLabel` enum for ordering systems relative to core Bevy systems.
34
- #[ derive( Debug , PartialEq , Eq , Clone , Hash , SystemLabel ) ]
35
- pub enum CoreSystem {
36
- /// Updates the elapsed time. Any system that interacts with [Time] component should run after
37
- /// this.
38
- Time ,
39
- }
40
-
41
28
impl Plugin for CorePlugin {
42
29
fn build ( & self , app : & mut App ) {
43
30
// Setup the default bevy task pools
@@ -47,30 +34,17 @@ impl Plugin for CorePlugin {
47
34
. unwrap_or_default ( )
48
35
. create_default_pools ( & mut app. world ) ;
49
36
50
- app. init_resource :: < Time > ( )
51
- . init_resource :: < FixedTimesteps > ( )
52
- . register_type :: < HashSet < String > > ( )
37
+ app. register_type :: < HashSet < String > > ( )
53
38
. register_type :: < Option < String > > ( )
54
39
. register_type :: < Entity > ( )
55
40
. register_type :: < Name > ( )
56
- . register_type :: < Range < f32 > > ( )
57
- . register_type :: < Timer > ( )
58
- // time system is added as an "exclusive system" to ensure it runs before other systems
59
- // in CoreStage::First
60
- . add_system_to_stage (
61
- CoreStage :: First ,
62
- time_system. exclusive_system ( ) . label ( CoreSystem :: Time ) ,
63
- ) ;
41
+ . register_type :: < Range < f32 > > ( ) ;
64
42
65
43
register_rust_types ( app) ;
66
44
register_math_types ( app) ;
67
45
}
68
46
}
69
47
70
- fn time_system ( mut time : ResMut < Time > ) {
71
- time. update ( ) ;
72
- }
73
-
74
48
fn register_rust_types ( app : & mut App ) {
75
49
app. register_type :: < bool > ( )
76
50
. register_type :: < u8 > ( )
0 commit comments