Ejemplo n.º 1
0
    protected NetworkAISyncor networkAISyncor;              // 게스트

    void Awake()
    {
        aiCon               = GetComponent <AIController>();
        aiAnim              = transform.GetChild(0).GetComponent <AIAnim>();
        anim                = aiAnim.GetComponent <Animator>();
        living              = GetComponent <AILiving>();
        skillProcess        = GetComponent <SkillProcess>();
        cNetworkIdentity    = GetComponent <CNetworkIdentity>();
        networkAITransmitor = GetComponent <NetworkAITransmitor>();
        networkAISyncor     = GetComponent <NetworkAISyncor>();

        nav = GetComponent <NavMeshAgent>();
        col = GetComponent <CapsuleCollider>();
        rd  = GetComponent <Rigidbody>();

        SettingLayerMasks();
        DictionarySetting();

        // 죽으면 실행
        GetComponent <AIController>().DieAction += () => { isAction = false; isPatrolMove = false; };
    }
Ejemplo n.º 2
0
    // 컴포넌트 불러오기
    private void Awake()
    {
        aiAggro             = GetComponent <AIAggro>();
        aiAnim              = transform.GetChild(0).GetComponent <AIAnim>();
        anim                = aiAnim.GetComponent <Animator>();
        baseState           = GetComponent <AIBaseState>();
        living              = GetComponent <AILiving>();
        skillProcess        = GetComponent <SkillProcess>();
        cNetworkIdentity    = GetComponent <CNetworkIdentity>();
        networkAITransmitor = GetComponent <NetworkAITransmitor>();
        networkAISyncor     = GetComponent <NetworkAISyncor>();

        nav  = GetComponent <NavMeshAgent>();
        path = nav.path;
        rd   = GetComponent <Rigidbody>();
        col  = GetComponent <CapsuleCollider>();

        SettingLayerMasks();

        // 애니메이션 똑같이 안보이게
        stateTickCount = UnityEngine.Random.Range(stateTickCount - 1, stateTickCount + 2);
        // stateCheckCooltime = UnityEngine.Random.Range(stateCheckCooltime - 0.1f, stateCheckCooltime + 0.1f);
    }
Ejemplo n.º 3
0
    float m_shockTime = 0.6f;                         // 정지 시간

    /// <summary>
    /// AIController로부터 데이터 가져오기 + AIAnim
    /// 값 세팅하기
    /// </summary>
    void Start()
    {
        aiCon            = GetComponent <AIController>();
        aiInfo           = aiCon.aiInfo;
        aiAggro          = GetComponent <AIAggro>();
        aiAnim           = transform.GetChild(0).GetComponent <AIAnim>();
        cNetworkIdentity = GetComponent <CNetworkIdentity>();

        skillProcess = GetComponent <SkillProcess>();
        rd           = GetComponent <Rigidbody>();
        col          = GetComponent <CapsuleCollider>();
        agent        = GetComponent <NavMeshAgent>();
        highlighter  = GetComponent <Highlighter>();

        m_stun = false;
        isDie  = false;

        enviroLayer = 1 << (int)SkillJudgeTarget.ENVIRO;    // 환경레이어 -> 데칼 확인

        ChangeClothes();                                    // 옷 조정

        GetComponent <AIController>().DieAction += () => { isDie = false; };
    }