コード例 #1
0
        public override void Init(string prefab_path, int layer, Vector3 pos, float roatate = 0f)
        {
            this.m_fNavStoppingDis = 2f;
            base.Init(prefab_path, layer, pos, roatate);
            M00000_Default_Event m00000_Default_Event = this.m_curModel.gameObject.AddComponent <M00000_Default_Event>();

            m00000_Default_Event.m_monRole = this;
            base.maxHp = (base.curhp = 1000);
        }
コード例 #2
0
    override protected void Model_Loaded_Over()
    {
        M00000_Default_Event mde = m_curModel.gameObject.AddComponent <M00000_Default_Event>();

        mde.m_monRole = this;
        ani           = m_curModel.gameObject.GetComponent <Animator>();
        AnimatorStateInfo anima = ani.GetCurrentAnimatorStateInfo(0);

        a3_dartproxy.getInstance().addEventListener(a3_dartproxy.DARTHPNOW, PlayerNameUIMgr.getInstance().carinfo);
    }
コード例 #3
0
ファイル: MDC000.cs プロジェクト: atom-chen/rongyaojt
    public override void Init(string prefab_path, int layer, Vector3 pos, float roatate = 0f)
    {
        base.Init(prefab_path, layer, pos, roatate);
        M00000_Default_Event m00000_Default_Event = this.m_curModel.gameObject.AddComponent <M00000_Default_Event>();

        m00000_Default_Event.m_monRole = this;
        this.ani = this.m_curModel.gameObject.GetComponent <Animator>();
        AnimatorStateInfo currentAnimatorStateInfo = this.ani.GetCurrentAnimatorStateInfo(0);

        BaseProxy <a3_dartproxy> .getInstance().addEventListener(4u, new Action <GameEvent>(PlayerNameUIMgr.getInstance().carinfo));
    }
コード例 #4
0
    override protected void Model_Loaded_Over()
    {
        //Debug.LogError("M00000  模型数据加载完毕了");

        M00000_Default_Event mde = m_curModel.gameObject.AddComponent <M00000_Default_Event>();

        PlayerNameUIMgr.getInstance().show(this);
        mde.m_monRole = this;

        if (isCollect)
        {
            m_curPhy.gameObject.layer = EnumLayer.LM_COLLECT;
        }
    }
コード例 #5
0
    public override void Init(string prefab_path, int layer, Vector3 pos, float roatate = 0f)
    {
        this.m_fNavStoppingDis = 2f;
        base.Init(prefab_path, layer, pos, roatate);
        M00000_Default_Event m00000_Default_Event = this.m_curModel.gameObject.AddComponent <M00000_Default_Event>();

        PlayerNameUIMgr.getInstance().show(this);
        m00000_Default_Event.m_monRole = this;
        base.maxHp = (base.curhp = 1000);
        bool flag = this.isCollect;

        if (flag)
        {
            this.m_curPhy.gameObject.layer = EnumLayer.LM_COLLECT;
        }
    }
コード例 #6
0
    override protected void Model_Loaded_Over()
    {
        M00000_Default_Event mde = m_curModel.gameObject.AddComponent <M00000_Default_Event>();

        mde.m_monRole = this;
    }
コード例 #7
0
ファイル: MonsterRole.cs プロジェクト: atom-chen/rongyaojt
    public new virtual void FrameMove(float delta_time)
    {
        base.FrameMove(delta_time);
        bool disposed = this.disposed;

        if (!disposed)
        {
            bool bchangeDeadMtl = this.m_bchangeDeadMtl;
            if (bchangeDeadMtl)
            {
                bool flag = this.m_dead_Burn < 1f;
                if (flag)
                {
                    this.m_dead_Burn += delta_time * 0.75f;
                    this.m_MonBody.material.SetFloat(gameST.DEAD_MT_AMOUNT, this.m_dead_Burn);
                }
                else
                {
                    this.m_remove_after_dead = true;
                }
            }
            bool bchangeLiveMtl = this.m_bchangeLiveMtl;
            if (bchangeLiveMtl)
            {
                bool flag2 = this.m_live_Burn > 0f;
                if (flag2)
                {
                    this.m_live_Burn -= delta_time * 0.75f;
                    this.m_MonBody.material.SetFloat(gameST.DEAD_MT_AMOUNT, this.m_live_Burn);
                }
                else
                {
                    this.m_bchangeLiveMtl = false;
                    this.onResetMTL();
                }
            }
            bool bDoHitFlash = this.m_bDoHitFlash;
            if (bDoHitFlash)
            {
                bool bhitFlashGoUp = this.m_bhitFlashGoUp;
                if (bhitFlashGoUp)
                {
                    this.m_fhitFlash_time += delta_time * 10f;
                    bool flag3 = this.m_fhitFlash_time > 0.25f;
                    if (flag3)
                    {
                        this.m_fhitFlash_time = 0.25f;
                        this.m_bhitFlashGoUp  = false;
                    }
                    this.m_MonBody.material.SetFloat(EnumShader.SPI_RIMWIDTH, this.m_fhitFlash_time * 6f);
                }
                else
                {
                    bool flag4 = this.m_nSkillSP_fb == -31;
                    if (flag4)
                    {
                        this.m_MonBody.material.SetFloat(EnumShader.SPI_RIMWIDTH, 1.5f);
                    }
                    else
                    {
                        this.m_fhitFlash_time -= delta_time;
                        bool flag5 = this.m_fhitFlash_time <= 0f;
                        if (flag5)
                        {
                            this.m_fhitFlash_time = 0f;
                            this.m_bDoHitFlash    = false;
                            Color arg_1C9_0 = this.m_Main_Color;
                            bool  flag6     = true;
                            if (flag6)
                            {
                                this.m_MonBody.material.SetColor(EnumShader.SPI_COLOR, this.m_Main_Color);
                            }
                            else
                            {
                                this.m_MonBody.material.SetColor(EnumShader.SPI_COLOR, Color.white);
                            }
                            Color arg_210_0 = this.m_Rim_Color;
                            bool  flag7     = true;
                            if (flag7)
                            {
                                this.m_MonBody.material.SetColor(EnumShader.SPI_RIMCOLOR, this.m_Rim_Color);
                            }
                            else
                            {
                                this.m_MonBody.material.SetColor(EnumShader.SPI_RIMCOLOR, Color.black);
                            }
                            this.m_MonBody.material.SetFloat(EnumShader.SPI_RIMWIDTH, this.m_Rim_Width);
                            bool flag8 = this.m_MonBody1 != null;
                            if (flag8)
                            {
                                this.m_MonBody1.material.SetColor(EnumShader.SPI_COLOR, this.m_Main_Color);
                                this.m_MonBody1.material.SetColor(EnumShader.SPI_RIMCOLOR, this.m_Rim_Color);
                                this.m_MonBody1.material.SetFloat(EnumShader.SPI_RIMWIDTH, this.m_Rim_Width);
                            }
                        }
                        else
                        {
                            this.m_MonBody.material.SetFloat(EnumShader.SPI_RIMWIDTH, this.m_fhitFlash_time * 6f);
                            bool flag9 = this.m_MonBody1 != null;
                            if (flag9)
                            {
                                this.m_MonBody1.material.SetFloat(EnumShader.SPI_RIMWIDTH, this.m_fhitFlash_time * 6f);
                            }
                        }
                    }
                }
            }
            bool flag10 = this.m_fAttackCount > 0f;
            if (flag10)
            {
                this.m_fAttackCount -= delta_time;
                bool flag11 = this.m_fAttackCount <= 0f;
                if (flag11)
                {
                    this.m_curSkillId = 0;
                    this.LeaveAttackState();
                    this.m_curAni.SetInteger(EnumAni.ANI_I_SKILL, 0);
                }
            }
            bool flag12 = this.m_moveAgent != null && this.m_moveAgent.enabled && this.m_moveAgent.isOnNavMesh;
            if (flag12)
            {
                bool flag13 = this.isDartRole;
                if (flag13)
                {
                    return;
                }
                bool flag14 = this.m_moveAgent.remainingDistance > 1f;
                if (flag14)
                {
                    bool flag15 = this.canTestDis;
                    if (flag15)
                    {
                        this.m_moveAgent.avoidancePriority = 50 - (int)this.m_moveAgent.remainingDistance;
                        this.canTestDis = false;
                    }
                }
                else
                {
                    this.m_moveAgent.avoidancePriority = 10;
                    this.canTestDis = true;
                }
                M00000_Default_Event expr_442 = this.m_curModel.GetComponent <M00000_Default_Event>();
                bool flag16 = ((expr_442 != null) ? expr_442.m_monRole : null) is MDC000;
                if (flag16)
                {
                    this.m_moveAgent.avoidancePriority = 0;
                    this.isDartRole = true;
                    Debug.Log("isDartRole");
                }
            }
            bool isDead = this.isDead;
            if (!isDead)
            {
                this.m_fFreezeTime -= delta_time;
                bool flag17 = this.m_fFreezeTime > 0f;
                if (flag17)
                {
                    this.m_curAni.speed = this.m_fFreezeSpeed;
                }
                else
                {
                    bool flag18 = this.m_fFreezeTime < 0f && this.m_bdoFreeze;
                    if (flag18)
                    {
                        this.m_fFreezeTime  = 0f;
                        this.m_curAni.speed = 1f;
                        this.m_bdoFreeze    = false;
                    }
                }
                bool flag19 = this.m_eThinkType == AI_TYPE.MAIT_NONE;
                if (!flag19)
                {
                    bool bHide_state = SelfRole._inst.m_bHide_state;
                    if (!bHide_state)
                    {
                        this.m_fThinkTime -= delta_time;
                        bool flag20 = this.m_fThinkTime <= 0f;
                        if (flag20)
                        {
                            this.m_fThinkTime = 0.05f;
                            switch (this.m_eThinkType)
                            {
                            case AI_TYPE.MAIT_SICK:
                                this.AI_Sick();
                                break;

                            case AI_TYPE.MAIT_ATTACK:
                                this.AI_Attack(delta_time);
                                break;
                            }
                        }
                    }
                }
            }
        }
    }