|
1 | 1 | using UnityEngine; |
2 | 2 | using System.Collections.Generic; |
3 | 3 |
|
4 | | -public class EgoSystem<C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12> : IEgoSystem |
| 4 | +public class EgoSystem<C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12> : IEgoSystem |
5 | 5 | where C1 : Component |
6 | 6 | where C2 : Component |
7 | 7 | where C3 : Component |
@@ -337,11 +337,36 @@ protected void RemoveBundle( EgoComponent egoComponent ) |
337 | 337 | _bundles.Remove( egoComponent ); |
338 | 338 | } |
339 | 339 |
|
340 | | - public virtual void Start() { } |
| 340 | + public virtual void Start() |
| 341 | + { |
| 342 | + foreach( var bundle in bundles ) |
| 343 | + { |
| 344 | + Start( bundle.egoComponent, bundle.component1, bundle.component2, bundle.component3, bundle.component4, bundle.component5, bundle.component6, bundle.component7, bundle.component8, bundle.component9, bundle.component10, bundle.component11, bundle.component12 ); |
| 345 | + } |
| 346 | + } |
| 347 | + |
| 348 | + public virtual void Update() |
| 349 | + { |
| 350 | + foreach( var bundle in bundles ) |
| 351 | + { |
| 352 | + Update( bundle.egoComponent, bundle.component1, bundle.component2, bundle.component3, bundle.component4, bundle.component5, bundle.component6, bundle.component7, bundle.component8, bundle.component9, bundle.component10, bundle.component11, bundle.component12 ); |
| 353 | + } |
| 354 | + } |
| 355 | + |
| 356 | + public virtual void FixedUpdate() |
| 357 | + { |
| 358 | + foreach( var bundle in bundles ) |
| 359 | + { |
| 360 | + FixedUpdate( bundle.egoComponent, bundle.component1, bundle.component2, bundle.component3, bundle.component4, bundle.component5, bundle.component6, bundle.component7, bundle.component8, bundle.component9, bundle.component10, bundle.component11, bundle.component12 ); |
| 361 | + } |
| 362 | + } |
| 363 | + |
| 364 | + public virtual void Start( EgoComponent egoComponent, C1 component1, C2 component2, C3 component3, C4 component4, C5 component5, C6 component6, C7 component7, C8 component8, C9 component9, C10 component10, C11 component11, C12 component12 ) { } |
| 365 | + |
| 366 | + public virtual void Update( EgoComponent egoComponent, C1 component1, C2 component2, C3 component3, C4 component4, C5 component5, C6 component6, C7 component7, C8 component8, C9 component9, C10 component10, C11 component11, C12 component12 ) { } |
341 | 367 |
|
342 | | - public virtual void Update() { } |
| 368 | + public virtual void FixedUpdate( EgoComponent egoComponent, C1 component1, C2 component2, C3 component3, C4 component4, C5 component5, C6 component6, C7 component7, C8 component8, C9 component9, C10 component10, C11 component11, C12 component12 ) { } |
343 | 369 |
|
344 | | - public virtual void FixedUpdate() { } |
345 | 370 |
|
346 | 371 | // |
347 | 372 | // Event Handlers |
|
0 commit comments