コード例 #1
0
ファイル: PrepareGameState.cs プロジェクト: Jon50/Invaders
        public override void EnterState(GameManager owner)
        {
            _aliensController = ServiceLocator.Resolve <AliensController>();
            _statePreparators = ServiceLocator.ResolveList <StatePreparator>();
            _audioManager     = ServiceLocator.Resolve <AudioManager>();

            if (_aliensController.IsNull())
            {
                return;
            }
            if (_statePreparators.Count == 0)
            {
                return;
            }

            foreach (var sp in _statePreparators)
            {
                sp.DisableComponents();
            }

            Prepare(owner);
        }
コード例 #2
0
 private void Initialize() => _aliensController = GetComponent <AliensController>();