本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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;
}
示例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");
}
示例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;
}
示例7: LoadContent
public override void LoadContent(IContentManager contentManager)
{
this.FindAll<ListBoxItem>(_items);
_swapAnimation = contentManager.Load<Animation>(SwapAnimation, true);
_swapAnimation.Bind(_swapRoot);
}
示例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;
}
示例9: Load
public override object Load(IContentManager contentManager)
{
INode node = contentManager.Load<INode>(NodeAssetName, true);
LoadProperties(contentManager, node);
return node;
}