예제 #1
0
 public void Awaken()
 {
     MainCamera.Instance.SetCameraScale(7.2f, 1f);
     SoundManager.Instance.Play("TheKing_Wonchul_BGM", 1, true);
     _ShoutingLong.Action();
     StartCoroutine(_PatternTimer = PatternTimer());
 }
예제 #2
0
    protected override void Awake()
    {
        base.Awake();
        _AnimControlKey    = _Animator.GetParameter(0).nameHash;
        _CanActionPatterns = new List <BossPattern>(_Patterns.Length);

        _RangeCollider.OnTriggerAction += (Collider2D other, bool isEnter) =>
        {
            if (!other.CompareTag("Player"))
            {
                return;
            }

            if (_HasPlayer = isEnter)
            {
                for (int i = 0; i < _Patterns.Length; i++)
                {
                    _Patterns[i].Notify_PlayerEnter();
                }
            }
            else
            {
                for (int i = 0; i < _Patterns.Length; i++)
                {
                    _Patterns[i].Notify_PlayerExit();
                }
            }
        };
        // Special Pattern Init
        {
            _Appears.Init();
            _Groggy.Init();
            _Death.Init();
            _ShoutingLong.Init();
        }
        for (int i = 0; i < _Patterns.Length; i++)
        {
            _Patterns[i].Init();
        }
        _Appears.Action();

        _OnSuperArmorBreak += () =>
        {
            _Groggy.Action();
        };
        _OnDeath += () =>
        {
            StopAllCoroutines();
            _Death.Action();
        };
    }