资源简介

Terraria源码英文-支持中文 此源码运行的Terraria是英文的 支持中文输入法和显示中文

资源截图

代码片段和文件信息

using System;
namespace Extensions
{
public static class EnumerationExtensions
{
private class _Value
{
private static Type _UInt64 = typeof(ulong);
private static Type _UInt32 = typeof(long);
public long? Signed;
public ulong? Unsigned;
public _Value(object value Type type)
{
if (!type.IsEnum)
{
throw new ArgumentException(“Value provided is not an enumerated type!“);
}
Type underlyingType = Enum.GetUnderlyingType(type);
if (underlyingType.Equals(EnumerationExtensions._Value._UInt32) || underlyingType.Equals(EnumerationExtensions._Value._UInt64))
{
this.Unsigned = new ulong?(Convert.ToUInt64(value));
return;
}
this.Signed = new long?(Convert.ToInt64(value));
}
}
public static T Include(this Enum value T append)
{
Type type = value.GetType();
object obj = value;
EnumerationExtensions._Value value2 = new EnumerationExtensions._Value(append type);
if (value2.Signed.HasValue)
{
obj = (Convert.ToInt64(value) | value2.Signed.Value);
}
else if (value2.Unsigned.HasValue)
{
obj = (Convert.ToUInt64(value) | value2.Unsigned.Value);
}
return (T)((object)Enum.Parse(type obj.ToString()));
}
public static T Remove(this Enum value T remove)
{
Type type = value.GetType();
object obj = value;
EnumerationExtensions._Value value2 = new EnumerationExtensions._Value(remove type);
if (value2.Signed.HasValue)
{
obj = (Convert.ToInt64(value) & ~value2.Signed.Value);
}
else if (value2.Unsigned.HasValue)
{
obj = (Convert.ToUInt64(value) & ~value2.Unsigned.Value);
}
return (T)((object)Enum.Parse(type obj.ToString()));
}
public static bool Has(this Enum value T check)
{
Type type = value.GetType();
EnumerationExtensions._Value value2 = new EnumerationExtensions._Value(check type);
if (value2.Signed.HasValue)
{
return (Convert.ToInt64(value) & value2.Signed.Value) == value2.Signed.Value;
}
return value2.Unsigned.HasValue && (Convert.ToUInt64(value) & value2.Unsigned.Value) == value2.Unsigned.Value;
}
public static bool Missing(this Enum obj T value)
{
return !obj.Has(value);
}
}
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2015-08-17 13:29  .vs\
     目录           0  2015-08-17 13:29  .vs\Terraria\
     目录           0  2015-08-17 13:33  .vs\Terraria\v14\
     文件      182272  2015-10-03 15:23  .vs\Terraria\v14\.suo
     目录           0  2015-08-21 10:25  Extensions\
     文件        2283  2015-08-15 13:33  Extensions\EnumerationExtensions.cs
     目录           0  2015-10-03 15:23  Miccrosoft.Xna.framework\
     文件         564  2015-08-17 13:34  Miccrosoft.Xna.framework\CharTile.cs
     文件        4006  2015-10-03 15:23  Miccrosoft.Xna.framework\SpriteBatchCN.cs
     文件       10206  2015-08-17 13:34  Miccrosoft.Xna.framework\SpriteFontX.cs
     文件          20  2015-08-15 13:53  Microsoft.Xna.framework.RuntimeProfile
     目录           0  2015-08-21 12:57  Nuclex\
     文件         391  2015-08-17 13:35  Nuclex\IMM.cs
     文件        3811  2015-08-21 12:57  Nuclex\WindowInputCapturer.cs
     文件         194  2015-08-17 13:35  Nuclex\WindowsMessage.cs
     目录           0  2015-08-21 10:25  Properties\
     文件         980  2015-08-15 23:55  Properties\AssemblyInfo.cs
     目录           0  2015-08-17 13:33  System.Linq\
     文件        1473  2015-08-17 13:35  System.Linq\SpriteFontXDrawString.cs
     目录           0  2015-10-03 09:49  Terraria\
     文件        4251  2015-08-15 13:34  Terraria\Animation.cs
     文件        2792  2015-08-15 13:33  Terraria\BitsByte.cs
     文件       49523  2015-08-15 23:16  Terraria\Chest.cs
     文件        9643  2015-08-15 13:36  Terraria\Cloud.cs
     文件       97733  2015-08-15 23:17  Terraria\Collision.cs
     文件        5431  2015-08-15 13:34  Terraria\CombatText.cs
     文件        7657  2015-08-15 13:33  Terraria\DelegateMethods.cs
     文件       65564  2015-08-15 23:17  Terraria\Dust.cs
     文件        3231  2015-08-15 13:34  Terraria\Entity.cs
     文件       13119  2015-08-15 13:33  Terraria\Framing.cs
     文件       22217  2015-08-15 13:33  Terraria\Gore.cs
............此处省略370个文件信息

评论

共有 条评论