/// <summary>
        /// 设置物品辅助器。
        /// </summary>
        /// <param name="itemHelper">物品辅助器。</param>
        public void SetItemHelper(IItemHelper itemHelper)
        {
            if (itemHelper == null)
            {
                throw new GameFrameworkException("Item helper is invalid.");
            }

            m_ItemHelper = itemHelper;
        }
예제 #2
0
 public UserApiController(IRoleManagerService roleManagerService, IUserManagerService userManagerService, IItemsService itemsService,
                          IHostingEnvironment hostingEnvironment, IItemHelper itemHelper)
 {
     this._roleManagerService = roleManagerService;
     this._userManagerService = userManagerService;
     this._itemsService       = itemsService;
     this._hostingEnvironment = hostingEnvironment;
     this._itemHelper         = itemHelper;
 }
 public ItemController(IRoleManagerService roleManagerService, IUserManagerService userManagerService,
                       IItemsService itemsService, IHostingEnvironment hostingEnvironment, IPicturesService picturesService,
                       IDocumentsService documentsService, IItemHelper itemHelper)
 {
     this._roleManagerService = roleManagerService;
     this._userManagerService = userManagerService;
     this._itemsService       = itemsService;
     this._picturesService    = picturesService;
     this._documentsService   = documentsService;
     this._hostingEnvironment = hostingEnvironment;
     this._itemHelper         = itemHelper;
 }
 public ItemManager()
 {
     m_ItemInfos            = new Dictionary <int, ItemInfo>();
     m_ItemGroups           = new Dictionary <string, ItemGroup>();
     m_ItemsBeingLoaded     = new Dictionary <int, int>();
     m_ItemsToReleaseOnLoad = new HashSet <int>();
     m_RecycleQueue         = new Queue <ItemInfo>();
     m_LoadAssetCallbacks   = new LoadAssetCallbacks(LoadAssetSuccessCallback, LoadAssetFailureCallback, LoadAssetUpdateCallback, LoadAssetDependencyAssetCallback);
     m_ObjectPoolManager    = null;
     m_ResourceManager      = null;
     m_ItemHelper           = null;
     m_Serial     = 0;
     m_IsShutdown = false;
     m_ShowItemSuccessEventHandler         = null;
     m_ShowItemFailureEventHandler         = null;
     m_ShowItemUpdateEventHandler          = null;
     m_ShowItemDependencyAssetEventHandler = null;
     m_HideItemCompleteEventHandler        = null;
 }
예제 #5
0
 public override void Clear()
 {
     base.Clear();
     m_ItemAsset  = null;
     m_ItemHelper = null;
 }
예제 #6
0
            public static ItemInstanceObject Create(string name, object itemAsset, object itemInstance, IItemHelper itemHelper)
            {
                if (itemAsset == null)
                {
                    throw new GameFrameworkException("Item asset is invalid.");
                }

                if (itemHelper == null)
                {
                    throw new GameFrameworkException("Item helper is invalid.");
                }

                ItemInstanceObject itemInstanceObject = ReferencePool.Acquire <ItemInstanceObject>();

                itemInstanceObject.Initialize(name, itemInstance);
                itemInstanceObject.m_ItemAsset  = itemAsset;
                itemInstanceObject.m_ItemHelper = itemHelper;
                return(itemInstanceObject);
            }
예제 #7
0
 public ItemInstanceObject()
 {
     m_ItemAsset  = null;
     m_ItemHelper = null;
 }