高级玩家

- 贡献度
- 0
- 金元
- 4085
- 积分
- 409
- 精华
- 0
- 注册时间
- 2017-11-22
|
{
int num = 0;
int num2 = 0;
GameObject[] array = GameObject.FindGameObjectsWithTag("Platform");
if (this.IsTochterfirma() && !this.tf_onlyPlayerConsole && (this.tf_platformFocus[0] != -1 || this.tf_platformFocus[1] != -1 || this.tf_platformFocus[2] != -1 || this.tf_platformFocus[3] != -1))
{
for (int i2 = 0; i2 < array.Length; i2++)
{
if (array[i2])
{
platformScript component = array[i2].GetComponent<platformScript>();
if (component && (this.tf_platformFocus[0] == component.myID || this.tf_platformFocus[1] == component.myID || this.tf_platformFocus[2] == component.myID || this.tf_platformFocus[3] == component.myID) && ((gS_.handy && component.typ == 3) || (gS_.arcade && component.typ == 4) || (!gS_.handy && !gS_.arcade && component.typ == 0) || (!gS_.handy && !gS_.arcade && component.typ == 1) || (!gS_.handy && !gS_.arcade && component.typ == 2)) && component.isUnlocked && ((gS_.retro && component.vomMarktGenommen) || (!gS_.retro && !component.vomMarktGenommen)) && (gS_.gameTyp == 0 || (gS_.gameTyp == 1 && component.internet) || (gS_.gameTyp == 2 && component.internet)))
{
gS_.gamePlatform[num2] = component.myID;
gS_.gamePlatformScript[num2] = component;
gS_.costs_entwicklung += (long)component.dev_costs;
if (gS_.exklusiv)
{
this.ClearPlatforms(gS_);
return;
}
num2++;
if (num2 >= 4)
{
this.ClearPlatforms(gS_);
return;
}
}
}
}
}
if (this.IsTochterfirma())
{
for (int j = 0; j < array.Length; j++)
{
if (array[j])
{
platformScript component2 = array[j].GetComponent<platformScript>();
if (component2 && component2.isUnlocked && gS_.gamePlatform[0] != component2.myID && gS_.gamePlatform[1] != component2.myID && gS_.gamePlatform[2] != component2.myID && gS_.gamePlatform[3] != component2.myID && ((gS_.retro && component2.vomMarktGenommen) || (!gS_.retro && !component2.vomMarktGenommen)))
{
this.platformList.Add(new publisherScript.PlatformList(component2, (float)component2.date_year + component2.GetMarktanteil()));
}
}
}
this.platformList = (from i in this.platformList
orderby i.marktanteil descending
select i).ToList<publisherScript.PlatformList>();
for (int k = 0; k < this.platformList.ToArray().Length; k++)
{
platformScript script_ = this.platformList[k].script_;
if (script_ && gS_.gamePlatform[0] != script_.myID && gS_.gamePlatform[1] != script_.myID && gS_.gamePlatform[2] != script_.myID && gS_.gamePlatform[3] != script_.myID && ((gS_.handy && script_.typ == 3) || (gS_.arcade && script_.typ == 4) || (!gS_.handy && !gS_.arcade && script_.typ == 0) || (!gS_.handy && !gS_.arcade && script_.typ == 1) || (!gS_.handy && !gS_.arcade && script_.typ == 2)) && script_.isUnlocked && script_.ownerID == this.mS_.myID && ((gS_.retro && script_.vomMarktGenommen) || (!gS_.retro && !script_.vomMarktGenommen)) && (gS_.gameTyp == 0 || (gS_.gameTyp == 1 && script_.internet) || (gS_.gameTyp == 2 && script_.internet)))
{
num = script_.myID;
gS_.gamePlatform[num2] = script_.myID;
gS_.gamePlatformScript[num2] = script_;
gS_.costs_entwicklung += (long)script_.dev_costs;
if (gS_.exklusiv)
{
this.ClearPlatforms(gS_);
return;
}
num2++;
if (num2 >= 4)
{
this.ClearPlatforms(gS_);
return;
}
}
}
}
if (this.IsTochterfirma() && this.tf_onlyPlayerConsole)
{
if (num2 != 0)
{
if (num2 == 1 && gS_.herstellerExklusiv)
{
gS_.herstellerExklusiv = false;
gS_.exklusiv = true;
}
this.ClearPlatforms(gS_);
return;
}
if (gS_.herstellerExklusiv)
{
gS_.herstellerExklusiv = false;
gS_.exklusiv = true;
}
}
if (this.ownPlatform)
{
for (int l = 0; l < array.Length; l++)
{
if (array[l])
{
platformScript component3 = array[l].GetComponent<platformScript>();
if (component3 && component3.isUnlocked && gS_.gamePlatform[0] != component3.myID && gS_.gamePlatform[1] != component3.myID && gS_.gamePlatform[2] != component3.myID && gS_.gamePlatform[3] != component3.myID && ((gS_.retro && component3.vomMarktGenommen) || (!gS_.retro && !component3.vomMarktGenommen)))
{
this.platformList.Add(new publisherScript.PlatformList(component3, (float)component3.date_year + component3.GetMarktanteil()));
}
}
}
this.platformList = (from i in this.platformList
orderby i.marktanteil descending
select i).ToList<publisherScript.PlatformList>();
for (int m = 0; m < this.platformList.ToArray().Length; m++)
{
platformScript script_2 = this.platformList[m].script_;
if (script_2 && gS_.gamePlatform[0] != script_2.myID && gS_.gamePlatform[1] != script_2.myID && gS_.gamePlatform[2] != script_2.myID && gS_.gamePlatform[3] != script_2.myID && ((gS_.handy && script_2.typ == 3) || (gS_.arcade && script_2.typ == 4) || (!gS_.handy && !gS_.arcade && script_2.typ == 0) || (!gS_.handy && !gS_.arcade && script_2.typ == 1) || (!gS_.handy && !gS_.arcade && script_2.typ == 2)) && script_2.isUnlocked && ((gS_.retro && script_2.vomMarktGenommen) || (!gS_.retro && !script_2.vomMarktGenommen)) && (gS_.gameTyp == 0 || (gS_.gameTyp == 1 && script_2.internet) || (gS_.gameTyp == 2 && script_2.internet)) && script_2.OwnerIsNPC())
{
num = script_2.myID;
bool flag = false;
if (script_2.manufacturer_GE.Contains(this.name_GE))
{
flag = true;
}
if (flag)
{
gS_.gamePlatform[num2] = script_2.myID;
gS_.gamePlatformScript[num2] = script_2;
gS_.costs_entwicklung += (long)script_2.dev_costs;
if (gS_.exklusiv)
{
this.ClearPlatforms(gS_);
return;
}
num2++;
if (num2 >= 4)
{
this.ClearPlatforms(gS_);
return;
}
}
}
}
}
if ((!this.exklusive && num2 <= 3) || num2 == 0)
{
this.platformList.Clear();
for (int n = 0; n < array.Length; n++)
{
if (array[n])
{
platformScript component4 = array[n].GetComponent<platformScript>();
if (component4 && component4.isUnlocked && gS_.gamePlatform[0] != component4.myID && gS_.gamePlatform[1] != component4.myID && gS_.gamePlatform[2] != component4.myID && gS_.gamePlatform[3] != component4.myID && ((gS_.retro && component4.vomMarktGenommen) || (!gS_.retro && !component4.vomMarktGenommen)))
{
this.platformList.Add(new publisherScript.PlatformList(component4, (float)component4.date_year + component4.GetMarktanteil()));
}
}
}
this.platformList = (from i in this.platformList
orderby i.marktanteil descending
select i).ToList<publisherScript.PlatformList>();
for (int num3 = 0; num3 < this.platformList.Count; num3++)
{
platformScript script_3 = this.platformList[num3].script_;
if (script_3 && gS_.gamePlatform[0] != script_3.myID && gS_.gamePlatform[1] != script_3.myID && gS_.gamePlatform[2] != script_3.myID && gS_.gamePlatform[3] != script_3.myID && ((gS_.handy && script_3.typ == 3) || (gS_.arcade && script_3.typ == 4) || (!gS_.handy && !gS_.arcade && script_3.typ == 0) || (!gS_.handy && !gS_.arcade && script_3.typ == 1) || (!gS_.handy && !gS_.arcade && script_3.typ == 2)) && script_3.isUnlocked && ((gS_.retro && script_3.vomMarktGenommen) || (!gS_.retro && !script_3.vomMarktGenommen)) && (gS_.gameTyp == 0 || (gS_.gameTyp == 1 && script_3.internet) || (gS_.gameTyp == 2 && script_3.internet)) && (script_3.OwnerIsNPC() || (script_3.thridPartyGames && UnityEngine.Random.Range(0, script_3.price) < UnityEngine.Random.Range(0, this.platforms_.GetDurchschnittsDevKitPreis()) && (UnityEngine.Random.Range(0f, 100f + script_3.GetMarktanteil()) > 60f || script_3.GetMarktanteil() > 30f))))
{
num = script_3.myID;
bool flag2 = false;
if (this.ownPlatform && script_3.manufacturer_GE.Contains(this.name_GE))
{
flag2 = true;
}
if (UnityEngine.Random.Range(0, 100) > 50 || script_3.ownerID == this.mS_.myID || !script_3.OwnerIsNPC() || flag2)
{
gS_.gamePlatform[num2] = script_3.myID;
gS_.gamePlatformScript[num2] = script_3;
gS_.costs_entwicklung += (long)script_3.dev_costs;
if (!script_3.OwnerIsNPC())
{
script_3.SellPlayerKonsoleToNPC(this);
}
if (gS_.exklusiv)
{
this.ClearPlatforms(gS_);
return;
}
num2++;
if (num2 >= 4)
{
this.ClearPlatforms(gS_);
return;
}
}
}
}
}
if (num2 == 0)
{
gS_.gamePlatform[0] = num;
}
this.ClearPlatforms(gS_);
}
|
|