コード例 #1
0
        private void Awake()
        {
            _audioSource    = GetComponent <AudioSource>();
            _unitPath       = GetComponent <EnemyUnitPath>();
            _combat         = GetComponentInChildren <UnitCombat>();
            _animator       = GetComponentInChildren <Animator>();
            _light2D        = GetComponentInChildren <Light2D>();
            _musicBGManager = FindObjectOfType <MusicBGManager>();

            _combat.DeathEvent += Dead;
        }
コード例 #2
0
ファイル: Player.cs プロジェクト: rollinorama/1jam-uno
        private void Awake()
        {
            _gameManager = FindObjectOfType <GameManager>();

            _move      = GetComponent <PlayerMovement>();
            _combat    = GetComponentInChildren <UnitCombat>();
            _grab      = GetComponent <UnitGrab>();
            _noise     = GetComponentInChildren <UnitNoise>();
            _animator  = GetComponentInChildren <Animator>();
            _teleport  = GetComponent <UnitTeleport>();
            _cellPhone = FindObjectOfType <CellPhone>();

            _cellPhone.RingEvent += MakeNoise;
            _combat.DeathEvent   += Dead;
        }
コード例 #3
0
 private void Awake()
 {
     _light2D     = GetComponentInChildren <Light2D>();
     _fieldOfView = GetComponentInChildren <UnitFieldOfView>();
     _combat      = GetComponent <UnitCombat>();
 }