本文整理汇总了C#中PlatformType类的典型用法代码示例。如果您正苦于以下问题:C# PlatformType类的具体用法?C# PlatformType怎么用?C# PlatformType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PlatformType类属于命名空间,在下文中一共展示了PlatformType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Setup
public void Setup(PlatformType? type = null)
{
Type = type == null ? GetRandomType() : type.Value;
switch (Type)
{
case PlatformType.Deafult:
gameObject.renderer.material.color = Color.white;
break;
case PlatformType.HighBounce:
Boost *= 1.33f;
gameObject.renderer.material.color = Color.blue;
break;
case PlatformType.LowBounce:
Boost /= 2;
gameObject.renderer.material.color = Color.red;
break;
case PlatformType.QuadrupleMoney:
Money *= 4;
gameObject.renderer.material.color = Color.yellow;
break;
case PlatformType.MovingHorizontal:
gameObject.renderer.material.color = Color.green;
gameObject.AddComponent<MoveBackAndForth>();
break;
}
}
开发者ID:EricFreeman,项目名称:DoodleJump,代码行数:26,代码来源:Platform.cs
示例2: InitPlatform
public static void InitPlatform()
{
Type = PlatformType.UNKNOWN;
switch (Environment.OSVersion.Platform)
{
case PlatformID.Win32NT:
case PlatformID.Win32S:
case PlatformID.Win32Windows:
case PlatformID.WinCE:
Type = PlatformType.WINDOWS;
break;
case PlatformID.MacOSX:
Type = PlatformType.MAC;
break;
}
if(Type == PlatformType.UNKNOWN)
{
int platformCode = (int)Environment.OSVersion.Platform;
if (platformCode == 4 || platformCode == 6 || platformCode == 128)
{
Type = PlatformType.LINUX;
}
}
}
开发者ID:cwalter5,项目名称:Terraria-s-Dedicated-Server-Mod,代码行数:26,代码来源:Platform.cs
示例3: CreateMessageData
public static MessageData CreateMessageData(Guid msgid, PlatformType platform, string tellerno, string orgno, int msgbiztype, byte[] codemsg)
{
MessageData msgdata = new MessageData { MessageID = msgid, FirstTime = DateTime.Now, TragetPlatform = platform, TellerNO = tellerno, OrgNO=orgno, MsgBizType=msgbiztype, ReSentTime = 0 };
msgdata.ReqPackageList.Enqueue(new PackageData(1, codemsg));
msgdata.IsMultiPackage = false;
return msgdata;
}
开发者ID:joeiren,项目名称:quant.AidSystem,代码行数:7,代码来源:MsgHandlerEntry.cs
示例4: InitPlatform
/// <summary>
/// Determines the current platform
/// </summary>
public static void InitPlatform()
{
switch (Environment.OSVersion.Platform)
{
case PlatformID.Unix:
Type = (
Directory.Exists("/Applications")
&& Directory.Exists("/System")
&& Directory.Exists("/Users")
&& Directory.Exists("/Volumes")
) ? PlatformType.MAC : PlatformType.LINUX;
break;
case PlatformID.MacOSX:
Type = PlatformType.MAC;
break;
case PlatformID.Win32NT:
case PlatformID.Win32S:
case PlatformID.Win32Windows:
case PlatformID.WinCE:
case PlatformID.Xbox:
Type = PlatformType.WINDOWS;
break;
default:
Type = PlatformType.UNKNOWN;
break;
}
}
开发者ID:hastinbe,项目名称:Open-Terraria-API,代码行数:30,代码来源:Platform.cs
示例5: Register
public void Register(string deviceModel, PlatformType platformType, string carrier, string platformOS, int timeZoneOffset, string locale, string manufac, Tuple<int, int> resolution)
{
DeviceInfo deviceInfo = new DeviceInfo()
{
Model = deviceModel,
PlatformType = platformType,
Carrier = carrier,
OperatingSystem = platformOS,
TimeZoneOffset = timeZoneOffset,
Locale = locale,
ResolutionHeight = resolution.Item1,
ResolutionWidth = resolution.Item2,
Manufactorer = manufac,
DateCreated = this.DateCreated,
Date = this.DateCreated.Date
};
ApplicationInfo applicationInfo = new ApplicationInfo()
{
ApplicationId = applicationId,
Version = this.Version
};
deviceService.Log(deviceInfo, applicationInfo);
DeviceId = deviceInfo.Guid;
}
开发者ID:Appacts,项目名称:mobile-analytics-server,代码行数:27,代码来源:Device.cs
示例6: PlatformInfo
public PlatformInfo(PlatformType platform, Version version)
{
Should.NotBeNull(platform, nameof(platform));
Should.NotBeNull(version, nameof(version));
_platform = platform;
_version = version;
}
开发者ID:dbeattie71,项目名称:MugenMvvmToolkit,代码行数:7,代码来源:PlatformInfo.cs
示例7: AssemblyProcessorContext
public AssemblyProcessorContext(BaseAssemblyResolver assemblyResolver, AssemblyDefinition assembly, PlatformType platform, TextWriter log)
{
AssemblyResolver = assemblyResolver;
Assembly = assembly;
Platform = platform;
Log = log;
}
开发者ID:psowinski,项目名称:xenko,代码行数:7,代码来源:AssemblyProcessorContext.cs
示例8: Update
// Update is called once per frame
void Update()
{
Transform lastChild = transform.GetChild (transform.childCount - 1);
int auxBeginPercent = 0;
int auxEndPercent = 0;
int randomValue = Random.Range (0, 100);
PlatformType randomType = new PlatformType ();
foreach (PlatformType PlatformType in PlatformsTypes) {
auxEndPercent += PlatformType.Percent;
if (randomValue >= auxBeginPercent && auxBeginPercent < auxEndPercent)
randomType = PlatformType;
auxBeginPercent += PlatformType.Percent;
}
if (lastChild.position.x + 2 - transform.position.x < 0) {
GameObject NewObject = Instantiate (SpawnObjects [0], lastChild.position + new Vector3 (2 + randomType.Width, -lastChild.position.y - (Speed > 0 ? 4.5f : -4.5f) + randomType.Height, 0), transform.rotation) as GameObject;
if(Random.Range(0, 100) < 10 && CurrentGameState == GameManager.GameState.Resume)
NewObject.transform.GetChild(NewObject.transform.childCount - 1).gameObject.SetActive(true);
int randomGravityValue = Random.Range (0, 100);
NewObject.transform.parent = transform;
NewObject.transform.SendMessage ("SetSpeed", Speed);
}
}
开发者ID:rodolfohelfenstein,项目名称:Kouri,代码行数:32,代码来源:SpawnerController.cs
示例9: CancelAuthorize
public override void CancelAuthorize(PlatformType platform)
{
if (ssdk != null)
{
ssdk.Call("removeAccount", (int)platform);
}
}
开发者ID:sunxiang8992,项目名称:New-Unity-For-ShareSDK,代码行数:7,代码来源:AndroidUtils.cs
示例10: PlatformInfo
public PlatformInfo(PlatformType platform, Version version)
{
Should.NotBeNull(platform, "platform");
Should.NotBeNull(version, "version");
_platform = platform;
_version = version;
}
开发者ID:FilipHerman,项目名称:MugenMvvmToolkit,代码行数:7,代码来源:PlatformInfo.cs
示例11: GetAuthorizeConfig
/// <summary>
/// Get authorize config by platform type
/// </summary>
/// <param name="platformType">Soical PlatformType</param>
/// <returns>Authorize Config Value</returns>
public AuthorizeConfig GetAuthorizeConfig(PlatformType platformType)
{
AuthorizeConfig authorizeConfig = null;
StreamResourceInfo configFile = Application.GetResourceStream(new Uri("/MoCommon;component/Social/SocialConfig.xml", UriKind.RelativeOrAbsolute));
XDocument configDoc = XDocument.Load(configFile.Stream);
XElement queryElement = null;
#region read config content from xml file
switch (platformType)
{
case PlatformType.Tencent:
queryElement = configDoc.Elements("social").First().Elements("tencent").First();
break;
case PlatformType.Sina:
queryElement = configDoc.Elements("social").First().Elements("sina").First();
break;
case PlatformType.WeChat:
queryElement = configDoc.Elements("social").First().Elements("wechat").First();
break;
}
authorizeConfig = new AuthorizeConfig()
{
PlatformType = platformType,
AppKey = queryElement.Attributes().Single(x => x.Name == "appkey").Value,
AppSecret = queryElement.Attributes().Single(x => x.Name == "appsecret").Value,
Url = queryElement.Attributes().Single(x => x.Name == "url").Value,
RedirectUrl = queryElement.Attributes().Single(x => x.Name == "redirecturl").Value,
ApiUrl = queryElement.Attributes().Single(x => x.Name == "apiurl").Value,
OauthApiUrl = queryElement.Attributes().Single(x => x.Name == "oauthapiurl").Value
};
#endregion
return authorizeConfig;
}
开发者ID:rodmanwu,项目名称:dribbble-for-windows-phone-8,代码行数:38,代码来源:SocialShareHelper.cs
示例12: Config
private Config()
{
currPlatform = PlatformType.iOS;
gameVersion = "1.0"; // also change in unity editor
serverUrl = "http://personalizedgift.uehelp.com/";
gameTitle = "Danjur";
}
开发者ID:satishinext,项目名称:php,代码行数:7,代码来源:Config.cs
示例13: Authorize
public override void Authorize(int reqID, PlatformType platform)
{
Debug.Log("AndroidUtils ===>>> Authorize" );
if (ssdk != null)
{
ssdk.Call("authorize", reqID, (int)platform);
}
}
开发者ID:sunxiang8992,项目名称:New-Unity-For-ShareSDK,代码行数:8,代码来源:AndroidUtils.cs
示例14: AddFriend
public override void AddFriend(int reqID, PlatformType platform, String account)
{
Debug.Log("AndroidUtils ===>>> FollowFriend" );
if (ssdk != null)
{
ssdk.Call("followFriend", reqID, (int)platform, account);
}
}
开发者ID:sunxiang8992,项目名称:New-Unity-For-ShareSDK,代码行数:8,代码来源:AndroidUtils.cs
示例15: DeviceUpgradeSummary
public DeviceUpgradeSummary(string version, DateTime date, Guid applicationId, PlatformType platformType)
{
this.Version = version;
this.Date = date;
this.ApplicationId = applicationId;
this.PlatformType = platformType;
this.Count += 1;
}
开发者ID:Appacts,项目名称:mobile-analytics-server,代码行数:8,代码来源:DeviceUpgradeSummary.cs
示例16: GetUserInfo
public override void GetUserInfo (int reqID, PlatformType platform)
{
Debug.Log("AndroidUtils ===>>> ShowUser" );
if (ssdk != null)
{
ssdk.Call("showUser", reqID, (int)platform);
}
}
开发者ID:zomeelee,项目名称:New-Unity-For-ShareSDK,代码行数:8,代码来源:AndroidUtils.cs
示例17: IsClientValid
public override bool IsClientValid (PlatformType platform)
{
if (ssdk != null)
{
return ssdk.Call<bool>("isClientValid", (int)platform);
}
return false;
}
开发者ID:zomeelee,项目名称:New-Unity-For-ShareSDK,代码行数:8,代码来源:AndroidUtils.cs
示例18: IsAuthorizedValid
public override bool IsAuthorizedValid (PlatformType platform)
{
if (ssdk != null)
{
return ssdk.Call<bool>("isAuthValid", (int)platform);
}
return false;
}
开发者ID:zomeelee,项目名称:New-Unity-For-ShareSDK,代码行数:8,代码来源:AndroidUtils.cs
示例19: RemoteDriverConfiguration
public RemoteDriverConfiguration(string browser, PlatformType platform, string browserVersion, string seleniumHubUrl, int seleniumHubPort)
{
Browser = browser;
Platform = platform;
BrowserVersion = browserVersion;
SeleniumHubUrl = seleniumHubUrl;
SeleniumHubPort = seleniumHubPort;
}
开发者ID:Varomir,项目名称:SearchCSharp,代码行数:8,代码来源:RemoteDriverConfiguration.cs
示例20: GetFriendList
public override void GetFriendList(int reqID, PlatformType platform, int count, int page)
{
Debug.Log("AndroidUtils ===>>> GetFriendList" );
if (ssdk != null)
{
ssdk.Call("getFriendList", reqID, (int)platform, count, page);
}
}
开发者ID:sunxiang8992,项目名称:New-Unity-For-ShareSDK,代码行数:8,代码来源:AndroidUtils.cs
注:本文中的PlatformType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论