Exemplo n.º 1
0
        private void LoadResource()
        {
            var assetInfo = SingletonManager.Get <WeaponPartsConfigManager>().GetAsset(DestAttachmentId);

            if (AssetInfoIsEmpty(assetInfo))
            {
                Logger.ErrorFormat("ErrorAttachmentId Try To Mount  id:  {0}", DestAttachmentId);
                return;
            }

            if (HaveCommitLoadAssetRequest(WeaponLoadAssetHandler, assetInfo))
            {
                return;
            }

            WeaponLoadAssetHandler.SetInfo(assetInfo, DestAttachmentId);
            LoadRequestBatch.Add(LoadRequest(assetInfo, WeaponLoadAssetHandler));
        }
Exemplo n.º 2
0
        private void LoadResource()
        {
            var weaponAvatarManager = SingletonManager.Get <WeaponAvatarConfigManager>();
            var assetInfo           = IsFirstPersonClass
                ? weaponAvatarManager.GetFirstPersonWeaponModel(DestWeaponId)
                : weaponAvatarManager.GetThirdPersonWeaponModel(DestWeaponId);

            if (AssetInfoIsEmpty(assetInfo))
            {
                Logger.ErrorFormat("ErrorWeaponId Try To MountInPackage  id:  {0}", DestWeaponId);
                return;
            }

            if (HaveCommitLoadAssetRequest(WeaponLoadAssetHandler, assetInfo))
            {
                return;
            }

            WeaponLoadAssetHandler.SetInfo(assetInfo, DestWeaponId);
            LoadRequestBatch.Add(LoadRequest(assetInfo, WeaponLoadAssetHandler));
        }
Exemplo n.º 3
0
 public override void ClearRequests()
 {
     WeaponLoadAssetHandler.ClearRequests();
     Attachment.ClearRequests();
     base.ClearRequests();
 }
Exemplo n.º 4
0
 public override IEnumerable <UnityObject> GetRecycleRequests()
 {
     RecycleRequestBatch.AddRange(WeaponLoadAssetHandler.GetRecycleRequests());
     RecycleRequestBatch.AddRange(Attachment.GetRecycleRequests());
     return(base.GetRecycleRequests());
 }
Exemplo n.º 5
0
 public AttachmentParam(bool isFirstPersonClass, WeaponPartLocation attachmentType, WeaponInPackage weaponType) :
     base(isFirstPersonClass, attachmentType, weaponType)
 {
     WeaponLoadAssetHandler = new WeaponLoadAssetHandler(AttachmentAssetLoadSuccess);
 }
Exemplo n.º 6
0
 public WeaponParam(bool isFirstPersonClass, WeaponInPackage type) : base(isFirstPersonClass, type)
 {
     WeaponLoadAssetHandler = new WeaponLoadAssetHandler(WeaponAssetLoadSuccess);
 }
Exemplo n.º 7
0
 protected static bool HaveCommitLoadAssetRequest(WeaponLoadAssetHandler handler, AssetInfo info)
 {
     return(info.Equals(handler.GetAssetInfo()));
 }