当前位置: 首页>>代码示例>>C#>>正文


C# Functions.Load方法代码示例

本文整理汇总了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);
        }
开发者ID:Whojoo,项目名称:LittleFlame,代码行数:14,代码来源:BillBoarding.cs

示例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;
 }
开发者ID:Whojoo,项目名称:LittleFlame,代码行数:17,代码来源:AnimatedTexture.cs


注:本文中的Functions.Load方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。