6-19. 15조 Monster

keubung·2024년 12월 20일

1. Monster

1. Boss

  • Material 수정
    • 새로운 Material(MimicMat) 생성 후 Sphere 부분과 Leg 부분의 Material 통일
  • 죽음 판정
    • 콜라이더 내의 일정 거리 안에 있을 시 죽음
        private void OnTriggerEnter(Collider other)
      {
          if (other.CompareTag("Player"))
          {
              coroutine = StartCoroutine(CoTargetDistance());
          }
      }
      
      void OnTriggerExit(Collider other)
      {
          if (other.CompareTag("Player"))
          {
              if (coroutine != null)
              {
                  StopCoroutine(coroutine);
              }
          }
      }
      
      IEnumerator CoTargetDistance()
      {
          while (true)
          {
              if(targetDistance <= attackDistance)
              {
                  EventManager.Dispatch(GameEventType.GameOver, false);
                  break;
              }
              yield return null;
          }
      }

+ Boss Asset(Mimic) 최적화

2. Ethereon(StunMonster), FleeMonster

  • 죽음 판정
    private void OnCollisionEnter(Collision collision)
    {
        if (collision.gameObject.CompareTag("Player"))
        {
            EventManager.Dispatch(GameEventType.GameOver, false);
        }
    }
profile
김나영(Unity_6기)

0개의 댓글