本文整理汇总了C#中Microsoft.Load方法的典型用法代码示例。如果您正苦于以下问题:C# Microsoft.Load方法的具体用法?C# Microsoft.Load怎么用?C# Microsoft.Load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft
的用法示例。
在下文中一共展示了Microsoft.Load方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadContent
public override void LoadContent(Microsoft.Xna.Framework.Content.ContentManager content)
{
//do not remove this
base.LoadBasicContent(content);
logo = content.Load<Texture2D>("logo");
}
示例2: FontManager
public FontManager(GraphicsDevice graphicsDevice, Microsoft.Xna.Framework.Content.ContentManager content, int appWinHeight)
{
m_LabelColor = Color.Red;
m_TopEchoColor = Color.Black;
m_BottomEchoColor = Color.Black;
ComputeFontPositions(appWinHeight);
m_LabelFont = null;
m_EchoFont = null;
m_DrawHelper = null;
const String path1 = @"Resources/Fonts/Arial";
const String path2 = @"Content/Resources/Fonts/Arial";
String usePath = null;
#if WINDOWS_PHONE
usePath = path2;
#else
if (File.Exists(string.Concat(path1, ".xnb")))
usePath = path1;
else if (File.Exists(string.Concat(path2, ".xnb")))
usePath = path2;
#endif
if (null!=usePath) {
m_LabelFont = content.Load<SpriteFont>(usePath);
m_EchoFont = content.Load<SpriteFont>(usePath);
Vector2 spaceSize = m_EchoFont.MeasureString(" ");
m_SpaceFillerWidth = spaceSize.X;
}
}
示例3: LoadContent
public override void LoadContent(Microsoft.Xna.Framework.Content.ContentManager content, string assetName)
{
base.LoadContent(content, assetName);
heart2 = content.Load<Texture2D>("heartv2");
heart1 = content.Load<Texture2D>("heartv1");
Position = new Microsoft.Xna.Framework.Vector2(0,0);
}
示例4: Init
public override void Init(Microsoft.Xna.Framework.Content.ContentManager content)
{
base.Init(content);
this.collider = new RectangleCollider(new Vector2(0, 0), new Vector2(64, 64));
Random r = new Random();
int choo = r.Next(0,100);
if(choo < 3)
{
this.texture = new AnimatedTexture2D(content.Load<Texture2D>(FileNames.jewelPurple), 64, animationSub.def);
this.loot = 2500;
}
else if (choo < 10)
{
this.texture = new AnimatedTexture2D(content.Load<Texture2D>(FileNames.jewelBlue), 64, animationSub.def);
this.loot = 2000;
}
else if (choo < 20)
{
this.texture = new AnimatedTexture2D(content.Load<Texture2D>(FileNames.jewelOrange), 64, animationSub.def);
this.loot = 1500;
}
else if (choo < 50)
{
this.texture = new AnimatedTexture2D(content.Load<Texture2D>(FileNames.jewelGreen), 64, animationSub.def);
this.loot = 1000;
}
else
{
this.texture = new AnimatedTexture2D(content.Load<Texture2D>(FileNames.jewelRed), 64, animationSub.def);
this.loot = 500;
}
this.texture.skipC = 4;
}
示例5: InitOne
public override bool InitOne(Microsoft.Xna.Framework.Content.ContentManager content, int id)
{
XmlDocument _doc = new XmlDocument();
_doc.Load(_xmlInfo);
XmlNode _label = _doc.SelectSingleNode("//Label[@id = '" + id.ToString() + "']");
_prototype[id] = new Label();
_prototype[id]._nsprite = 1;
_prototype[id]._sprite = new GameSprite[_prototype[id]._nsprite];
Texture2D _tempTexture = content.Load<Texture2D>(_label.SelectSingleNode ("BackGround").InnerText);
_prototype[id]._sprite[0] = new GameSprite(_tempTexture, 0, 0);
((Label)_prototype[id]).Sf = content.Load<SpriteFont>(_label.SelectSingleNode("Font").InnerText);
((Label)_prototype[id]).StringInfo = _label.SelectSingleNode("StringInfo").InnerText;
_prototype[id].X = int.Parse(_label.SelectSingleNode("X").InnerText);
_prototype[id].Y = int.Parse(_label.SelectSingleNode("Y").InnerText);
_prototype[id].OffSetX = _prototype[id].X;
_prototype[id].OffSetY = _prototype[id].Y;
((Label)_prototype[id]).DrawOffSetX = int.Parse(_label.SelectSingleNode("DrawOffSetX").InnerText);
((Label)_prototype[id]).DrawOffSetY = int.Parse(_label.SelectSingleNode("DrawOffSetY").InnerText);
float _red = float.Parse(_label.SelectSingleNode("Color").SelectSingleNode("R").InnerText);
float _green = float.Parse(_label.SelectSingleNode("Color").SelectSingleNode("G").InnerText);
float _blue = float.Parse(_label.SelectSingleNode("Color").SelectSingleNode("B").InnerText);
((Label)_prototype[id]).StringColor = new Color(_red, _green, _blue);
return true;
}
示例6: Item
public Item(int id, Microsoft.Xna.Framework.Content.ContentManager content)
{
_ID = id;
if (_ID == (int)ItemName.Apple)
{
_texture = content.Load<Texture2D>("Sprites\\Apple");
_description = "Restores a small amount of health when eaten.";
}
if (_ID == (int)ItemName.Golden_Apple)
{
_texture = content.Load<Texture2D>("Sprites\\GoldenApple");
_description = "Fully restores a creature when eaten.";
}
if (_ID == (int)ItemName.Spring_Water)
{
_texture = content.Load<Texture2D>("Sprites\\SpringWater");
_description = "Fresh from the springs. Fully restores stamina.";
}
if (_ID == (int)ItemName.Honey)
{
_texture = content.Load<Texture2D>("Sprites\\Honey");
_description = "Sugary goodness. Increases a creature's obedience.";
}
if (_ID == (int)ItemName.Chilli)
{
_texture = content.Load<Texture2D>("Sprites\\Chilli");
_description = "Makes a creature more aggressive when eaten.";
}
}
示例7: LoadTexture
public override void LoadTexture( Microsoft.Xna.Framework.Content.ContentManager Content )
{
Texture = Content.Load<Texture2D>( "Sprites\\ExtraLife" );
Halo = Content.Load<Texture2D>( "Sprites\\ExtraAlive" );
Origin = new Vector2( 16, 16 );
Scale = 2.0F;
}
示例8: Validate
public bool Validate(FileCollection sourceFiles, Microsoft.SharePoint.Client.ClientContext ctx)
{
int scount = 0;
int tcount = 0;
foreach (var sf in sourceFiles)
{
scount++;
string fileName = sf.Src;
string folderName = sf.Folder;
string fileUrl = UrlUtility.Combine(ctx.Web.ServerRelativeUrl, folderName + "/" + fileName);
var file = ctx.Web.GetFileByServerRelativeUrl(UrlUtility.Combine(ctx.Web.ServerRelativeUrl, folderName + "/" + fileName));
ctx.Load(file, f => f.Exists, f => f.Length);
ctx.ExecuteQuery();
if (file.Exists)
{
tcount++;
#region File - Security
if (sf.Security != null)
{
ctx.Load(file, f => f.ListItemAllFields);
ctx.ExecuteQuery();
bool isSecurityMatch = ValidateSecurityCSOM(ctx, sf.Security, file.ListItemAllFields);
if (!isSecurityMatch)
{
return false;
}
}
#endregion
#region Overwrite validation
if (sf.Overwrite == false)
{
// lookup the original added file size...should be different from the one we retrieved from SharePoint since we opted to NOT overwrite
var files = System.IO.Directory.GetFiles(@".\framework\functional\templates");
foreach (var f in files)
{
if (f.Contains(sf.Src))
{
if (new System.IO.FileInfo(f).Length == file.Length)
{
return false;
}
}
}
}
#endregion
}
else
{
return false;
}
}
return true;
}
示例9: Load
public override void Load(Microsoft.Xna.Framework.Content.ContentManager contentManager)
{
soundEffectList.Add("dance", contentManager.Load<SoundEffect>(@"Audio\Effects\tingle_dance"));
soundEffectList.Add("hoi", contentManager.Load<SoundEffect>(@"Audio\Effects\tingle_hoi"));
soundEffectList.Add("laugh", contentManager.Load<SoundEffect>(@"Audio\Effects\tingle_laugh"));
soundEffectList.Add("magic", contentManager.Load<SoundEffect>(@"Audio\Effects\tingle_magic"));
base.Load(contentManager);
}
示例10: LoadContent
public static void LoadContent(Microsoft.Xna.Framework.Content.ContentManager Content)
{
playlist.Add("Amazing Plan", Content.Load<Song>("Music\\AmazingPlan"));
playlist.Add("Fig Leaf Rag", Content.Load<Song>("Music\\FigLeafRag"));
playlist.Add("Dark Hallway", Content.Load<Song>("Music\\DarkHallway"));
playlist.Add("Clay", Content.Load<Song>("Music\\madeofclay"));
}
示例11: Initialize
public override void Initialize(Microsoft.Xna.Framework.Content.ContentManager contentLoader, Manifracture.ComponentManifest manifest)
{
IrradianceMap = contentLoader.Load<Texture2D>((string)(manifest.Properties[ManifestKeys.IRRADIANCEMAP]));
SpecPrefilter = contentLoader.Load<Texture2D>((string)(manifest.Properties[ManifestKeys.SPECPREFILTER]));
NumSpecLevels = (int)(manifest.Properties[ManifestKeys.NUMSPECLEVELS]);
SpecExponentFactor = (float)(manifest.Properties[ManifestKeys.SPECEXPONENTFACTOR]);
AmbientLight = (Vector3)(manifest.Properties[ManifestKeys.AMBIENTLIGHT]);
Owner.ActorInitialized += ActorInitializedHandler;
}
示例12: IMGui
public IMGui(Microsoft.Xna.Framework.Content.ContentManager a_content, GraphicsDevice a_graphicsDevice, MegaJump.Model.MainModel a_mainmodel)
{
// TODO: Complete member initialization
m_content = a_content;
m_spriteBatch = new SpriteBatch(a_graphicsDevice);
m_spriteFont = a_content.Load<SpriteFont>("Courier New");
m_menuFont = a_content.Load<SpriteFont>("MenuButtons");
m_texture = a_content.Load<Texture2D>("button");
m_backGround = a_content.Load<Texture2D>("MenuBackground");
m_mainModel = a_mainmodel;
}
示例13: LoadContent
public override void LoadContent(Microsoft.Xna.Framework.Content.ContentManager Content)
{
bakcground.LoadContent(Content);
objectManager.LoadContent(Content);
objectManager.AddObject(player);
this.texture2 = Content.Load<Texture2D>("sprites/Pause");
this.sound = Content.Load<Song>("sounds/space");
base.LoadContent(Content);
MediaPlayer.Play(this.sound);
MediaPlayer.Volume = 2f;
MediaPlayer.IsRepeating = true;
}
示例14: LoadContent
public override void LoadContent(Microsoft.Xna.Framework.Content.ContentManager content)
{
glove = new Image_MenuItem(new Vector2(clientBounds.X + clientBounds.Width / 4, clientBounds.Y + 3 * clientBounds.Height / 4),
content.Load<Texture2D>("Menu/Punch_Glove"), 200, 200);
butlerHand = new Image_MenuItem(new Vector2(clientBounds.X + clientBounds.Width / 4, clientBounds.Y + 3 * clientBounds.Height / 4),
content.Load<Texture2D>("Menu/ButlerHand_Idle"), 200, 200);
items.Add(glove);
items.Add(butlerHand);
base.LoadContent(content);
}
示例15: LoadContent
public override void LoadContent(Microsoft.Xna.Framework.Content.ContentManager Content, Microsoft.Xna.Framework.Graphics.SpriteBatch sprBatch)
{
m_sprBatch = sprBatch;
Background = Content.Load<Texture2D>("GameState/Graphics/Credits/creditScreen");
Cursor = Content.Load<Texture2D>("FallDown/Textures/cursor");
Arrow = Content.Load<Texture2D>("FallDown/Textures/arrow");
ListFont = Content.Load<SpriteFont>("FallDown/Textures/ScoreFont");
ArrowPosition = new Vector2(0, 480 - 50);
base.LoadContent(Content, sprBatch);
}