本文整理汇总了C#中IAssetManager类的典型用法代码示例。如果您正苦于以下问题:C# IAssetManager类的具体用法?C# IAssetManager怎么用?C# IAssetManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IAssetManager类属于命名空间,在下文中一共展示了IAssetManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetAccountFamilies
public static IList<IAccountFamily> GetAccountFamilies(IDalSession session, IAssetManager assetManager)
{
List<ICriterion> expressions = new List<ICriterion>();
if (!assetManager.IsStichting)
expressions.Add(Expression.Eq("AssetManager.Key", assetManager.Key));
return session.GetTypedList<AccountFamily,IAccountFamily>(expressions);
}
示例2: Handle
public IAsset Handle(IAssetManager assetManager, string name, IRawAsset data)
{
if (data is CompiledAsset)
{
return new UberEffectAsset(_kernel, _assetContentManager, _rawLaunchArguments, name, null, data.GetProperty<PlatformData>("PlatformData"), false);
}
PlatformData platformData = null;
if (data.GetProperty<PlatformData>("PlatformData") != null)
{
platformData = new PlatformData
{
Platform = data.GetProperty<PlatformData>("PlatformData").Platform,
Data = data.GetProperty<PlatformData>("PlatformData").Data
};
}
var effect = new UberEffectAsset(
_kernel,
_assetContentManager,
_rawLaunchArguments,
name,
data.GetProperty<string>("Code"),
platformData,
data.GetProperty<bool>("SourcedFromRaw"));
return effect;
}
示例3: MyGameWorld
public MyGameWorld(
I2DRenderUtilities renderUtilities,
IAssetManagerProvider assetManagerProvider,
IEntityFactory entityFactory)
{
this.Entities = new List<IEntity>();
_renderUtilities = renderUtilities;
_assetManager = assetManagerProvider.GetAssetManager();
_defaultFont = this._assetManager.Get<FontAsset>("font.Default");
// You can also save the entity factory in a field and use it, e.g. in the Update
// loop or anywhere else in your game.
var entityA = entityFactory.CreateExampleEntity("EntityA");
entityA.X = 100;
entityA.Y = 50;
var entityB = entityFactory.CreateExampleEntity("EntityB");
entityB.X = 120;
entityB.Y = 100;
// Don't forget to add your entities to the world!
this.Entities.Add(entityA);
this.Entities.Add(entityB);
// This pulls in the texture asset via the asset manager. Note that
// the folder seperator from "texture/Player" has been translated
// into a single dot.
_playerTexture = _assetManager.Get<TextureAsset>("texture.Player");
}
示例4: GetNew
public IAsset GetNew(IAssetManager assetManager, string name)
{
return new ElementDefinitionAsset(
assetManager,
name,
null);
}
示例5: LabelUserInterfaceNodeProcessor
public LabelUserInterfaceNodeProcessor(
IAssetManagerProvider assetManagerProvider,
INodeColorParser nodeColorParser)
{
_nodeColorParser = nodeColorParser;
_assetManager = assetManagerProvider.GetAssetManager();
}
示例6: GetCounterAccounts
/// <summary>
/// This method retrieves a list of counter account instances that meet the passed in arguments.
/// When an argument is ommitted it is not used to filter the counter accounts
/// </summary>
/// <param name="session">An instance of the Data Access Library <see cref="T:B4F.TotalGiro.DAL.NHSession">NHSession</see> class</param>
/// <param name="assetManager">The asset manager the customer belongs to</param>
/// <param name="counterAccountNumber">Number of the counter account</param>
/// <param name="counterAccountName">Name of the counter account</param>
/// <param name="contactName">The name of the contact</param>
/// <param name="accountNumber">The account's number of the account</param>
/// <param name="showActive">Show for active contacts</param>
/// <param name="showInactive">Show for inactive contacts</param>
/// <param name="isPublic">Show public contacts</param>
/// <returns>A list of counter account instances</returns>
public static IList<ICounterAccount> GetCounterAccounts(IDalSession session, IAssetManager assetManager,
string counterAccountNumber, string counterAccountName,
string contactName, string accountNumber, bool showActive,
bool showInactive, bool isPublic)
{
Hashtable parameters = new Hashtable();
if (assetManager != null)
parameters.Add("managementCompanyId", assetManager.Key);
if (counterAccountNumber != null && counterAccountNumber.Length > 0)
parameters.Add("counterAccountNumber", Util.PrepareNamedParameterWithWildcard(counterAccountNumber, MatchModes.Anywhere));
if (counterAccountName != null && counterAccountName.Length > 0)
parameters.Add("counterAccountName", Util.PrepareNamedParameterWithWildcard(counterAccountName, MatchModes.Anywhere));
if (contactName != null && contactName.Length > 0)
parameters.Add("contactName", Util.PrepareNamedParameterWithWildcard(contactName, MatchModes.Anywhere));
parameters.Add("isPublic", isPublic);
if (showActive && !showInactive)
parameters.Add("isActive", true);
if (!showActive && showInactive)
parameters.Add("isActive", false);
if (accountNumber != null && accountNumber.Length > 0)
parameters.Add("accountNumber", Util.PrepareNamedParameterWithWildcard(accountNumber, MatchModes.Anywhere));
return session.GetTypedListByNamedQuery<ICounterAccount>(
"B4F.TotalGiro.Accounts.CounterAccount.GetCounterAccounts",
parameters);
}
示例7: GameSystemBase
/// <summary>
/// Initializes a new instance of the <see cref="GameSystemBase" /> class.
/// </summary>
/// <param name="registry">The registry.</param>
/// <remarks>
/// The GameSystem is expecting the following services to be registered: <see cref="IGame"/> and <see cref="IAssetManager"/>.
/// </remarks>
protected GameSystemBase(IServiceRegistry registry)
{
if (registry == null) throw new ArgumentNullException("registry");
this.registry = registry;
game = (GameBase)Services.GetServiceAs<IGame>();
assetManager = Services.GetSafeServiceAs<IAssetManager>();
}
示例8: Handle
/// <summary>
/// Handles loading the specified LogicControl asset from it's raw data.
/// </summary>
/// <param name="assetManager">The asset manager.</param>
/// <param name="name">The name of the LogicControl script.</param>
/// <param name="data">The raw data associated with the asset.</param>
/// <returns>The ScriptAsset from the load.</returns>
public IAsset Handle(IAssetManager assetManager, string name, IRawAsset data)
{
return new ScriptAsset(
name,
data.GetProperty<string>("Code"),
new LogicControlScriptEngine(data.GetProperty<string>("Code")));
}
示例9: Handle
public IAsset Handle(IAssetManager assetManager, string name, dynamic data)
{
return new ElementDefinitionAsset(
assetManager,
name,
(string)data.DisplayNameName);
}
示例10: DefaultAutomaticAssetReload
public DefaultAutomaticAssetReload(
IAssetManager assetManager,
IRawAssetLoader rawAssetLoader)
{
_assetManager = assetManager;
_rawAssetLoader = rawAssetLoader;
_started = false;
}
示例11: GetAccountCategories
public static IList GetAccountCategories(IDalSession session, IAssetManager am)
{
List<ICriterion> expressions = new List<ICriterion>();
expressions.Add(Expression.Eq("AssetManager.Key", am.Key));
List<Order> orderings = new List<Order>();
orderings.Add(Order.Asc("CustomerType"));
return session.GetList(typeof(AccountCategory), expressions, orderings, null, null);
}
示例12: StatusBar
public StatusBar(
I2DRenderUtilities twodRenderUtilities,
IAssetManagerProvider assetManagerProvider)
{
this.m_2DRenderUtilities = twodRenderUtilities;
this.m_AssetManager = assetManagerProvider.GetAssetManager();
this.m_DefaultFont = this.m_AssetManager.Get<FontAsset>("font.Default");
}
示例13: Handle
public IAsset Handle(IAssetManager assetManager, string name, IRawAsset data)
{
return new UserInterfaceAsset(
name,
data.GetProperty<string>("UserInterfaceData"),
data.GetProperty<UserInterfaceFormat>("UserInterfaceFormat"),
data.GetProperty<string>("SourcePath"));
}
示例14: Handle
/// <summary>
/// The handle.
/// </summary>
/// <param name="assetManager">
/// The asset manager.
/// </param>
/// <param name="name">
/// The name.
/// </param>
/// <param name="data">
/// The data.
/// </param>
/// <returns>
/// The <see cref="IAsset"/>.
/// </returns>
public IAsset Handle(IAssetManager assetManager, string name, IRawAsset data)
{
return new LevelAsset(
name,
data.GetProperty<string>("LevelData"),
data.GetProperty<LevelDataFormat>("LevelDataFormat"),
data.GetProperty<string>("SourcePath"));
}
示例15: TychaiaSkin
public TychaiaSkin(
I2DRenderUtilities twodRenderUtilities,
IAssetManagerProvider assetManagerProvider,
BasicSkin basicSkin)
{
this.m_2DRenderUtilities = twodRenderUtilities;
this.m_BasicSkin = basicSkin;
this.m_AssetManager = assetManagerProvider.GetAssetManager(false);
}