超级玩家
 
- 贡献度
- 150
- 金元
- 3546
- 积分
- 965
- 精华
- 1
- 注册时间
- 2012-5-29
|
本帖最后由 暧昧√ 于 2023-7-20 20:46 编辑
增加渔网修改:代码如下↓↓↓↓↓↓搜索FishNet// FishNet 渔网修改和鸟笼一样,无限资源,只是地图选址不一样。
// Token: 0x0600038B RID: 907
private void updateData()
{
for (int i = 0; i < Loads.DownLand_Data_Now.Count; i++)
{
if (this.zoneID == Loads.DownLand_Data_Now[i][0])
{
if (float.Parse(Loads.DownLand_Data_Now[i][this.OnlyIndex]) * this.outSpeed > this.MaxNumOutProp)
{
Loads.DownLand_Data_Now[i][this.OnlyIndex = (this.MaxNumOutProp / this.outSpeed).ToString();
}
this.outPropNum = float.Parse(Loads.DownLand_Data_Now[i][this.OnlyIndex]) * this.outSpeed + 5f; 此处+5需要添加
return;
}
}
}
第二处修改
// FishNet
// Token: 0x0600038C RID: 908
private void updateShow()
{
if (this.isFixed)
{
if (!base.transform.Find("ShowA").gameObject.activeSelf)
{
base.transform.Find("ShowA").gameObject.SetActive(true);
}
if (base.transform.Find("ShowB").gameObject.activeSelf)
{
base.transform.Find("ShowB").gameObject.SetActive(false);
}
if (base.transform.Find("UI_BT").Find("FixBT").gameObject.activeSelf)
{
base.transform.Find("UI_BT").Find("FixBT").gameObject.SetActive(false);
}
if (!base.transform.Find("UI_BT").Find("back").gameObject.activeSelf)
{
base.transform.Find("UI_BT").Find("back").gameObject.SetActive(true);
}
if (this.outPropNum >= 1f)
{
if (base.transform.Find("propShow").childCount <= 0)
{
GameObject gameObject = UnityEngine.Object.Instantiate<GameObject>((GameObject)Resources.Load("PropGet"));
gameObject.name = this.fishAll[TrueRandom.GetRanom(this.fishAll.Count)];
gameObject.GetComponent<PropGet>().Num = (float)Mathf.FloorToInt(this.outPropNum) * 5f; 此处*5需要添加
gameObject.GetComponent<PropGet>().ClassID = 11;
gameObject.transform.parent = base.transform.Find("propShow");
gameObject.transform.localPosition = new Vector3(0f, 0f, 0f);
gameObject.transform.localScale = new Vector3(1f, 1f, 1f);
return;
}
if (base.transform.Find("propShow").GetChild(0).GetComponent<PropGet>().Num != (float)Mathf.FloorToInt(this.outPropNum))
{
base.transform.Find("propShow").GetChild(0).GetComponent<PropGet>().Num = (float)Mathf.FloorToInt(this.outPropNum);
return;
}
}
}
else
{
if (base.transform.Find("ShowA").gameObject.activeSelf)
{
base.transform.Find("ShowA").gameObject.SetActive(false);
}
if (!base.transform.Find("ShowB").gameObject.activeSelf)
{
base.transform.Find("ShowB").gameObject.SetActive(true);
}
if (!base.transform.Find("UI_BT").Find("FixBT").gameObject.activeSelf)
{
base.transform.Find("UI_BT").Find("FixBT").gameObject.SetActive(true);
}
if (base.transform.Find("UI_BT").Find("back").gameObject.activeSelf)
{
base.transform.Find("UI_BT").Find("back").gameObject.SetActive(false);
}
}
}
|
|