Exemplo n.º 1
0
    protected override void Awake()
    {
        base.Awake();
        ES = (EnemyStat)BaseStat;

        fieldOfView = GetComponent <FieldOfView>();
        CA          = GetComponent <CharacterAudios>();
        moveAgent   = GetComponent <MoveAgent>();
        animator    = GetComponent <Animator>();
        audioPlayer = GetComponent <AudioSource>();

        fireDistance  = BulletCtrl._bulletMaxDistance;
        traceDistance = fieldOfView.viewRadius;         // 추적 거리를 시야범위로 초기화
    }
Exemplo n.º 2
0
    protected override void Awake()
    {
        base.Awake();
        PS = (PlayerStat)BaseStat;

        CA = GetComponent <CharacterAudios>();
        playerAudioPlayer = GetComponent <AudioSource>();
        playerAnimator    = GetComponent <Animator>();

        playerMovement = GetComponent <MoveController>();
        playerShooter  = GetComponent <PlayerShooter>();

        bloodScreen = GameObject.Find("BloodScreen").GetComponent <Image>();
    }
Exemplo n.º 3
0
    private IEnumerator GetCom()
    {
        GameObject tmp = gameObject;

        while (true)
        {
            yield return(new WaitForSeconds(0.02f));

            if (tmp.CompareTag("PLAYER") || tmp.CompareTag("ENEMY"))
            {
                gunAudioPlayer = tmp.GetComponent <AudioSource>();
                CA             = tmp.GetComponent <CharacterAudios>();
                break;
            }
            tmp = tmp.transform.parent.gameObject;
        }
    }