55using System ;
66
77namespace Lockstep
8- {
9- public abstract class BehaviourHelper : MonoBehaviour , IBehaviourHelper
10- {
11-
12- public BehaviourHelper ( )
13- {
14-
15- }
16-
17- private static FastList < BehaviourHelper > _behaviourHelpers = new FastList < BehaviourHelper > ( ) ;
18- private static HashSet < Type > _createdTypes = new HashSet < Type > ( ) ;
19-
20- public static FastList < BehaviourHelper > BehaviourHelpers { get { return _behaviourHelpers ; } }
21- public static HashSet < Type > CreatedTypes { get { return _createdTypes ; } }
22-
23- public ushort CachedListenInput { get ; private set ; }
24-
25- public virtual ushort ListenInput
26- {
27- get { return 0 ; }
28- }
29-
30-
31- public void Initialize ( )
32- {
33- CachedListenInput = ListenInput ;
34- OnInitialize ( ) ;
35- }
36-
37-
38- protected virtual void OnInitialize ( )
39- {
40- }
41-
42- public void LateInitialize ( )
43- {
44- this . OnLateInitialize ( ) ;
45- }
46-
47- protected virtual void OnLateInitialize ( )
48- {
49-
50- }
51-
52- public void Simulate ( )
53- {
54- OnSimulate ( ) ;
55- }
56-
57- protected virtual void OnSimulate ( )
58- {
59- }
60-
61- public void LateSimulate ( )
62- {
63- OnLateSimulate ( ) ;
64- }
65-
66- protected virtual void OnLateSimulate ( )
67- {
68-
69- }
8+ {
9+ public abstract class BehaviourHelper : MonoBehaviour , IBehaviourHelper
10+ {
11+
12+ public BehaviourHelper ( )
13+ {
14+
15+ }
16+
17+ private static FastList < BehaviourHelper > _behaviourHelpers = new FastList < BehaviourHelper > ( ) ;
18+ private static HashSet < Type > _createdTypes = new HashSet < Type > ( ) ;
19+
20+ public static FastList < BehaviourHelper > BehaviourHelpers { get { return _behaviourHelpers ; } }
21+ public static HashSet < Type > CreatedTypes { get { return _createdTypes ; } }
22+
23+ public ushort CachedListenInput { get ; private set ; }
24+
25+ public virtual ushort ListenInput {
26+ get { return 0 ; }
27+ }
28+
29+
30+ public void Initialize ( )
31+ {
32+ OnInitialize ( ) ;
33+ }
7034
71- public void Visualize ( )
72- {
73- OnVisualize ( ) ;
74- }
35+ public void EarlyInitialize ( )
36+ {
37+ CachedListenInput = ListenInput ;
7538
76- protected virtual void OnVisualize ( )
77- {
78- }
79- public void LateVisualize ( ) {
80- OnLateVisualize ( ) ;
39+ OnEarlyInitialize ( ) ;
8140}
82- protected virtual void OnLateVisualize ( ) {
83-
41+ protected virtual void OnEarlyInitialize ( )
42+ {
43+
44+ }
45+
46+ protected virtual void OnInitialize ( )
47+ {
48+ }
49+
50+ public void LateInitialize ( )
51+ {
52+ this . OnLateInitialize ( ) ;
53+ }
54+
55+ protected virtual void OnLateInitialize ( )
56+ {
57+
58+ }
59+
60+ public void Simulate ( )
61+ {
62+ OnSimulate ( ) ;
63+ }
64+
65+ protected virtual void OnSimulate ( )
66+ {
67+ }
68+
69+ public void LateSimulate ( )
70+ {
71+ OnLateSimulate ( ) ;
72+ }
73+
74+ protected virtual void OnLateSimulate ( )
75+ {
76+
77+ }
78+
79+ public void Visualize ( )
80+ {
81+ OnVisualize ( ) ;
82+ }
83+
84+ protected virtual void OnVisualize ( )
85+ {
8486}
85-
86- public void GlobalExecute ( Command com )
87- {
88- OnExecute ( com ) ;
89- }
90-
91- protected virtual void OnExecute ( Command com )
92- {
93- }
94-
95- public void RawExecute ( Command com )
96- {
97- OnRawExecute ( com ) ;
98- }
99-
100- protected virtual void OnRawExecute ( Command com )
101- {
102-
103- }
104-
105- public void GameStart ( )
106- {
107- OnGameStart ( ) ;
108- }
109-
110- protected virtual void OnGameStart ( )
111- {
112-
113- }
114-
115- public void Deactivate ( )
116- {
117- OnDeactivate ( ) ;
118- }
119-
120- protected virtual void OnDeactivate ( )
121- {
122-
123- }
124- }
87+ public void LateVisualize ( )
88+ {
89+ OnLateVisualize ( ) ;
90+ }
91+ protected virtual void OnLateVisualize ( )
92+ {
93+
94+ }
95+
96+ public void GlobalExecute ( Command com )
97+ {
98+ OnExecute ( com ) ;
99+ }
100+
101+ protected virtual void OnExecute ( Command com )
102+ {
103+ }
104+
105+ public void RawExecute ( Command com )
106+ {
107+ OnRawExecute ( com ) ;
108+ }
109+
110+ protected virtual void OnRawExecute ( Command com )
111+ {
112+
113+ }
114+
115+ public void GameStart ( )
116+ {
117+ OnGameStart ( ) ;
118+ }
119+
120+ protected virtual void OnGameStart ( )
121+ {
122+
123+ }
124+
125+ public void Deactivate ( )
126+ {
127+ OnDeactivate ( ) ;
128+ }
129+
130+ protected virtual void OnDeactivate ( )
131+ {
132+
133+ }
134+ }
125135}
0 commit comments