android Unity3D 修改加强

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
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值