示例#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; };
    }
示例#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);
    }