本文整理汇总了C#中System.Form1.openCityFrm方法的典型用法代码示例。如果您正苦于以下问题:C# Form1.openCityFrm方法的具体用法?C# Form1.openCityFrm怎么用?C# Form1.openCityFrm使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Form1
的用法示例。
在下文中一共展示了Form1.openCityFrm方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: buildConstruction
public void buildConstruction( Form1 form1 ) // Building( Stat.Building building )
{
bool keepGoing = true;
if (
population == 1 &&
construction.list[ 0 ] == Statistics.units[ (byte)Form1.unitType.colon ]
)
{
if ( player.player == player.game.curPlayerInd )
{
Stat.Construction[] ib = ai.whatCanBeBuilt(
player.player,
city
);
string[] choices = uiWrap.buildingListStrings( player.player, city, ib );
form1.zoomOnCity( player.player, city );
userChoice ui = new userChoice(
language.getAString( language.order.uiNewConstrution ),
String.Format( language.getAString( language.order.uiNewConstrution ), name ),
choices,
0,
language.getAString( language.order.ok ),
language.getAString( language.order.uiGoToCity )
);
ui.ShowDialog();
int res = ui.result;
if ( res == -1 )
{
form1.openCityFrm( player.player, city );
keepGoing = false;
}
else if ( res == 0 )
{
keepGoing = true;
/* construction.points -= Statistics.units[ construction.list[ 0 ].ind ].cost;
Form1.game.curPlayer.createUnit ( X, Y, (byte)construction.list[ 0 ].ind );
Form1.game.curPlayerInd.cityList[ i ].kill();
continue;*/
}
else
{ // si non
construction.list[0] = ib[res];
keepGoing = false;
/* Form1.construction.list[ 0 ].ind = ib[ res ].info;
Form1.construction.list[ 0 ].type = ib[ res ].type;*/
}
}
else
ai.chooseConstruction( player.player, city );
}
// else
if ( keepGoing )
{
construction.points -= construction.list[ 0 ].cost; //Statistics.units[ construction.list[ 0 ].ind ].cost;
if ( construction.list[ 0 ] is Stat.Unit ) // construction.list[ 0 ].type == 1 )
{ // units
player.createUnit( X, Y, (byte)construction.list[ 0 ].type );
if ( construction.list[ 0 ] == Statistics.units[ (byte)Form1.unitType.colon ] ) //construction.list[ 0 ].ind == (byte)Form1.unitType.colon )
{
if ( population > 1 )
{
labor.autoRemoveLabor( player.player, city, true );
population --;
}
else
{
kill();
}
}
}
else if ( construction.list[ 0 ] is Stat.Building )
{ // buildings
buildingList[ construction.list[ 0 ].type ] = true;
aiPref.setBuildingUpkeep( player.player );
#region special buildings
#endregion
}
else if ( construction.list[ 0 ] is Stat.SmallWonder )
{ // buildings
// buildingList[ construction.list[ 0 ].type ] = true;
/// aiPref.setBuildingUpkeep( player.player );
player.smallWonderList.buildWonder( construction.list[ 0 ] );
#region special
#endregion
}
else if ( construction.list[ 0 ] is Stat.Wonder )
{ // buildings
// buildingList[ construction.list[ 0 ].type ] = true;
// aiPref.setBuildingUpkeep( player.player );
player.game.wonderList.buildWonder( construction.list[ 0 ] );
//.........这里部分代码省略.........