游戏狂人
- 贡献度
- 105
- 金元
- 8463
- 积分
- 1286
- 精华
- 2
- 注册时间
- 2012-1-8
|
没发现有问题 都正常
草莓可以采集了还能再生长2次
所以一个草莓种子可以收获3个草莓
再生长相关代码
public class CropModel : INullableModel
public bool CanRepeat
{
get
{
return this.mRepeatCount < this.Master.HarvestCount - 1;
}
}
public void ReduceGrowth()
{
if (!this.CanRepeat && !this.IsWithered)
{
return;
}
int num2;
int num = Math.DivRem(this.Master.HarvestDays, this.Master.Step - 1, out num2);
num2 = ((num2 <= this.Master.ReduceStep) ? num2 : this.Master.ReduceStep);
int num3 = num * this.Master.ReduceStep + num2;
this.mGrowth -= num3;
this.mQuality -= Mathf.CeilToInt(Crop.GetUpgradeValue(Item.ID_HIGH_QUALITY_FERTILIZER) / (float)this.Master.HarvestDays) * num3;
if (this.mQuality < Crop.MIN_QUALITY)
{
this.mQuality = Crop.MIN_QUALITY;
}
this.mRepeatCount++;
}
|
|