コード例 #1
0
        private void Awake()
        {
            _spawnerNotifier = GetComponent <SpawnNotifier>();
            _spawnerNotifier.onBodySpawnedEvent += AddTargetBody;

            var bodies = GameObject.FindObjectsOfType <KeplerOrbitMover>();

            foreach (var item in bodies)
            {
                AddTargetBody(item);
            }
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        private void Start()
        {
            _spawnNotifier = GetComponent <SpawnNotifier>();
            switch (LoadingDataSource)
            {
            case LoadingType.Json:
                SpawnFromJsonData();
                break;

            case LoadingType.Scene:
                SpawnFromSceneData();
                break;
            }
        }