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


C# IAssetManager类代码示例

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

示例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;
        }
开发者ID:RedpointGames,项目名称:Protogame,代码行数:28,代码来源:UberEffectAssetLoader.cs

示例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");
        }
开发者ID:hach-que,项目名称:Protogame.Docs,代码行数:29,代码来源:referencing_an_asset_full_code.cs

示例4: GetNew

 public IAsset GetNew(IAssetManager assetManager, string name)
 {
     return new ElementDefinitionAsset(
         assetManager,
         name,
         null);
 }
开发者ID:TreeSeed,项目名称:Tychaia,代码行数:7,代码来源:ElementDefinitionAssetLoader.cs

示例5: LabelUserInterfaceNodeProcessor

 public LabelUserInterfaceNodeProcessor(
     IAssetManagerProvider assetManagerProvider,
     INodeColorParser nodeColorParser)
 {
     _nodeColorParser = nodeColorParser;
     _assetManager = assetManagerProvider.GetAssetManager();
 }
开发者ID:RedpointGames,项目名称:Protogame,代码行数:7,代码来源:LabelUserInterfaceNodeProcessor.cs

示例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);
        }
开发者ID:kiquenet,项目名称:B4F,代码行数:42,代码来源:CounterAccountMapper.cs

示例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>();
 }
开发者ID:h78hy78yhoi8j,项目名称:xenko,代码行数:14,代码来源:GameSystemBase.cs

示例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")));
 }
开发者ID:johnsonc,项目名称:Protogame,代码行数:14,代码来源:LogicControlScriptAssetLoader.cs

示例9: Handle

 public IAsset Handle(IAssetManager assetManager, string name, dynamic data)
 {
     return new ElementDefinitionAsset(
         assetManager,
         name,
         (string)data.DisplayNameName);
 }
开发者ID:TreeSeed,项目名称:Tychaia,代码行数:7,代码来源:ElementDefinitionAssetLoader.cs

示例10: DefaultAutomaticAssetReload

 public DefaultAutomaticAssetReload(
     IAssetManager assetManager,
     IRawAssetLoader rawAssetLoader)
 {
     _assetManager = assetManager;
     _rawAssetLoader = rawAssetLoader;
     _started = false;
 }
开发者ID:johnsonc,项目名称:Protogame,代码行数:8,代码来源:DefaultAutomaticAssetReload.cs

示例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);
 }
开发者ID:kiquenet,项目名称:B4F,代码行数:8,代码来源:AccountCategoryMapper.cs

示例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");
 }
开发者ID:TreeSeed,项目名称:Tychaia,代码行数:8,代码来源:StatusBar.cs

示例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"));
 }
开发者ID:RedpointGames,项目名称:Protogame,代码行数:8,代码来源:UserInterfaceAssetLoader.cs

示例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"));
 }
开发者ID:RedpointGames,项目名称:Protogame,代码行数:23,代码来源:LevelAssetLoader.cs

示例15: TychaiaSkin

 public TychaiaSkin(
     I2DRenderUtilities twodRenderUtilities,
     IAssetManagerProvider assetManagerProvider,
     BasicSkin basicSkin)
 {
     this.m_2DRenderUtilities = twodRenderUtilities;
     this.m_BasicSkin = basicSkin;
     this.m_AssetManager = assetManagerProvider.GetAssetManager(false);
 }
开发者ID:TreeSeed,项目名称:Tychaia,代码行数:9,代码来源:TychaiaSkin.cs


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