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


C# IContentManager.Load方法代码示例

本文整理汇总了C#中IContentManager.Load方法的典型用法代码示例。如果您正苦于以下问题:C# IContentManager.Load方法的具体用法?C# IContentManager.Load怎么用?C# IContentManager.Load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IContentManager的用法示例。


在下文中一共展示了IContentManager.Load方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: LoadContent

        public override void LoadContent(IContentManager contentManager)
        {
            NamePosition = this.Find("Name");
            ScorePosition = this.Find("Score");

            Font = contentManager.Load<SpriteFont>("Fonts/Gabriola54");
            Hover = contentManager.Load<Animation>("Animations/HouseHover", true);
            Hover.Bind(this);
            Hover.Play();
            Hover.FrameTime = RandomHelper.Next(0f, 60f);
            Hover.Fps = RandomHelper.Next(6f, 10f);
        }
开发者ID:bobsum,项目名称:PLan2015,代码行数:12,代码来源:House.cs

示例2: LoadContent

        public void LoadContent(IContentManager<DemoGameContent> contentManager)
        {
            this.sprite = new Sprite(contentManager.Load<SpriteSheet>(DemoGameContent.Ship));
            this.sprite.Frame = 1;
            this.sprite.Origin = new Vector2(40, 40);

            this.sprite.AddChild(new Sprite(contentManager.Load<SpriteSheet>(DemoGameContent.ShipFlame)));
            this.sprite.Children[0].Frame = 0;
            this.sprite.Children[0].Origin = new Vector2(8, 8);
            this.sprite.Children[0].Position = new Vector2(40, 88);

            this.blasterSoundEffect = contentManager.Load<SoundEffect>(DemoGameContent.Blaster);
        }
开发者ID:smack0007,项目名称:Snowball_v1,代码行数:13,代码来源:Ship.cs

示例3: LoadContent

        public override void LoadContent(IContentManager contentManager)
        {
            A = this.Find("A");
            B = this.Find("B");

            Animation = contentManager.Load<Animation>("Animations/SchoolSwap", true);
            Animation.Bind(this);
        }
开发者ID:bobsum,项目名称:PLan2015,代码行数:8,代码来源:Swap.cs

示例4: LoadProperties

        protected override void LoadProperties(IContentManager contentManager, INode node)
        {
            base.LoadProperties(contentManager, node);

            Sprite sprite = (Sprite)node;
            sprite.Texture = contentManager.Load<Texture2D>(TextureAssetName);
            sprite.Rectangle = Rectangle;
            sprite.Origin = Origin;
            sprite.Color = Color;
        }
开发者ID:bobsum,项目名称:PLan2015,代码行数:10,代码来源:SpriteUsingTextureAsset.cs

示例5: LoadContent

        public override void LoadContent(IContentManager contentManager)
        {
            ScorePosition = this.Find("Score");
            HouseListBox = this.Find<ListBox>("HouseListBox");
            HouseListBox.Comparer = HouseComparer;

            Font = contentManager.Load<SpriteFont>("Fonts/Gabriola200");
            Hover = contentManager.Load<Animation>("Animations/SchoolHover", true);
            Hover.Bind(this);
            Hover.Play();
            Hover.FrameTime = RandomHelper.Next(0f, 60f);
            Hover.Fps = RandomHelper.Next(6f, 10f);

            MagicExplosionEmitter = this.Find<ParticleEmitter>("MagicExplosionEmitter");
        }
开发者ID:bobsum,项目名称:PLan2015,代码行数:15,代码来源:School.cs

示例6: Initialize

		public override void Initialize(IContentManager contentManager, Scene scene)
		{
			var asset = contentManager.Load<Balder.Core.Objects.Geometries.Mesh>(AssetName);
			scene.AddNode(asset);
			Node = asset;
		}
开发者ID:tekbob27,项目名称:Balder,代码行数:6,代码来源:Mesh.cs

示例7: LoadContent

        public override void LoadContent(IContentManager contentManager)
        {
            this.FindAll<ListBoxItem>(_items);

            _swapAnimation = contentManager.Load<Animation>(SwapAnimation, true);
            _swapAnimation.Bind(_swapRoot);
        }
开发者ID:bobsum,项目名称:PLan2015,代码行数:7,代码来源:ListBox.cs

示例8: Load

 public override object Load(IContentManager contentManager)
 {
     SpriteParticleSystem spriteParticleSystem = new SpriteParticleSystem();
     spriteParticleSystem.SpriteFrames = contentManager.Load<SpriteFrame[]>(SpriteSheetAssetName);
     spriteParticleSystem.Colors = Colors;
     spriteParticleSystem.AnimationMode = AnimationMode;
     spriteParticleSystem.ColorMode = ColorMode;
     spriteParticleSystem.InitialVelocityMode = InitialVelocityMode;
     spriteParticleSystem.RotationMode = RotationMode;
     spriteParticleSystem.EmitCount = EmitCount;
     spriteParticleSystem.EmitPosition = EmitPosition;
     spriteParticleSystem.EmitRadius = EmitRadius;
     spriteParticleSystem.EmitAngle = EmitAngle;
     spriteParticleSystem.InitialVelocity = InitialVelocity;
     spriteParticleSystem.InitialRotation = InitialRotation;
     spriteParticleSystem.InitialAngularVelocity = InitialAngularVelocity;
     spriteParticleSystem.InitialScale = InitialScale;
     spriteParticleSystem.Duration = Duration;
     spriteParticleSystem.Gravity = Gravity;
     spriteParticleSystem.Damping = Damping;
     spriteParticleSystem.ScaleFactor = ScaleFactor;
     spriteParticleSystem.FadeInDuration = FadeInDuration;
     spriteParticleSystem.FadeOutDuration = FadeOutDuration;
     return spriteParticleSystem;
 }
开发者ID:bobsum,项目名称:PLan2015,代码行数:25,代码来源:SpriteParticleSystemAsset.cs

示例9: Load

 public override object Load(IContentManager contentManager)
 {
     INode node = contentManager.Load<INode>(NodeAssetName, true);
     LoadProperties(contentManager, node);
     return node;
 }
开发者ID:bobsum,项目名称:PLan2015,代码行数:6,代码来源:NodeReferenceAsset.cs


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