本文整理汇总了C#中Functions.Load方法的典型用法代码示例。如果您正苦于以下问题:C# Functions.Load方法的具体用法?C# Functions.Load怎么用?C# Functions.Load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Functions
的用法示例。
在下文中一共展示了Functions.Load方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BillboardSystem
public BillboardSystem(GraphicsDevice graphicsDevice, Functions.AssetHolder assets, Texture2D texture, Vector2 billboardSize, Vector3[] positions)
{
this.positions = positions;
this.nBillboards = positions.Length;
this.billboardSize = billboardSize;
this.graphicsDevice = graphicsDevice;
this.texture = texture;
greenCircle = assets.Load<Texture2D>("circle");
effect = assets.Load<Effect>("billboardingeffect");
Random r = new Random();
generateBillBoard(positions);
}
示例2: Load
/// <summary>
/// Use this method to load a new texture. This can be used for a first time but also to load a new texture later on.
/// </summary>
/// <param name="assets">The contentmanager.</param>
/// <param name="key">The path to the key in your content porject.</param>
/// <param name="frameCount">The amount of frames the spritesheet consists of.</param>
/// <param name="framesPerSec">How many frames you want to show per second.</param>
public void Load(Functions.AssetHolder assets, string key, int frameCount, int framesPerSec)
{
framecount = frameCount;
myTexture = assets.Load<Texture2D>(key);
this.Origin = new Vector2(this.myTexture.Width / (2 * framecount), this.myTexture.Height / 2);
timePerFrame = (float)1 / framesPerSec;
Frame = 0;
totalElapsed = 0;
paused = false;
}