GAS_Intro
Gameplay Ability System前置知识
再进入我们UE5特供的GAS插件之前,我们需要回顾一些关于虚幻的知识~
Controller
在我之前使用UE4制作一些demo的时候,我通常直接在要控制的Character类中,实现一些逻辑(如控制输入)。然而,受MVC设计模式的启发,对于我们要possess的Character(或者Pawn),应当尽量将逻辑与功能解耦合。
我自己举一个例子吧,例如在射击游戏中,可能存在固定位置的机枪、岸防炮,我们应当将这些作为Pawn的子类,因为它们需要被玩家控制。对于各自武器的特定功能,例如发射子弹或者炮弹,应当在Pawn中实现,因为它们是独立于Controller的。对于Controller,我们可以切换自己possess的pawn,例如在使用固定机枪前控制我们的角色,这时候可以进行移动,而使用机枪时,则可以控制机枪射击,无法进行移动。而这便是Controller的职责。(对于切换移动,我目测可以采用UE5的Enhanced Input系统,通过切换Input Mapping Context来实现。
当然,对于Contro...
Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Quick Start
Create a new post
1$ hexo new "My New Post"
More info: Writing
Run server
1$ hexo server
More info: Server
Generate static files
1$ hexo generate
More info: Generating
Deploy to remote sites
1$ hexo deploy
More info: Deployment
