private void Awake() { _spawnerNotifier = GetComponent <SpawnNotifier>(); _spawnerNotifier.onBodySpawnedEvent += AddTargetBody; var bodies = GameObject.FindObjectsOfType <KeplerOrbitMover>(); foreach (var item in bodies) { AddTargetBody(item); } }
private void Awake() { _spawnNotifier = GetComponent <SpawnNotifier>(); _spawnNotifier.onBodySpawnedEvent += OnBodySpawned; var instances = GameObject.FindObjectsOfType <KeplerOrbitMover>(); foreach (var item in instances) { AddBody(item); } _epochDate = new DateTime(_epochYear, _epochMonth, _epochDay, _epochHour, _epochMinute, 0, DateTimeKind.Utc); }
private void Start() { _spawnNotifier = GetComponent <SpawnNotifier>(); switch (LoadingDataSource) { case LoadingType.Json: SpawnFromJsonData(); break; case LoadingType.Scene: SpawnFromSceneData(); break; } }