本文整理汇总了C#中Core.Create方法的典型用法代码示例。如果您正苦于以下问题:C# Core.Create方法的具体用法?C# Core.Create怎么用?C# Core.Create使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Core
的用法示例。
在下文中一共展示了Core.Create方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Registrar
public bool Registrar(Dispositivos d)
{
Core c = new Core();
c.ent = d;
if (c.Create())
return true;
else
return false;
}
示例2: Generate
public Core.Entity Generate(Core.EntitySet set, Resources.ResourceCache cache, string entityName, Dictionary<string, object> parameters)
{
var e = set.Create(entityName);
var sprite = e.AddComponent<Sprite>();
if (r == null)
r = new Random((int)(DateTime.Now.Ticks % (long)int.MaxValue));
var path = "Data/Texture/house" + r.Next(500) % (MaxIndex + 1) + ".png";
sprite.Load(cache, path);
sprite.Origin = new SharpDX.Vector2(160f / 2f);
var rot = parameters.GetOrDefault("Rotation", 0f);
e.Transform.LocalRotation = rot;
var area = e.AddComponent<ClickArea>();
area.BaseWidth = 160;
area.BaseHeight = 160;
area.OriginX = sprite.Origin.X;
area.OriginY = sprite.Origin.Y;
return e;
}
示例3: CreateGist
private static Core.Models.Gist CreateGist(Core.API.Gist gistApi)
{
var gistFiles = new Dictionary<string, Core.Models.GistFileForCreation>
{
{
"fileName.txt", new Core.Models.GistFileForCreation
{
content = System.Guid.NewGuid().ToString()
}
}
};
var toCreate = new Core.Models.GistToCreateOrEdit
{
description = "test gist",
@public = false,
files = gistFiles
};
var createdGist = gistApi.Create(toCreate);
return createdGist;
}