游戏精英
 
- 贡献度
- 761
- 金元
- 12515
- 积分
- 4406
- 精华
- 11
- 注册时间
- 2012-1-24
|
不啰嗦,下边代码, base.Quality = 1f; 这个是品质1代表百分之百 base.m_nBeauty = 12; 这个是美观 12=华丽 没有之上了,其实还有许多能改的地方,发现大家都没有去注意,自己研究吧!
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using Newtonsoft.Json;
using UnityEngine;
using XiaWorld.SaveLoad;
using XLua;
namespace XiaWorld
{
// Token: 0x020003AA RID: 938
[LuaCallCSharp(GenFlag.No
[JsonObject(MemberSerialization = MemberSerialization.OptIn
public partial class ItemThing : Thing
{
// Token: 0x060016A1 RID: 5793
public bool SoulCrystalYouPowerUp(float badd = 0f, float irate = 1f, int v = 1)
{
if (base.Rate >= 12)
{
return false;
}
float a = Mathf.Pow(0.9f + badd, (float)(base.Rate + this.YouPower));
if (irate > 0f)
{
a = irate;
}
if (World.RandomRate(a))
{
while (base.Rate < 12)
{
this.YouPower += v;
base.Rate += v;
}
base.Quality = 1f;
base.m_nBeauty = 12;
if (this.View != null && base.Rate >= 3)
{
this.View.ShowItemRay(new Color?(GameDefine.GetRateColor(base.Rate)));
this.NeedClick = true;
}
GameWatch.Instance.PlayUIAudio("Sound/ding");
return true;
}
return false;
}
}
}
|
评分
-
1
查看全部评分
-
|