类似神秘海域是手游吗的手游

神秘海域联动漫威手游领衔 那些不容错过的iOS游戏
游戏动态方佳俊
又到了每周一度的iOS游戏推荐时间,本周获得苹果编辑推荐的都是质量超高的小品级游戏。虽然目前这些游戏都是付费下载,但是相信这些游戏本身带来的乐趣绝对超过玩家支付的金钱。下面就让我们来看一下本周都有哪些不容错过的iOS游戏吧。
《神秘海域:宝藏猎人》:神海4预热手游,还送主机版联机道具
适用:IOS()
《神秘海域:宝藏猎人》是将要在本月10日推出的《神秘海域4》的联动手游。本作的游戏玩法和之前的《劳拉:GO》比较相似,玩家需要在各个区域内解谜并收集隐藏的宝藏。根据官方给出的介绍,游戏的四个区域内共有五十中宝藏,而想要得到这些宝藏则需要玩家破解200起以上的难题。特别值得一提的是,主机版本中玩家的好朋友sully也会加入到手游版本和德雷克一起冒险。
当然,作为联动手游,玩家在手游中解锁的某些特殊奖励可以通过登录PSN在《神秘海域4:盗贼末路》中获得独有的联机道具,包括外观、文物和一次性助力器。喜欢《神秘海域》的玩家赶快来下载这款游戏吧。
《Inks》:充满艺术感的水墨弹珠大战
适用:IOS()
曾经开发出《爷爷的城市》的State of Play
Games以其充满艺术气息的游戏受到了不少玩家的欢迎,这次最新推出的《Inks》也继承了他们一贯的游戏风格。本作采用了类似于弹珠台一样的休闲玩法,虽然这是State
Games首次尝试这种游戏类型,但是优质的画面依然在本作中得到了延续。与传统的弹珠台游戏不同的是,其实在本作中弹珠球更多起到了一种着色的作用,在弹珠台的相应位置上设置了几个色块,当弹珠球撞击到色块之后颜色将会喷射到弹珠台背景上,游戏的玩法还是比较有创意的。喜欢休闲和艺术类游戏的玩家千万不要错过这款弹珠佳作。
《漫威:格斗冠军》:美队3上映了,手游也得来一发
适用:IOS()
《漫威格斗:冠军之争》是一款由美国漫威公司正版授权KABAM研发制作的漫威全英雄格斗手游。因为得到了正版授权,所以游戏内的英雄形象基本做到了百分之百还原电影世界中的
超级英雄形象。而在战斗系统方面本作做的也算是可圈可点,打击感和连招系统都做的非常不错。最重要的是,本作比较完整地还原了包括《美队3》在内的超级英雄们的剧情,喜欢漫威系列的玩家一定会喜欢上这款《漫威:格斗冠军》。
《饥饿鲨世界》:吃货鲨鱼的自我修养
适用:IOS()
该作由知名游戏厂商育碧制作的一款休闲游戏,玩家将化身成为一条饥饿的吃货鲨鱼,在不断消耗生命的情况下,通过不断吃掉人类、鸟类以及海洋生物来维持生命。在如此弱肉强食的世界下,主角也会遇到比它还强大的生物便会从猎人变成猎物,这时玩家可通过消耗不断累积的金币来提升鲨鱼的属性,随着游戏不断深入,小型的鲨鱼也会逐渐解锁出更强大的鲨鱼角色供玩家选择。如果你喜欢休闲游戏的手游,不妨试试该作吧。
以上就是齐齐乐小编选出的本周不容错过的IOS游戏,不知道其中有没有你的菜呢?
Copyright (C) 2010 - 2016 77L.com. All Rights Reserved
齐齐乐-手机游戏网 版权所有 赣ICP备号-29您的位置: →
→ 神秘海域 相关合集
类似神秘海域4的游戏_神秘海域4下载手机版_神秘海域4官方下载
类似神秘海域的游戏有哪些?绿色资源网小编为大家整理了古墓丽影等众多类似的游戏提供免费下载,同时时下最新的绝地求生也是此类游戏中的标杆之作能够带给你十分畅快的游戏体验,拥有舒适无比的游戏乐趣,充满了极致炫酷的视觉效果,让你能够在宏大的世界中尽情的冒险,探秘各类秘境,解答世界中的万千难题,感受到舒适无比的游戏乐趣!小编推荐:、、、、
神秘海域4直装安卓版让你能够进入一个十分有趣的解谜世界中根据剧情谜题不断地融入到游戏中,作为一个游戏人物,以游戏的视觉来解开各类谜题
神秘海域4破解版游戏中加入了众多的解谜玩法,让你能够不断的感受到众多精彩刺激解谜体验,更有众多关卡,万千未知谜题,只有通过你在游戏中
神秘海域失落的遗产中文版是神秘海域的最新dlc,剧情非常写实有趣,玩家们将深入战乱中的印度,解救人民。还等什么,快来绿色资源网踊跃下载
神秘海域2是经典系列单机游戏《神秘海域》的第二部,游戏故事的线索将围绕着13世纪意大利探险家马可?波罗的伟大探险和他去世后遗留下的大量
神秘海域3德雷克的诡计是一款充满热血的动作冒险游戏,激情枪战多人竞技畅快无限,多种挑战模式自由闯关。快来绿色资源网下载体验吧!神秘海
神秘海域宝藏猎人破解版ios版是一款为玩家打造的冒险解谜游戏,颠覆传统的奖励和服装系统设置,进一步推进你的冒险之旅!跟随历史传说,体验
神秘海域之宝藏猎人破解版,作为其手机版游戏,移动冒险更加惊险刺激。游戏中你将会扮演一个冒险家,不断在海域中寻宝,超多关卡和谜团等你
古墓丽影崛起20周年纪念版是经典系列单机游戏《古墓丽影》中的一部作品,故事由《古墓丽影9》延续而来,所有又称《古墓丽影10》这一次劳拉将
古墓丽影9中文版是经典单机游戏《古墓丽影》系列中的一部,游戏将讲述劳拉的首次冒险之旅,主角劳拉?克劳馥的年龄被设定在21岁,随着游戏剧
古墓丽影1免费完整版(TombRaider1)是一款为玩家打造的古墓丽影手机游戏,依据同名影视剧创作的冒险战斗手游!丰富的挑战内容,让玩家根本停
古墓丽影2游戏手机版破解版(TombRaiderII)是一款为玩家打造的古墓丽影2手机版游戏,杀死或受到致命的武僧,雪人,超过50个独特的成就等您来
热门专题推荐
相关文章推荐类似神秘海域的游戏,最好是双人的? - 知乎1被浏览17分享邀请回答暂时还没有回答,开始写第一个回答十大著名业内游戏引擎盘点 你只知道虚幻?
稿源:新浪游戏
游戏引擎就像是游戏的发动机,好的游戏引擎能够让游戏开发事半功倍。而对玩家们来说,游戏引擎能够带来最直观的感受就是游戏的画面和细节表现。从光影声效到场景细节,从画面触感到各种细腻体验,再到人物表情的捕捉,花草树木的美感等等。
毫无疑问,从业界各类大作真正进入3D时代开始,一款成功的游戏引擎,就从诸多方面展现出了其对作品整体质量不可估量的影响。
今天就为大家盘点一番:十大著名游戏引擎。
10-RAGE Engine
代表作:《GTA4》,《荒野大镖客》
作为资深游戏玩家,突然提到RAGE Engine,恐怕许多朋友显得不那么熟悉。
不过,如果笔者提到&狂暴引擎&这个更加清晰的概念,相信知道的人就不少了。
没错,狂暴引擎最著名的代表,就是《GTA4》和《荒野大镖客》这两部力作。
荒野大镖客 &
RAGE引擎的扩展用途很多。它的能力主要体现在:世界地图流缓冲技术、复杂人工智能管理、天气特效、快速网络代码与众多游戏方式,这些在GTA4中都表现的很明显。
更重要的是,这款引擎对游戏中的许多&合作插件&本身有着极好的兼容性。这个特点,也是如今我们还能在大作中好好回味其品质的重要原因。
9-Naughty Dog Game Engine(顽皮狗)
代表作:《神秘海域》系列
好的,笔者可以很安全的说,对这款引擎而言,喜欢独占游戏的玩家应该不陌生。
作为世界上最著名,也是最有特点的独占游戏引擎,顽皮狗在PS平台上的表现无疑令许多玩家印象深刻。
09年的E3大展,无疑是一次划时代的展会。为什么?因为这次展会是顽皮狗引擎首次在世界面前展现它的强大效果。
《神秘海域4》
和其他游戏引擎&&只在某个具体环节上表现出色不同的是,顽皮狗在主机平台上的强大,是全方位的。
惊人的动态画面效果,流畅细腻的人物建模,堪称壮丽的音效和光照模式,好莱坞大片般的过场动画,再加上绚丽丰富的画面色彩。
有了以上这些要素,我们完全可以把顽皮狗&&称为真正意义上的次世代全能引擎。
有好的文章希望站长之家帮助分享推广,猛戳这里
本网页浏览已超过3分钟,点击关闭或灰色背景,即可回到网页努力加载中,稍等...
暂无新消息
努力加载中,稍等...
已无更多消息...
这些人最近关注了你
努力加载中,稍等...
已无更多消息
努力加载中,稍等...
已无更多消息
& 类似《神秘海域》中的装备教程
Uncharted like Equip Tutorial
征集热心朋友翻译文章,奖励规则:每100汉字奖励10QB,30天内互动奖励0 - 50QB.
翻译请求:使用UE4创建类似《神秘海域》中的武器装备
该文章来自用户转载
Uncharted like Equip TutorialThere was
to create Uncharted like equip system on third person character. In this tutorial you will learn how to:Attach weapons to third person character,Create simple inventory system to manage items,Drop and equip items,Use UMG to communicate with inventory manager and items,System will be event based so it should be efficient.It’s super easy!This Tutorial has been created using Unreal Engine 4.10Make sure you are working on the same version of the engine.Live StreamYou can watch Live Stream of developing this Tutorial:https://www.youtube.com/watch?v=KBJ5H5G93xQInfoI’m using weapons, you don’t need to use it to complete this tutorial but it’s recommended pack if you are doing game with military weapons.Project is based on Third Person Template which can be found when creating new project.I have
but I don’t know if it’s event based.Creating SocketsFirst let’s start by addingto character. Open SK_Mannequin and go to skeleton. Add those sockets:Socket NameTo BoneLocationRotationS_Rightthigh_r(X=1.395696,Y=-1.684754,Z=11.188174)(Pitch=-6.486207,Yaw=-7.920663,Roll=-89.091843)S_Leftthigh_l(X=-1.446448,Y=1.746050,Z=-11.595024)(Pitch=9.878475,Yaw=172.529236,Roll=-74.138725)S_Backspine_03(X=3.236346,Y=-19.379486,Z=-0.000076)(Pitch=29.549173,Yaw=-1.433733,Roll=-5.432457)S_BackSecondspine_02(X=-15.713704,Y=-19.643719,Z=0.000013)(Pitch=-39.672302,Yaw=-2.018809,Roll=5.592505)S_Pistolhand_r(X=-7.519445,Y=4.337661,Z=-0.000212)(Pitch=-10.000312,Yaw=179.999939,Roll=-0.000291)S_Riflehand_r(X=-13.532258,Y=4.385181,Z=-0.000752)(Pitch=-0.001052,Yaw=179.999893,Roll=-0.000213)S_Launcherhand_r(X=-10.995573,Y=4.979963,Z=-0.000205)(Pitch=-0.001011,Yaw=179.999893,Roll=-0.000207)Right, left, back and back second will be used as attach point for weapons. Rest are weapon locations when equipped.Base ClassesWhole system will use two base classes:BP_BaseWeapon,InventoryManager,Create new Blueprint extending from Actor named BP_BaseWeapon. Then create new blueprint extending from Actor Component named InventoryManager.Leave them for now and let’s add base data.AmmoType EnumCreate new Enum named AmmoInfo and add following:Pistol,Rifle,Launcher,It will be used to determine which type of ammo weapon is using.AttachPoint EnumCreate another enum named AttachPoint and add following:Right,Left,Back,BackSecond,This will be used to determined which part of body weapon can be attached.AttachInfo StructureCreate new structure named AttachInfo and it should contain:inUse (bool),AttachPoint (AttachPoint),WeaponRef (BP_BaseWeapon)AmmoInfo StructureAdd another structure named AmmoInfo and add following:AmmoType (AmmoType enum),AmmoCount (int),This will be used to store data about how many ammo for which type we have.MyLibraryCreate new function library named MyLibrary.Library functions can be called from all classes so they are super useful. One thing to note – they don’t have world context which means nodes like Get Player Controller, Get Game State, Get Player Pawn won’t work as they need world context. You need to pass world context to functions if you really need them. Libraries are great for storing math functions that you will use in different classes.For our example we will create functions that will return socket name depending on AttachPoint enum.Open MyLibrary and add two functions.GetSocketNameByPointInput: Type (AttachPoint),Output: SocketName (name)It should be pure,And add GetSocketPointByName:Input: Name (name),Output: Type (AttachPoint)It should be pure as well,Names in Switch should be equal to socket names added in character mesh.BP_BaseWeaponNow we can move to filling base classes. Open BP_BaseWeapon and add these components:BoxCollision named Box. Add OnBeginOverlap Event from it as well, (this should be root of components)Skeletal Mesh named SkeletalMesh,Now open event graph and add those variables:Var NameVar TypeDescriptionAmmoCurrentintHolds how many ammo do we have in magazine.AmmoMaxInMagintHolds maximum capacity of magazine.WeaponNameTextWhat’s the name of the weapon used in UI.AttachPointsAttachPoint enum arrayArray of points that this gun can be attached to character.CurrentAttachPointAttachPointHolds current attach point. (updated when weapon will be added to character)AmmoTypeAmmoType enumWhich ammo type this weapon use.isEquippedboolIs weapon currently equipped.EquipSocketNameNameName of the sockets that should be used when equipping weapon to hand.isDroppingboolIs weapon currently being dropped.Now in Event Graph create new custom event named AttachWeaponToCharacter:Input: SocketName (Name)For now let’s leave BP_BaseWeapon – we will get back here later.InventoryManagerOpen InventoryManager and add these variables:Var NameVar TypeDescriptionInventoryItemsBP_BaseWeapon Reference ArrayHolds all weapons stored in inventory.SocketStatesAttachInfo ArrayDefines state of all available sockets in inventory.AmmoAmmoInfo ArrayDefines state of all ammo types that are in inventory.EquippedWeaponBP_BaseWeapon ReferenceHolds currently equipped weapon reference.SocketStates:In default we are defining the ‘slots’ that this inventory can support.Ammo:It holds default amount of ammo for each ammo type.Open event graph and add one dispatcher:OnInventoryStateUpdated. It will be called each time something will change in inventorymanager – this way we will communicate with Character that have InventoryManager.Functions:Now we can add some basics functions. Create new function named FindFreeSocket:Input: For Weapon (BP_BaseWeapon reference)Output: FreePoint (AttachPoint),Output: Found? (bool),Local Variable named Local_FoundSocket (bool),Local variable named Local_SocketPoint (AttachPoint),This is basically checking if weapon sockets match SocketStates and if socket state is available. We don’t want to attach weapon to socket that have already weapon attached.Create another function named MarkSocketAsInUse:Input: Point (AttachPoint)Input: WeaponRef (BP_BaseWeapon reference)Local Variable: Local_Index (int),Local Variable: Local_NewAttachInfo (AttachInfo),This is basically finding matching socket in SocketStates and mark InUse bool as True. This is basically the best way to work with Array Structures in Blueprints. Store index, store make new structure info and then set array element. It’s proven to work on Standalone / Mobile and cooked builds without a problem. It sounds complicated but it’s super easy.Now create another function named MarkSocketAsAvailable which will do the same thing but mark InUse to false:Input: Point (AttachPoint),Local Variable: Local_Index (int),Local Variable: Local_NewAttachInfo (AttachInfo),I’m not using WeaponReference here as I want to clear it from SocketStates as we are marking the socket as available for attachment.Create another function named AddAmmo:Input: Type (AmmoType),Ammount (int),This is the easiest example how to use structure arrays. We want to add ammo for a weapon type. I’m searching for matching type in the array, then store the index and store updated ammo info. Then set array elem.For example we want to add 5 ammo for Pistol. It will search Pistol type in Ammo Array, increase the ammo and then set the array elem.Create another function named GetCurrentAmmo:Input: ForType (AmmoType),Output: Ammo (int),Function can be pure,Create another new function named SetEquipedWeapon:Input: Weapon (BP_BaseWeapon reference)It’s just setting EquippedWeapon variable.USEFUL TIP: I’m always using Functions to change variables if I think I would need to set variable from different class. Setting variables from different classes can cause crashes on cooked build as it creates circular dependencies. Calling functions that set the variable instead directly set it from different class is “good programming practice” and you should use it in Blueprints as well.Create another function named ClearEquipedWeapon:Create another one named GetCurrentEquippedWeapon:Output: Weapon (BP_BaseWeapon reference),Output: Equipping (bool),Function can be pure,This will return currently equipped weapon and information if it’s valid. (which means if something is equipped)And now the most important functions. Create new function named AddToInventory:Input: Weapon (BP_BaseWeapon Reference)It’s easy. Search for socket that Weapon can support and check if it’s available. If yes – update the socket, store the weapon reference and call Attach on Weapon.Create last function named RemoveFromInventory:Input: Weapon (BP_BaseWeapon Reference)Again it’s easy. Find matching Weapon in Socket States and clear it out so it can be used again.EventsWe have added all necessary functions now it’s time to add three events.Create new event named Equip with one BP_BaseWeapon reference input:And UnEquip event:And last DropItem with one BP_BaseWeapon Reference input:And that’s all in InventoryManager! Now we need to move back to BP_BaseWeapon.Make sure you have added InventoryManager component to ThirdPersonCharacter blueprint!Back in BP_BaseWeaponGo back to BP_BaseWeapon and if you havent added OnComponentBeginOverlap to your Box add it now:This is basically the start of adding items to inventory.Now add Equip and UnEquip events:It should be self explanatory.Now last event – Drop which should be treated as placeholder.And this is all in BP_BaseWeapon!Creating WeaponsNow create Weapon_Rifle, Weapon_Launcher and Weapon_Pistol blueprints extending from BP_BaseWeapon and fill the variables.Weapon_Pistol:Var NameValueAmmoCurrentAmmoMaxInMagWeaponNamePistolAttachPointsRight, LeftCurrentAttachPointAmmoTypePistolisEquippedEquipSocketNameS_PistolisDroppingWeapon_Rifle:Var NameValueAmmoCurrentAmmoMaxInMagWeaponNameRifleAttachPointsBack, BackSecondCurrentAttachPointAmmoTypeRifleisEquippedEquipSocketNameS_RifleisDroppingWeapon_Launcher:Var NameValueAmmoCurrentAmmoMaxInMagWeaponNameLauncherAttachPointsBack, BackSecondCurrentAttachPointAmmoTypeLauncherisEquippedEquipSocketNameS_LauncherisDroppingNow place those weapons to your level so you can pick it up!Creating Ammo PickupsCreate new blueprint extending from Actor named BP_AmmoPickup. It should have two variables:Var NameVar TypeDescriptionAmmoTypeAmmoType. Editable.Which ammo type it should add ammo to.AmmoToAddInt. Editable.How much ammo it should add.Components:StaticMeshComponent named StaticMesh,Box Collision named Box. Add OnComponentBeginOverlap event,Now in construction script let’s change pickup mesh depending on AmmoType:You can use different meshes.Now Box Overlap which will increase the ammo:And that’s all, now you can pickup ammo!Creating UMGWidget_ItemActionsCreate new widget named Widget_ItemActions. Here you can find hierarchy:https://www.youtube.com/watch?v=KBJ5H5G93xQNow open event graph and add those variables:Var NameVar TypeDescriptionInvManagerRerInventoryManager ReferenceInvItemRefBP_BaseWeapon ReferenceisActivebool. Should be set to True in defaults.Holds if this widget is currently visible.Add new Function named SetInvManager with one InventoryManager reference input:And another one named SetItemRef with one BP_BaseWeapon reference input:Add new custom event named UpdateWidget:Now in OnClicked(Button_Equip):This is just calling equip and unequip events in item and manager. Now in OnClicked (Button_Drop) make sure to call Drop on weapon and manager:Now add Tick function to determine if player clicked outside the widget so we can close it:Currently (UE4.10) there is no other way to get input in Widgets. You need to use Player Controller.And that’s all in this widget!Widget_ItemInfoCreate new widget named Widget_ItemInfo. Here you can find hierarchy:https://www.youtube.com/watch?v=y59qqXuF8LsOpen Event Graph and add these variables:Var NameVar TypeDescriptionInventoryRefInventoryManager ReferenceItemRefBP_BaseWeapon ReferenceAdd new Distpacher named OnClicked.Add new Function named SetInvManager with one InventoryManager reference input:And another one named SetItemRef with one BP_BaseWeapon reference input:Now create new custom event named UpdateWidget:It just hides Equipped text if weapon is equipped and sets the name of the weapon to the UI.Now in OnClicked(button_item) we need to create ItemActions widget and change its location to mouse location:As you can see I’m passing Weapon and Manager references.UI_InventoryNow we have our Widgets we can move with Inventory UMG. Create new widget named UI_Inventory.First create a screenshot of your character on black background.(you can download it )Import it and create new material named M_Character:This way we can get alpha in UMG.Open UI_Inventory and here is the hierarchy:https://www.youtube.com/watch?v=7LhoJVZFjywOpen Event Graph and add one InventoryRef variable which is InventoryManager reference.Add new function named SetInvManager:Add another function named ClearSlots:This is basically deleting widgets that are added to Overlays.Add another function named UpdateAmmo:This is just setting text widgets.Add another function named PopulateSlots with one local variable:L_WeaponRef (BP_BaseWeapon reference)Part 1:Part 2:It looks complicated but it’s just updating data on created widgets. Simple as that.Now create new custom event named UpdateData:In Construct let’s set Input Mode and show mouse:Create new custom event named CloseInventory:And last thing OnClicked (Button_Close):That’s all in UMG!Showing InventoryNow we need to trigger UI_Inventory. Open ThirdPersonCharacter and add UI_Inventory reference variable named UI_Inventory.If you right click on InventoryManager Component you will see that you can add On Inventory State Changed event:Thanks to this we are only updating UMG when inventory is updated.I’m using “I” key event to trigger the inventory UI:Easy as that!Final Result:https://www.youtube.com/watch?v=WDHZ9qSlr3Y
类似《神秘海域》中的装备教程
版权所有,禁止匿名转载;禁止商业使用;禁止个人使用。
翻译:王成林(麦克斯韦的麦斯威尔 ) 审校:黄秀美(厚德载物) 《神秘海域》中的装备系统设计的很好,有人要求我使用第三人称角色制作一篇关于类似《神秘海域》中的装备系统的教程。在这篇教程中你将学到如何:
·将武器附加给第三人称角色·建立简单的物品栏系统管理物品·丢弃和装备物品·使用UMG和物品栏管理器与物品进行通信该系统基于事件,因此它的效率很高。该系统非常简单!本教程使用了虚幻引擎4.10版本。确保你使用相同版本的引擎。
直播流你可以观看关于该教程建立的直播流:
信息我使用了中的武器,对于本教程它不是必须的,但是如果你在开发和军事武器相关的游戏我推荐你使用这个包。本项目以第三人称模板为基础,你可以在新建项目时找到它。我在市场中,但是我不知道它是否是基于事件的。
创建插槽(Socket)我们首先为角色加入。打开SK_Mannequin然后打开骨骼。添加这些插槽:插槽名称 目标骨骼 位置 旋转 S_Right thigh_r (X=1.395696,Y=-1.684754,Z=11.188174) (Pitch=-6.486207,Yaw=-7.920663,Roll=-89.091843) S_Left thigh_l (X=-1.446448,Y=1.746050,Z=-11.595024) (Pitch=9.878475,Yaw=172.529236,Roll=-74.138725) S_Back spine_03 (X=3.236346,Y=-19.379486,Z=-0.000076) (Pitch=29.549173,Yaw=-1.433733,Roll=-5.432457) S_BackSecond spine_02 (X=-15.713704,Y=-19.643719,Z=0.000013) (Pitch=-39.672302,Yaw=-2.018809,Roll=5.592505) S_Pistol hand_r (X=-7.519445,Y=4.337661,Z=-0.000212) (Pitch=-10.000312,Yaw=179.999939,Roll=-0.000291) S_Rifle hand_r (X=-13.532258,Y=4.385181,Z=-0.000752) (Pitch=-0.001052,Yaw=179.999893,Roll=-0.000213) S_Launcher hand_r (X=-10.995573,Y=4.979963,Z=-0.000205) (Pitch=-0.001011,Yaw=179.999893,Roll=-0.000207)Right,left,back和backsecond被用作武器的附加点。其余为武器被装备时的位置。
基础类整个系统将使用两个基础类:·BP_BaseWeapon·InventoryManager
新建一个继承自Actor的蓝图,将其命名为BP_BaseWeapon。然后新建一个继承自Actor组件的蓝图,命名为InventoryManager。先不管它们,我们添加一些基本数据。 AmmoType枚举新建一个名为AmmoInfo的枚举(Enum),然后加入以下:·Pistol·Rifle·Launcher该枚举被用来决定武器正在使用哪一种子弹。
AttachPoint枚举建立另一个名为AttachPoint的枚举并加入以下:·Right·Left·Back·BackSecond该枚举被用来决定武器可以佩戴在身体的哪个部位。
AttachInfo结构体新建一个名为AttachInfo的结构体,它应包含:·inUse(bool)·AttachPoint(AttachPoint)·WeaponRef(BP_BaseWeapon)
AmmoInfo结构体添加另一个名为AmmoInfo的结构体然后加入以下:·AmmoType(AmmoType枚举)·AmmoCount(int)该结构体被用于储存我们所拥有的各类型子弹的数量 MyLibrary新建一个名为MyLibrary的函数库。所有类都能调用库函数,因此它们超级有用。需要注意一点——它们没有世界语境(World Context),意味着像GetPlayerController,GetGameState,GetPlayerPawn之类的节点不能正常工作因为它们需要世界语境。如果你需要世界语境的话你应该将它们传递给函数。函数库可用于储存你在不同类中使用的数学函数。在我们的例子中我们将建立一些函数,它们根据AttachPoint枚举返回插槽名称。打开MyLibrary然后加入两个函数。GetSocketNameByPoint·输入:Type(AttachPoint)·输出:SocketName(name)它应该为纯函数然后加入GetSocketPointByName:·输入:Name(name)·输出:Type(AttachPoint)它也应该是纯函数Switch中的名称应该和在角色网格物体中加入的插槽名称相同。
BP_BaseWeapon现在我们可以开始建立基础类了。打开BP_BaseWeapon然后加入这些组件:·名为Box的BoxCollision(盒状碰撞)。同时加入它的OnBeginOverlap事件(该组件应为根组件)·名为SkeletalMesh的Skeletal Mesh(骨骼网格物体)。现在打开事件图表然后加入这些变量:变量名称 变量类型 描述 AmmoCurrent int 存储了弹夹中的子弹数 AmmoMaxInMag int 存储了弹夹的最大容量 WeaponName Text 武器在UI中的名称 AttachPoints AttachPoint enum array 该枪可以被附加在角色身上的点的数组 CurrentAttachPoint AttachPoint 存储了当前附加点(在武器被添加给角色时会更新) AmmoType AmmoType enum 该武器使用的子弹类型 isEquipped bool 当前是否装备了该武器 EquipSocketName Name 装备武器时应该使用的插槽的名称 isDropping bool 该武器当前是否被丢弃
在事件图表中新建一个名为AttachWeaponToCharacter的自定义事件:·输入:SocketName(Name)目前我们先不管BP_BaseWeapon——我们后面再返回这里。 InventoryManager打开InventoryManager然后加入这些变量:变量名称 变量类型 描述 InventoryItems BP_BaseWeapon Reference Array 存储了物品栏中所有的武器 SocketStates AttachInfo Array 定义了物品栏中所有可用插槽的状态 Ammo AmmoInfo Array 定义了物品栏中所有弹药类型的状态 EquippedWeapon BP_BaseWeapon Reference 存储了当前装备的武器的引用
SocketStates:我们定义了该物品栏默认可以支持的“插槽”。 Ammo:它存储了各种类型弹药的默认数量。打开事件图表然后加入一个事件调度器(Event Dispatcher):·OnInventoryStateUpdated。每当inventorymanager中发生变化时它都会被调用——这样我们可以和拥有InventoryManager的角色进行通信。
函数:现在我们可以加入一些基本的函数了。新建一个名为FindFreeSocket的函数:·输入:For Weapon(BP_BaseWeapon引用)·输出:FreePoint(AttachPoint)·输出:Found?(bool)·名为Local_FoundSocket的本地变量(bool)·名为Local_SocketPoint的本地变量(AttachPoint)它检查了武器插槽是否匹配插槽状态以及插槽状态是否为可用。我们不希望将武器附加在已经有武器附加的插槽上。建立另一个名为MarkSocketAsInUse的函数:·输入:Point(AttachPoint)·输入:WeaponRef(BP_BaseWeapon引用)·本地变量:Local_Index(int)·本地变量:Local_NewAttachInfo(AttachInfo)该函数寻找SocketStates中相匹配的插槽然后将InUse标记为真。这是在蓝图中使用数组结构体的最佳方法了。储存索引,储存新的结构体信息然后设置数组元素。在独立窗口/移动端和已烘焙的编译模式下都可以正常运行。听上去很复杂但是其实超级简单。现在建立另一个名为MarkSocketAsAvailable的函数,它的功能相同,只是将InUse标记为否:·输入:Point(AttachPoint)·本地变量:Local_Index(int)·本地变量:Local_NewAttachInfo(AttachInfo)我在这里没有使用WeaponReference,因为我希望将它从SocketStates中清除出去因为我们要将插槽标记为可用于附加。建立另一个名为AddAmmo的函数:·输入:Type(AmmoType)·Ammount(int)这是关于如何使用结构体数组的最简单的例子了。我们想要添加某类武器的弹药。我在数组中搜索匹配的类型,然后储存索引并储存更新后的子弹信息。然后设置数组元素。例如我们想要增加5颗手枪子弹。它会在Ammo数组中搜索Pistol类型,然后增加子弹数并设置数组元素。建立另一个名为GetCurrentAmmo的函数:·输入:ForType(AmmoType)·输出:Ammo(int)·可以为纯函数新建另一个名为SetEquipedWeapon的函数:·输入:Weapon(BP_BaseWeapon引用)该函数只是设置了EquippedWeapon变量。帮助性建议:当我需要设置不同类中的变量时,我一定使用函数来修改变量。在已烘焙编译模式中设置不同类中的变量会导致崩溃,因为这会产生循环依赖。调用设置变量的函数是个不错的编程方法,你也应该在蓝图中使用该方法。新建另一个名为ClearEquipedWeapon的函数:新建另一个名为GetCurrentEquippedWeapon的函数:·输出:Weapon(BP_BaseWeapon 引用)·输出:Equipping(bool)·函数可以为纯函数该函数返回当前装备的武器和信息,如果有效的话。(有效意味着当前正在装备着某武器)现在创建一些最重要的函数。新建一个名为AddToInventory的函数:·输入:Weapon(BP_BaseWeapon引用) 这很简单。它搜索了可以装备武器的插槽,并检查它是否可用。如果是的话,更新该插槽,保存武器的引用并对武器调用Attach。建立最后一个名为RemoveFromInventory的函数:·输入:Weapon(BP_BaseWeapon引用)同样它非常简单。在Socket States中寻找相配的武器,然后将它清除以便再次使用。
事件我们已经添加了所有需要的函数,现在我们添加三个事件。新建一个名为Equip的事件,它含有一个输入,类型为BP_BaseWeapon引用:以及UnEquip事件:最后是DropItem,有一个输入,类型为BP_BaseWeapon引用:这就是InventoryManager中的所有内容了!现在我们需要返回BP_BaseWeapon。确保你已经在第三人称角色蓝图中添加了InventoryManager组件!
返回BP_BaseWeapon返回BP_BaseWeapon。如果你还没有添加Box的OnComponentBeginOverlap事件现在添加它:这里我们开始向物品栏添加物品了。现在添加Equip和UnEquip事件:这应该无需解释吧。最后一个事件——Drop, 我们将其作为一个占位符。这就是BP_BaseWeapon中的所有内容了!
创建武器现在我们创建继承自BP_BaseWeapon的Weapon_Rifle, Weapon_Launcher和Weapon_Pistol蓝图并设置它们的变量。Weapon_Pistol:
变量名称 数值 AmmoCurrent AmmoMaxInMag WeaponName Pistol AttachPoints Right, Left CurrentAttachPoint AmmoType Pistol isEquipped EquipSocketName S_Pistol isDropping
Weapon_Rifle:
变量名称 数值 AmmoCurrent AmmoMaxInMag WeaponName Rifle AttachPoints Back, BackSecond CurrentAttachPoint AmmoType Rifle isEquipped EquipSocketName S_Rifle isDropping
Weapon_Launcher:
变量名称 数值 AmmoCurrent AmmoMaxInMag WeaponName Launcher AttachPoints Back, BackSecond CurrentAttachPoint AmmoType Launcher isEquipped EquipSocketName S_Launcher isDropping
现在将这些武器放在你的关卡中以便你可以捡起它们!
创建Ammo Pickups(可拾取子弹)新建一个继承自Actor的蓝图,将其命名为BP_AmmoPickup。它应该有两个变量:变量名称 变量类型 描述 AmmoType AmmoType. Editable. 它应该加入哪种类型的子弹 AmmoToAdd Int. Editable. 它应该加入多少子弹组件:·名为StaticMesh的静态网格物体组件。·名为Box的盒状碰撞。加入它的OnComponentBeginOverlap事件 我们在构造脚本中根据AmmoType改变可拾取物体的网格物体。你可以使用不同的网格物体。BoxOverlap会增加子弹数:就是这样了。现在你可以拾取子弹了!
Widget_ItemActions新建一个名为Widget_ItemActions的控件(Widget)。你在这里可以找到它的层级:打开事件图表并添加这些变量:变量名称 变量类型 描述 InvManagerRer InventoryManager Reference InvItemRef BP_BaseWeapon Reference isActive bool. 默认应设为真 该控件当前是否可见 添加一个名为SetInvManager的函数,它有一个InventoryManager引用类型的输入:添加另一个名为SetItemRef的函数,它有一个BP_BaseWeapon引用类型的输入: 添加一个新的自定义事件,名为UpdateWidget:在OnClicked(Button_Equip)中:这里调用了物品和管理器中的equip和unequip事件。然后在OnClicked(Button_Drop)中对武器和管理器调用Drop:现在添加Tick函数来决定角色是否点击了控件以外的区域,是的话我们就可以关闭它了:目前(UE4.10)还不能在控件中获取输入。你需要使用玩家控制器(Player Controller)。这是该控件的所有内容了!
Widget_ItemInfo新建一个名为Widget_ItemInfo的控件。这是它的层级:打开事件图表并加入这些变量:变量名称 变量类型 描述 InventoryRef InventoryManager Reference ItemRef BP_BaseWeapon Reference 添加一个名为OnClicked的事件调度器。添加一个名为SetInvManager的函数,它有一个输入,类型为InventoryManager引用:以及另一个名为SetItemRef的函数,它有一个输入,类型为BP_BaseWeapon引用。 新建一个名为UpdateWidget的自定义事件:如果武器被装备上了,该事件会隐藏Equipped文本并将武器的名称设置给UI。在OnClicked(button_item)中我们需要创建ItemActions控件并将它的位置改为鼠标位置:如你所见我在传递Weapon和Manager的引用。
UI_Inventory现在有了这些控件我们可以随着Inventory UMG移动了。新建一个名为UI_Inventory的控件。首先创建一张你的角色在黑色背景中的截图。(你可以在下载它)将它导入并创建一个名为M_Character的材料,:这样我们可以得到UMG中的alpha。打开UI_Inventory,这里是它的层级:打开事件图表并添加一个名为InventoryRef的变量,它的类型为InventoryManager引用。添加一个名为SetInvManager的新函数:添加另一个名为ClearSlots的函数:该函数负责删除添加到Overlays中的控件。添加另一个名为UpdateAmmo的函数:该函数设置了文本控件。添加另一个名为PopulateSlots的函数,它含有一个本地变量:·L_WeaponRef(BP_BaseWeapon引用)
第一部分:
第二部分:它看上去很复杂,但其实它只是更新了已创建控件的数据。就是那么简单。新建一个名为UpdateData的自定义事件:在Construct中我们设置Input Mode并显示鼠标:新建一个名为CloseInventory的自定义事件:最后是OnClicked(Button_Close):这是UMG中的所有内容了!
显示物品栏现在我们需要触发UI_Inventory。打开第三人称角色并添加名为UI_Inventory的变量,它的类型为UI_Inventory引用。如果你在InventoryManager组件上点击右键,你会发现你可以添加Inventory StateChanged 事件:这样我们只会在物品栏更新时更新UMG。我使用“I”键来触发物品栏UI:就是那么简单! 最终结果:【版权声明】 原文作者未做权利声明,视为共享知识产权进入公共领域,自动获得授权。
分类:程序新手圈
请勿发表无意义的内容请勿发表重复内容请勿发表交易类内容禁止发表广告宣传贴请使用文明用语其它
淫秽色情政治倾向人身攻击抄袭剽窃广告刷屏恶意挖坟冒充他人其它
登录后参与讨论。点击

我要回帖

更多关于 神秘海域4游戏下载 的文章

 

随机推荐