关闭

android Unity3D 修改加强

标签: androidandorid逆向破解
466人阅读 评论(0) 收藏 举报
分类:

Unity3d游戏之无cd

skill

cdtime

//UI显示时
//修改技能cd
private void CDshow()
{
    if (FightUI.fighUI != null)
    {
        for (int i = 0; i < this._playSkill.Length; i++)
        {
            if (this._playSkill[i].curCDtime < this._playSkill[i].skillCD)
            {
                FightUI.fighUI.setCD(i);
                PlaySkill skill1 = this._playSkill[i];
                skill1.curCDtime += 100f; //设置cd时间 = skillcdtime      skill1.curCDtime += Time.deltaTime;
                UIManager.Self.skillCD[i].fillAmount = this._playSkill[i].curCDtime / this._playSkill[i].skillCD;
            }
            else if (this._playSkill[i].mp <= this.curMp)
            {
                FightUI.fighUI.SetTrue(i);
                FightUI.fighUI.MPLess[i].SetActive(false);
            }
            else
            {
                FightUI.fighUI.MPLess[i].SetActive(true);
                FightUI.fighUI.NotOverTime[i].SetActive(false);
            }
        }
    }
    this.comboCD -= 100f;   //连击cd  this.comboCD-= Time.deltaTime;
    if (this.recover < 1f)
    {
        this.recover += Time.deltaTime;
    }
    else
    {
        this.AddHp(this.CurHpRecover);
        this.AddMp(this.CurMpRecover);
        this.recover = 0f;
    }
}

 


//使用skill 时
//设置mp
public void SetSkill(int skill)
{
    if (((((this._StateEnum != StateEnum.Win) && (this._StateEnum != StateEnum.Dead)) && (this._StateEnum != StateEnum.Skill)) && Data.GameRun) && !this.pause)
    {
        if (FightUI.fighUI != null)
        {
            FightUI.fighUI.canpause = true;
        }
        if (this.playclick == clickEnum.skillPoint)
        {
            this.playclick = clickEnum.all;
            GuideUI.self.guideTips[Data.guideCount].SetActive(false);
        }
        this.audio.clip = null;
        this.audio.Stop();
        if ((((this._StateEnum != StateEnum.Skill) && (this._StateEnum != StateEnum.ComboAttack)) && ((this._StateEnum != StateEnum.LeapAttack) && (this._StateEnum != StateEnum.ViolentAttack))) && (((this._StateEnum != StateEnum.HeavyHit) && (this._StateEnum != StateEnum.ViolentAttack)) && ((this._playSkill[skill].curCDtime >= this._playSkill[skill].skillCD) && (this.curMp >= this._playSkill[skill].mp))))
        {
            this._playSkill[skill].curCDtime = 0f;    //  开始在这里设置cd,可时ui有问题 ,
            FightUI.fighUI.SetFalse(skill);
            UIManager.Self.skillCD[skill].fillAmount = 0f;
            this.curMp += this._playSkill[skill].mp;   //不减少mp 减少   this.curMp -= this._playSkill[skill].mp; 
            UIManager.Self.playMpSlider.fillAmount = (this.curMp * 1f) / ((float) this.MP);
            this._Animator.SetFloat("Forward", -1f);
            this._Animator.SetInteger("AttackI", -1);
            if (!this.ThisRigidbody.isKinematic)
            {
                this.ThisRigidbody.velocity = Vector3.zero;
            }
            else
            {
                this.ThisRigidbody.isKinematic = false;
                this.ThisRigidbody.velocity = Vector3.zero;
            }
            this._StateEnum = StateEnum.Skill;
            this.CurAttackI = -1;
            this.CurSkillI = skill;
            if (this._playSkill[skill].havaPre)
            {
                this._Animator.Play("preSkill" + this.CurSkillI, -1, 0f);
            }
            else
            {
                this._Animator.Play("Skill" + this.CurSkillI, -1, 0f);
            }
        }
    }
}

 





//设置爆发

public void SetViolent()
{
    this.audio.clip = null;
    this.audio.Stop();
    if (((this.CurViolentTime <= 0f) && (this.curViolent >= this.playViolent)) && (((this._StateEnum != StateEnum.Hurt) && (this._StateEnum != StateEnum.Skill)) && (this._StateEnum != StateEnum.Dead)))
    {
        if (FightUI.fighUI != null)
        {
            FightUI.fighUI.canpause = true;
        }
        this.curViolent = 0x3e8;  //当使用时  不清除为0  this.curViolent = 0;
        UIManager.Self.violentBar.fillAmount = 0f;
        this._Animator.SetInteger("AttackI", -1);
        this._Animator.Play("Violent", -1, 0f);
        this._StateEnum = StateEnum.ViolentAttack;
        if (this.playType == 0)
        {
            this.tt.enabled = true;
            this.changeMaterial(this.ViolentMaterial);
            this._Animator.speed = this.ViolentSpeed;
        }
    }
}




Unity3D 游戏中对Assembly-CSharp

coins 是很容易找的

在drinks的搜索之下没有合适的,或者是修改不成功的情况下,要透过drinks ,在其他函数中寻找到关键点;




0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:20274次
    • 积分:470
    • 等级:
    • 排名:千里之外
    • 原创:26篇
    • 转载:12篇
    • 译文:0篇
    • 评论:1条
    文章分类