本文整理汇总了C#中GameVersion类的典型用法代码示例。如果您正苦于以下问题:C# GameVersion类的具体用法?C# GameVersion怎么用?C# GameVersion使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GameVersion类属于命名空间,在下文中一共展示了GameVersion类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GameConfig
public GameConfig(int fileCount)
{
GameVersion game = GameVersion.Invalid;
switch (fileCount)
{
case FILECOUNT_XY:
game = GameVersion.XY;
break;
case FILECOUNT_ORAS:
game = GameVersion.ORASDEMO;
break;
case FILECOUNT_ORASDEMO:
game = GameVersion.ORAS;
break;
case FILECOUNT_SMDEMO:
game = GameVersion.SMDEMO;
break;
case FILECOUNT_SM:
game = GameVersion.SM;
break;
}
if (game == GameVersion.Invalid)
return;
Version = game;
}
示例2: PopulateAppIdCombo
private void PopulateAppIdCombo(ComboBox combo, GameVersion gameVersion)
{
var appIdList = SongAppIdRepository.Instance().Select(gameVersion).ToArray();
combo.DataSource = appIdList;
combo.DisplayMember = "DisplayName";
combo.ValueMember = "AppId";
}
示例3: getMetLocationVersionGroup
/// <summary>Determines the Version Grouping of an input Version ID</summary>
/// <param name="Version">Version of which to determine the group</param>
/// <returns>Version Group Identifier or Invalid if type cannot be determined.</returns>
public static GameVersion getMetLocationVersionGroup(GameVersion Version)
{
switch (Version)
{
case GameVersion.CXD:
return GameVersion.CXD;
case GameVersion.RBY:
return GameVersion.RBY;
case GameVersion.GS:
case GameVersion.C:
return GameVersion.GSC;
case GameVersion.R:
case GameVersion.S:
return GameVersion.RS;
case GameVersion.E:
return GameVersion.E;
case GameVersion.FR:
case GameVersion.LG:
return GameVersion.FR;
case GameVersion.D:
case GameVersion.P:
return GameVersion.DP;
case GameVersion.Pt:
return GameVersion.Pt;
case GameVersion.HG:
case GameVersion.SS:
return GameVersion.HGSS;
case GameVersion.B:
case GameVersion.W:
return GameVersion.BW;
case GameVersion.B2:
case GameVersion.W2:
return GameVersion.B2W2;
case GameVersion.X:
case GameVersion.Y:
return GameVersion.XY;
case GameVersion.OR:
case GameVersion.AS:
return GameVersion.ORAS;
case GameVersion.SN:
case GameVersion.MN:
return GameVersion.SM;
default:
return GameVersion.Invalid;
}
}
示例4: GameInfo
public GameInfo(Process gameProcess)
{
this.gameProcess = gameProcess;
if (gameProcess.MainModuleWow64Safe().ModuleMemorySize == 5029888)
{
gameVersion = GameVersion.v2014_12_03;
}
else if (gameProcess.MainModuleWow64Safe().ModuleMemorySize == 5033984)
{
gameVersion = GameVersion.v2016_01_12;
}
else
{
MessageBox.Show("Unsupported game version", "LiveSplit.Quake2",
MessageBoxButtons.OK, MessageBoxIcon.Error);
gameVersion = GameVersion.v2014_12_03;
}
switch (gameVersion)
{
case GameVersion.v2014_12_03:
gameStateAddress = new DeepPointer(0x31BDC0);
mapAddress = new DeepPointer(0x3086C4);
inIntermissionAddress = new DeepPointer(0x2C679C);
break;
case GameVersion.v2016_01_12:
gameStateAddress = new DeepPointer(0x286400);
mapAddress = new DeepPointer(0x33FF44);
inIntermissionAddress = new DeepPointer(0x2FDF28);
break;
}
}
示例5: GetDataAsHtml
public string GetDataAsHtml( GameVersion version, TSS.TSSFile stringDic, Dictionary<uint, TSS.TSSEntry> inGameIdDict )
{
StringBuilder sb = new StringBuilder();
sb.Append( "<tr>" );
/*
sb.Append( "<td>" );
sb.Append( RefString );
sb.Append( "</td>" );
//*/
sb.Append( "<td>" );
sb.Append( "<span class=\"itemname\">" );
sb.Append( inGameIdDict[NameStringDicID].StringJpnHtml( version ) );
sb.Append( "</span>" );
sb.Append( "<br>" );
sb.Append( inGameIdDict[DescStringDicID].StringJpnHtml( version ) );
sb.Append( "</td>" );
sb.Append( "<td>" );
sb.Append( "<span class=\"itemname\">" );
sb.Append( inGameIdDict[NameStringDicID].StringEngHtml( version ) );
sb.Append( "</span>" );
sb.Append( "<br>" );
sb.Append( inGameIdDict[DescStringDicID].StringEngHtml( version ) );
sb.Append( "</td>" );
sb.Append( "<td>" );
sb.Append( GradeCost + " Grade" );
sb.Append( "</td>" );
return sb.ToString();
}
示例6: getBaseEggMoves
internal static IEnumerable<int> getBaseEggMoves(PKM pkm, int skipOption, GameVersion gameSource)
{
int species = getBaseSpecies(pkm, skipOption);
if (gameSource == GameVersion.Any)
gameSource = (GameVersion) pkm.Version;
switch (gameSource)
{
case GameVersion.X:
case GameVersion.Y:
case GameVersion.XY:
if (pkm.InhabitedGeneration(6))
return LevelUpXY[species].getMoves(1);
break;
case GameVersion.AS:
case GameVersion.OR:
case GameVersion.ORAS:
if (pkm.InhabitedGeneration(6))
return LevelUpAO[species].getMoves(1);
break;
case GameVersion.SN:
case GameVersion.MN:
case GameVersion.SM:
if (pkm.InhabitedGeneration(7))
return LevelUpSM[species].getMoves(1);
break;
}
return null;
}
示例7: SAV4
public SAV4(byte[] data = null, GameVersion versionOverride = GameVersion.Any)
{
Data = data == null ? new byte[SaveUtil.SIZE_G4RAW] : (byte[])data.Clone();
BAK = (byte[])Data.Clone();
Exportable = !Data.SequenceEqual(new byte[Data.Length]);
// Get Version
if (data == null)
Version = GameVersion.HGSS;
else if (versionOverride != GameVersion.Any)
Version = versionOverride;
else Version = SaveUtil.getIsG4SAV(Data);
if (Version == GameVersion.Invalid)
return;
getActiveGeneralBlock();
getActiveStorageBlock();
getSAVOffsets();
switch (Version)
{
case GameVersion.DP: Personal = PersonalTable.DP; break;
case GameVersion.Pt: Personal = PersonalTable.Pt; break;
case GameVersion.HGSS: Personal = PersonalTable.HGSS; break;
}
if (!Exportable)
resetBoxes();
}
示例8: NSFBox
public NSFBox(NSF nsf,GameVersion gameversion)
{
this.nsf = nsf;
this.controller = new NSFController(nsf,gameversion);
this.searchresults = new List<TreeNode>();
controller.Node.Expand();
trvMain = new TreeView();
trvMain.Dock = DockStyle.Fill;
trvMain.ImageList = imglist;
trvMain.HideSelection = false;
trvMain.Nodes.Add(controller.Node);
trvMain.SelectedNode = controller.Node;
trvMain.AllowDrop = true;
trvMain.AfterSelect += new TreeViewEventHandler(trvMain_AfterSelect);
trvMain.ItemDrag += new ItemDragEventHandler(trvMain_ItemDrag);
trvMain.DragOver += new DragEventHandler(trvMain_DragOver);
trvMain.DragDrop += new DragEventHandler(trvMain_DragDrop);
pnSplit = new SplitContainer();
pnSplit.Dock = DockStyle.Fill;
pnSplit.Panel1.Controls.Add(trvMain);
this.Controls.Add(pnSplit);
}
示例9: GetDataAsHtml
public string GetDataAsHtml( string stratum, int floor, T8BTEMST.T8BTEMST Enemies, T8BTEMGP.T8BTEMGP EnemyGroups, T8BTEMEG.T8BTEMEG EncounterGroups, GameVersion version, T8BTXTMT treasures, ItemDat.ItemDat items, Dictionary<uint, TSS.TSSEntry> inGameIdDict, bool surroundingTable = true, bool phpLinks = false )
{
StringBuilder sb = new StringBuilder();
if ( surroundingTable ) {
sb.Append( "<div id=\"" + stratum + floor + "\">" );
sb.Append( "<table class=\"necropolisfloor\">" );
sb.Append( "<tr>" );
sb.Append( "<th colspan=\"6\">" );
sb.Append( "<div class=\"itemname\" style=\"text-align: center;\">" );
sb.Append( stratum + "-" + floor );
sb.Append( "</div>" );
sb.Append( "</td>" );
sb.Append( "</tr>" );
}
for ( int y = 0; y < VerticalTiles; y++ ) {
sb.Append( "<tr>" );
for ( int x = 0; x < HorizontalTiles; x++ ) {
sb.Append( TileList[(int)( y * HorizontalTiles + x )].GetDataAsHtml( stratum, floor, Enemies, EnemyGroups, EncounterGroups, version, treasures, items, inGameIdDict, phpLinks: phpLinks ) );
}
sb.Append( "</tr>" );
//sb.Append( "<tr><td colspan=\"" + HorizontalTiles + "\"><hr></td></tr>" );
}
if ( surroundingTable ) {
sb.Append( "</table>" );
sb.Append( "</div>" );
}
return sb.ToString();
}
示例10: Travian
/// <summary>
/// Initializes a new _instance of the Travian class.
/// </summary>
public Travian(GameVersion version)
{
Version = version;
AI = new AI();
Servers = new List<Server>();
StructureData = new XmlDocument();
//StructureData.Load("structures.xml");
}
示例11: TuningDefinition
public TuningDefinition(TuningStrings tStrings, GameVersion rsVersion, string name = "", bool custom = true)
{
Custom = custom;
Tuning = tStrings;
GameVersion = rsVersion;
UIName = Name = !string.IsNullOrEmpty(name) ? name : NameFromStrings(tStrings);
}
示例12: ArrangementForm
public ArrangementForm(DLCPackageCreator control, GameVersion gameVersion)
: this(new Arrangement
{
SongFile = new SongFile { File = "" },
SongXml = new SongXML { File = "" },
ArrangementType = ArrangementType.Guitar
}, control, gameVersion)
{
}
示例13: GetCategoryName
public static string GetCategoryName( uint cat, GameVersion version, Dictionary<uint, TSS.TSSEntry> inGameIdDict )
{
switch ( cat ) {
case 6: return inGameIdDict[33912145u].StringEngOrJpnHtml( version );
case 7: return inGameIdDict[33912144u].StringEngOrJpnHtml( version );
case 8: return inGameIdDict[33912162u].StringEngOrJpnHtml( version );
default: return inGameIdDict[33912138u + cat].StringEngOrJpnHtml( version );
}
}
示例14: ItemForm
public ItemForm( GameVersion version, ItemDat itemDat, TSSFile TSS, T8BTSK.T8BTSK skills, T8BTEMST.T8BTEMST enemies, COOKDAT.COOKDAT cookdat, WRLDDAT.WRLDDAT locations )
{
InitializeComponent();
this.Version = version;
this.itemDat = itemDat;
this.TSS = TSS;
this.Skills = skills;
this.Enemies = enemies;
this.Recipes = cookdat;
this.Locations = locations;
this.InGameIdDict = TSS.GenerateInGameIdDictionary();
labels = new List<Label>();
textboxes = new List<TextBox>();
for ( int i = 0; i < ItemDatSingle.size / 4; ++i ) {
Label l = new Label();
l.Text = "";
l.Size = new System.Drawing.Size( 100, 20 );
TextBox b = new TextBox();
b.Size = new System.Drawing.Size( 50, 20 );
b.Text = "";
labels.Add( l );
textboxes.Add( b );
FlowLayoutPanel p = new FlowLayoutPanel();
p.Size = new System.Drawing.Size( 200, 20 );
p.FlowDirection = FlowDirection.LeftToRight;
p.Controls.Add( l );
p.Controls.Add( b );
switch ( (ItemData)i ) {
case ItemData.NamePointer:
case ItemData.DescriptionPointer:
case ItemData.UnknownTextPointer:
case ItemData.TextIDPart1:
case ItemData.TextIDPart2:
case ItemData.TextIDPart3:
case ItemData.TextIDPart4:
case ItemData.TextIDPart5:
case ItemData.TextIDPart6:
case ItemData.TextIDPart7:
case ItemData.TextIDPart8:
break;
default:
flowLayoutPanel1.Controls.Add( p );
break;
}
}
foreach ( ItemDatSingle i in itemDat.items ) {
var entry = GetEntry( i.Data[(int)ItemData.NamePointer] );
listBox1.Items.Add( entry.StringEngOrJpn );
}
}
示例15: EvolutionTree
public EvolutionTree(byte[][] data, GameVersion game, PersonalTable personal, int maxSpecies)
{
Game = game;
Personal = personal;
MaxSpecies = maxSpecies;
switch (game)
{
case GameVersion.SM:
Entries.AddRange(data.Select(d => new EvolutionSet7(d)));
break;
case GameVersion.ORAS:
Entries.AddRange(data.Select(d => new EvolutionSet6(d)));
break;
}
// Create Lineages
Lineage = new EvolutionLineage[Entries.Count];
for (int i = 0; i < Entries.Count; i++)
Lineage[i] = new EvolutionLineage();
if (Game == GameVersion.ORAS)
Array.Resize(ref Lineage, maxSpecies + 1);
// Populate Lineages
for (int i = 1; i < Lineage.Length; i++)
{
// Iterate over all possible evolutions
var s = Entries[i];
foreach (EvolutionMethod evo in s.PossibleEvolutions)
{
int index = getIndex(evo);
if (index < 0)
continue;
var sourceEvo = evo.Copy(i);
Lineage[index].Insert(sourceEvo);
// If current entries has a pre-evolution, propagate to evolution as well
if (Lineage[i].Chain.Count > 0)
Lineage[index].Insert(Lineage[i].Chain[0]);
if (index >= i) continue;
// If destination species evolves into something (ie a 'baby' Pokemon like Cleffa)
// Add it to the corresponding parent chains
foreach (EvolutionMethod mid in Entries[index].PossibleEvolutions)
{
int newIndex = getIndex(mid);
if (newIndex < 0)
continue;
Lineage[newIndex].Insert(sourceEvo);
}
}
}
fixEvoTreeManually();
}