Esempio n. 1
0
 void Awake()
 {
     if (_mainCanvas == null)
     {
         _mainCanvas = FindObjectOfType <MainCanvas>();
     }
 }
Esempio n. 2
0
 void Awake()
 {
     if (_board == null)
     {
         _board = FindObjectOfType <Board>();
     }
     if (_gameManager == null)
     {
         _gameManager = FindObjectOfType <GameManager>();
     }
     if (_canvas == null)
     {
         _canvas = _gameManager.GetComponent <UiManager>().canvas.GetComponent <MainCanvas>();
     }
     if (_player == null)
     {
         _player = GetComponent <Player>();
     }
     if (_cameraController == null)
     {
         _cameraController = FindObjectOfType <CameraController>();
     }
     if (_animator == null)
     {
         _animator = GetComponent <Animator>();
     }
 }
Esempio n. 3
0
 void Awake()
 {
     if (_mainCanvas == null)
     {
         _mainCanvas = FindObjectOfType <MainCanvas>();
     }
     if (common == null)
     {
         common = GetComponent <Common>();
     }
     if (round == null)
     {
         round = transform.Find("Round");
     }
     if (_playerTransform == null)
     {
         _playerTransform = transform.Find("PlayerUnit");
     }
     if (_enemyTransform == null)
     {
         _enemyTransform = transform.Find("EnemyUnit");
     }
     if (close == null)
     {
         close = transform.Find("Close");
     }
     if (_cameraController == null)
     {
         _cameraController = FindObjectOfType <CameraController>();
     }
     if (_board == null)
     {
         _board = FindObjectOfType <Board>();
     }
     _playerList = new List <Player>(FindObjectsOfType <Player>());
     MakeActivePlayerList(_playerList, activePlayerList);
     _enemyList = new List <Enemy>(FindObjectsOfType <Enemy>());
     if (enemyAi == null)
     {
         enemyAi = FindObjectOfType <EnemyAi>();
     }
     MakeActiveEnemyList(_enemyList, activeEnemyList);
     _weaponList = new List <Weapon>(FindObjectsOfType <Weapon>());
     if (effectManager == null)
     {
         effectManager = GetComponent <EffectManager>();
     }
     if (areaCheck == null)
     {
         areaCheck = GetComponent <AreaCheck>();
     }
     if (milestone == null)
     {
         milestone = transform.Find("Milestone").gameObject;
     }
 }
Esempio n. 4
0
 void Awake()
 {
     if (_mainCanvas == null)
     {
         _mainCanvas = FindObjectOfType <MainCanvas>();
     }
     if (_dialogManager == null)
     {
         _dialogManager = FindObjectOfType <DialogueManager>();
     }
 }
Esempio n. 5
0
        void Awake()
        {
            if (_currentEnemy == null)
            {
                _currentEnemy = GetComponent <Enemy>();
            }
            if (_board == null)
            {
                _board = FindObjectOfType <Board>();
            }
            if (_cameraController == null)
            {
                _cameraController = FindObjectOfType <CameraController>();
            }
            currentVigor = baseVigor;
            currentHp    = baseHp;
            if (_gameManager == null)
            {
                _gameManager = FindObjectOfType <GameManager>();
            }
            if (_soundManager == null)
            {
                _soundManager = FindObjectOfType <SoundManager>();
            }
            if (playerMove == null)
            {
                playerMove = GetComponent <PlayerMove>();
            }
            if (animator == null)
            {
                animator = GetComponent <Animator>();
            }
            if (_playerUi == null)
            {
                _playerUi = _gameManager.playerUi;
            }
            if (_canvas == null)
            {
                _canvas = _gameManager.GetComponent <UiManager>().canvas.GetComponent <MainCanvas>();
            }

            if (_utility == null)
            {
                _utility = transform.Find("Utility");
            }
            if (moveBaseArea == null)
            {
                moveBaseArea = _utility.Find("MoveBaseArea").gameObject;
            }
            if (moveDoubleArea == null)
            {
                moveDoubleArea = _utility.Find("MoveDoubleArea").gameObject;
            }
            if (moveDoubleBlock == null)
            {
                moveBaseBlock = _utility.Find("MoveBaseBlock").gameObject;
            }
            if (moveDoubleBlock == null)
            {
                moveDoubleBlock = _utility.Find("MoveDoubleBlock").gameObject;
            }

            if (round == null)
            {
                round = _utility.Find("Round").gameObject;
            }
            if (rangeArea == null)
            {
                rangeArea = _utility.Find("DoubleArea").gameObject;
            }

            if (_model == null)
            {
                _model = transform.Find("Model");
            }
            if (_tail == null)
            {
                _tail = _utility.Find("Tail").gameObject;
            }
        }