@不要迷茫w @蓝雨星华 @ANEZELIN @蜀道·难 @博丽神社の灵梦 @PRC_418 @wh1049429654 @iq被盗了
就这样吧,根本没啥好看的不是。图片之类的剧透太夸张啦。
重耦合是真的,直接把一堆东西写死在代码里面也是真的,改一改就好,哪儿用得到六个月,一两个月顶天了。
switch (this.type)
{
case RandomEvent.mp:
this.newsContent = "环保人士暴力占领了当地发电厂,并出于和平目的,捐赠给格里芬承包商。";
this.textRewardsTitle.text = "获得人力";
this.textRewardsNumber.text = "+" + this.parameter.ToString();
this.imageRewards.sprite = this.imageRewards.GetComponent<CommonPicController>().arrPic[0];
this.imageEvent.sprite = this.imageEvent.GetComponent<CommonPicController>().arrPic[1];
break;
case RandomEvent.ammo:
this.newsContent = "反战团体的伟大胜利!格里芬承包商兑现承诺,削减了总部仓库的弹药储备。";
this.textRewardsTitle.text = "获得弹药";
this.textRewardsNumber.text = "+" + this.parameter.ToString();
this.imageRewards.sprite = this.imageRewards.GetComponent<CommonPicController>().arrPic[1];
this.imageEvent.sprite = this.imageEvent.GetComponent<CommonPicController>().arrPic[1];
break;
case RandomEvent.mre:
this.newsContent = "据消息,大量过期罐头流入黑市,专家温馨提示,市民食用时请注意营养搭配。";
this.textRewardsTitle.text = "获得口粮";
this.textRewardsNumber.text = "+" + this.parameter.ToString();
this.imageRewards.sprite = this.imageRewards.GetComponent<CommonPicController>().arrPic[2];
this.imageEvent.sprite = this.imageEvent.GetComponent<CommonPicController>().arrPic[1];
break;
case RandomEvent.part:
this.newsContent = "机器人人权协会日前发表声明,否认有关其私下拆解并贩卖废弃人形的传言。";
this.textRewardsTitle.text = "获得零件";
this.textRewardsNumber.text = "+" + this.parameter.ToString();
this.imageRewards.sprite = this.imageRewards.GetComponent<CommonPicController>().arrPic[3];
this.imageEvent.sprite = this.imageEvent.GetComponent<CommonPicController>().arrPic[1];
break;
case RandomEvent.coin1:
this.newsContent = "格里芬承包商再创胜绩,发言人表示,大量技术将有机会投入公共事业建设。";
this.textRewardsTitle.text = "获得额外战斗记录";
this.textRewardsNumber.text = "+" + this.parameter.ToString();
this.imageRewards.sprite = this.imageRewards.GetComponent<CommonPicController>().arrPic[5];
this.imageEvent.sprite = this.imageEvent.GetComponent<CommonPicController>().arrPic[4];
break;
case RandomEvent.coin2:
this.newsContent = "格里芬承包商再创胜绩,发言人表示,大量技术将有机会投入公共事业建设。";
this.textRewardsTitle.text = "获得额外战斗记录";
this.textRewardsNumber.text = "+" + this.parameter.ToString();
this.imageRewards.sprite = this.imageRewards.GetComponent<CommonPicController>().arrPic[6];
this.imageEvent.sprite = this.imageEvent.GetComponent<CommonPicController>().arrPic[4];
break;
case RandomEvent.coin3:
this.newsContent = "格里芬承包商再创胜绩,发言人表示,大量技术将有机会投入公共事业建设。";
this.textRewardsTitle.text = "获得额外战斗记录";
this.textRewardsNumber.text = "+" + this.parameter.ToString();
this.imageRewards.sprite = this.imageRewards.GetComponent<CommonPicController>().arrPic[7];
this.imageEvent.sprite = this.imageEvent.GetComponent<CommonPicController>().arrPic[4];
break;
case RandomEvent.gun:
this.gotNewGun = false;
this.newsContent = "机器人人权运动推进顺利,更多人形已从城市服务业解脱,获得外出养老的机会。";
this.textRewardsTitle.text = "获得新的战术人形";
this.textRewardsNumber.text = "+1";
this.imageRewards.sprite = this.imageRewards.GetComponent<CommonPicController>().arrPic[8];
this.imageEvent.sprite = this.imageEvent.GetComponent<CommonPicController>().arrPic[0];
break;
case RandomEvent.loseammo:
this.newsContent = "反战团体近日武力摧毁了一处军工厂,传言称该厂是格里芬的军火供应商之一。";
this.textRewardsTitle.text = "丢失弹药";
this.textRewardsNumber.text = "-" + this.parameter.ToString();
this.imageEvent.sprite = this.imageEvent.GetComponent<CommonPicController>().arrPic[2];
this.imageRewards.sprite = this.imageRewards.GetComponent<CommonPicController>().arrPic[1];
break;
case RandomEvent.losemre:
this.newsContent = "人类人权组织炸毁了格里芬一处粮食储备地,声称贫民的权利应高于机器人。";
this.textRewardsTitle.text = "丢失口粮";
this.textRewardsNumber.text = "-" + this.parameter.ToString();
this.imageEvent.sprite = this.imageEvent.GetComponent<CommonPicController>().arrPic[2];
this.imageRewards.sprite = this.imageRewards.GetComponent<CommonPicController>().arrPic[2];
break;
case RandomEvent.runaway:
this.newsContent = "针对最近部分地区磁场偏转的现象,专家表示不必惊慌,“你们早见过末日了”。";
this.textSpecial.gameObject.SetActive(true);
this.imageRewards.gameObject.SetActive(false);
this.textRewardsTitle.gameObject.SetActive(false);
this.textRewardsNumber.gameObject.SetActive(false);
this.textLittle.gameObject.SetActive(true);
this.imageEvent.sprite = this.imageEvent.GetComponent<CommonPicController>().arrPic[3];
this.textSpecial.text = "当前梯队被撤离,可再次部署";
break;
case RandomEvent.enemy:
this.newsContent = "近日铁血部队活动猖獗,格里芬在此提醒市民,不要收养来历不明的机器小狗。";
this.textSpecial.gameObject.SetActive(true);
this.imageRewards.gameObject.SetActive(false);
this.textRewardsTitle.gameObject.SetActive(false);
this.textRewardsNumber.gameObject.SetActive(false);
this.textLittle.gameObject.SetActive(false);
this.textSpecial.text = "点击开始战斗";
this.imageEvent.sprite = this.imageEvent.GetComponent<CommonPicController>().arrPic[2];
break;
case RandomEvent.core:
this.newsContent = "格里芬承包商日前声明,号召民众集资捐赠人形,并承诺会妥善保管和利用。";
this.textRewardsTitle.text = "获得核心";
this.textRewardsNumber.text = "+" + this.parameter.ToString();
this.imageRewards.sprite = this.imageRewards.GetComponent<CommonPicController>().arrPic[4];
this.imageEvent.sprite = this.imageEvent.GetComponent<CommonPicController>().arrPic[1];
break;
}
this.textMaskNews.rectTransform.sizeDelta = new Vector2((float)(80 + this.newsContent.Length * 39), 82f);
this.textMaskNews.text = this.newsContent;
this.floatTextLength = this.textMaskNews.rectTransform.rect.width;
this.isTextMove = true;