人工精选使用Unity引擎创建回合制策略游戏Creating turn-based game Unity Engine
如果你已经能用 Unity 做出角色移动、碰撞检测这类基础功能,但一碰到"回合制"就不知道从哪下手,这门课值得花时间看。它不讲引擎入门,也不铺开讲通用架构,而是把镜头对准一个具体问题:一个带格子、带行动顺序、带敌方决策的回合制战斗,到底怎么在 Unity 里搭起来。学完之后你能独立完成的,是一套可运
会员可免费下载本篇月会员可按日额度下载(每篇扣 1 次)。
开通会员 ›会员 A · 按档位折扣
会员 B
游客按标价购买,不享受上表折扣。
支付成功后自动发放网盘链接,链接失效可找客服免费补
如果你已经能用 Unity 做出角色移动、碰撞检测这类基础功能,但一碰到"回合制"就不知道从哪下手,这门课值得花时间看。它不讲引擎入门,也不铺开讲通用架构,而是把镜头对准一个具体问题:一个带格子、带行动顺序、带敌方决策的回合制战斗,到底怎么在 Unity 里搭起来。学完之后你能独立完成的,是一套可运行、可扩展的战斗原型,而不是只会照着敲的演示片段。
它解决的是哪一类开发卡点
回合制策略游戏的难点很少在画面上,而在流程控制。谁先动、行动力怎么消耗、攻击判定什么时候结算、敌方什么时候该做决策,这些逻辑一旦写乱,后面加单位、加技能就会不断返工。这门课围绕战斗场景展开,把战斗流程拆成可管理的部分:单位的状态与站位、箭矢这类投射物的飞行与命中、以及 AI 在轮到它时如何选出一个行动。它处理的是"回合循环 + 战斗结算 + 简单决策"这条主线,不涉及存档、联网、关卡编辑器这些外围系统。所以它适合当作战斗模块的参考实现,而不是一个完整商业项目的模板。
适合什么基础,先看哪几块
前提是你能看懂 C# 脚本,知道 MonoBehaviour 的生命周期,用过 Unity 的编辑器面板挂载组件。完全没写过脚本的人直接看会吃力,因为课程节奏偏向直接实现,不会停下来解释语法。建议的观看顺序是:先过一遍战斗场景的搭建和单位表示,把"一个单位在代码里是什么"这件事弄清楚;再进入行动顺序与回合切换,这是整门课的主干;然后看投射物的飞行与命中判定,它牵涉到动画、位移和结算的配合;最后看 AI 决策那部分,理解它是在什么信息基础上做选择的。把 AI 放到最后,是因为它依赖前面已经稳定的战斗状态。
资料怎么配合练习,学完能做什么
配套的脚本和美术资源可以直接导入工程,省去自己拼场景的时间,但不要一上来就整套拖进去跑通就算学完。更有效的做法是:先自己按课程思路写一遍核心循环,再拿配套脚本对照,重点看它怎么组织状态和调用顺序,差异往往就是你没想清楚的地方。练习时建议做两件小事:把单位数量从两个加到四个,看行动顺序逻辑是否还成立;给 AI 换一种选择规则,比如从"打最近的目标"改成"打血量最低的目标",检验决策部分是否足够独立。能顺利改完这两处,说明你掌握的是结构而不是代码本身。学完之后,你可以独立搭出一个回合制战斗原型,并在此基础上继续加技能、加地形、加更多单位类型。
课程目录
4. The Battle108 集
- 4. The Battle说明.zip
- [1.8 MB] 14.2 Scripts.zip
- [82.4 KB] 11. AI makes a decision.mp4
- [269.3 MB] 7. The Arrow's flight.mp4
- [134.2 MB] 14.3 sprites.zip
- [295.6 KB] 14. Game Over.srt [24.9 KB] 4. The Melee fighter attacks.en.srt [21.9 KB] 7.1 51.unitypackage [53.1 MB] 9. AI looks for positions to occupy.en.srt [12.9 KB] 12. AI attacks.srt [15.4 KB] 12. AI attacks.mp4
- [145.0 MB] 11. AI makes a decision.srt [26.1 KB] 1. The Attacking Regiment.srt [23.5 KB] 13. Turns and Rounds.en.srt [37.8 KB] 3. Ranged fighter looks for target.en.srt [29.3 KB] 6. Particle System.srt [19.4 KB] 5. Coroutine.srt [17.0 KB] 1.1 Scripts.zip
- [49.3 KB] 9. AI looks for positions to occupy.mp4
- [87.1 MB] 3. Ranged fighter looks for target.srt [27.7 KB] 2. Melee fighter looks for target.en.srt [19.0 KB] 13. Turns and Rounds.srt [35.5 KB] 8.1 52.unitypackage [56.5 MB] 10. AI Calculates distance.en.srt [23.5 KB] 2. Melee fighter looks for target.mp4
- [178.2 MB] 10. AI Calculates distance.mp4
- [210.3 MB] 9.1
- 53 final.unitypackage [56.5 MB] 13. Turns and Rounds.mp4
- [358.8 MB] 8. The Mage Ball.mp4
- [188.8 MB] 14.1
- 58 final.unitypackage [56.8 MB] 7. The Arrow's flight.en.srt [17.4 KB] 1. The Attacking Regiment.mp4
- [179.5 MB] 2.1 Scripts.zip
- [54.8 KB] 6. Particle System.mp4
- [190.0 MB] 9. AI looks for positions to occupy.srt [11.8 KB] 10. AI Calculates distance.srt [21.5 KB] 11. AI makes a decision.en.srt [27.9 KB] 7. The Arrow's flight.srt [15.7 KB] 12. AI attacks.en.srt [16.2 KB] 6.1 Arrow Sprites.zip
- [3.5 MB] 6. Particle System.en.srt [20.7 KB] 3. Ranged fighter looks for target.mp4
- [214.8 MB] 1. The Attacking Regiment.en.srt [24.9 KB] 4. The Melee fighter attacks.srt [20.4 KB] 14. Game Over.en.srt [26.8 KB] 3.1 Scripts.zip
- [62.8 KB] 14. Game Over.mp4
- [279.4 MB] 8. The Mage Ball.en.srt [19.0 KB] 5. Coroutine.mp4
- [138.5 MB] 8. The Mage Ball.srt [17.5 KB] 2. Melee fighter looks for target.srt [18.1 KB] 4. The Melee fighter attacks.mp4
- [149.0 MB] 5. Coroutine.en.srt [18.2 KB] 📁 5. Bonus Section 5. Bonus Section必看.zip
- [1.8 MB] 1. Constructors Random hex-tiled Field.mp4
- [154.2 MB] 4. Realistic arrow flight in an arc.mp4
- [167.8 MB] 1.1 Constructors.rar [64.9 MB] 5. Catapult Fires. Physics2D.mp4
- [242.9 MB] 2. Correct understanding of the Lerp method.srt [19.6 KB] 5. Catapult Fires. Physics2D.srt [33.7 KB] 4. Realistic arrow flight in an arc.srt [21.5 KB] 2.1 M_19_Lerp1.unitypackage [135.6 MB] 5. Catapult Fires. Physics2D.en.srt [36.3 KB] 3. Correct understanding of the Lerp method-2.en.srt [18.4 KB] 2. Correct understanding of the Lerp method.mp4
- [135.9 MB] 4. Realistic arrow flight in an arc.en.srt [23.7 KB] 3. Correct understanding of the Lerp method-2.mp4
- [137.6 MB] 4.1 ToCourse.unitypackage [19.0 MB] 3.1 Lerp_2_1.unitypackage [135.5 MB] 3.2 Lerp2_2.unitypackage [6.1 MB] 1. Constructors Random hex-tiled Field.en.srt [23.2 KB] 2. Correct understanding of the Lerp method.en.srt [21.1 KB] 1. Constructors Random hex-tiled Field.srt [22.1 KB] 5.1 Catap.unitypackage [6.4 MB] 3. Correct understanding of the Lerp method-2.srt [16.6 KB] 1.2 Constructors.unitypackage [5.4 MB] 📁 3. Scrollable Bar 3. Scrollable Bar说明.png [493.5 KB] 4. Scroll Rect, Grid Layout Group.mp4
- [179.1 MB] 9. Delegates.mp4
- [129.0 MB] 11. Start Button.mp4
- [186.7 MB] 4.3 Storage.zip
- [181.0 KB] 4.1 2-36.unitypackage [46.2 MB] 2. Abstract classes.mp4
- [47.3 MB] 9. Delegates.en.srt [15.9 KB] 2.1 Scripts.zip
- [31.3 KB] 7. OnMouseDown() method.mp4
- [129.1 MB] 5.2 Scripts.zip
- [38.2 KB] 8. Observer Pattern, Destroy() method.srt [20.6 KB] 2. Abstract classes.srt [8.7 KB] 11. Start Button.srt [19.1 KB] 6. UI Button.srt [15.1 KB] 1. Scriptable Objects, Serialization.en.srt [17.8 KB] 1. Scriptable Objects, Serialization.mp4
- [109.8 MB] 10.1 2-42-V.unitypackage [49.4 MB] 7. OnMouseDown() method.srt [13.7 KB] 12.2 Scripts.zip
- [47.3 KB] 11. Start Button.en.srt [20.3 KB] 4.2 Scripts.zip
- [35.4 KB] 2. Abstract classes.en.srt [9.6 KB] 10.2 Scripts.zip
- [44.8 KB] 12.1 3-44.unitypackage [49.5 MB] 12. Completing Hero Prefabs.srt [17.3 KB] 1.1 Scripts.zip
- [27.7 KB] 10. Enemy Deployment.srt [11.9 KB] 6. UI Button.mp4
- [129.9 MB] 8. Observer Pattern, Destroy() method.en.srt [21.9 KB] 5. Instantiate method.en.srt [28.2 KB] 3.1 2-35.unitypackage [46.0 MB] 8.1 Scripts.zip
- [41.4 KB] 5.1 icon.zip
- [80.4 KB] 3. Heroes.mp4
- [124.6 MB] 12. Completing Hero Prefabs.en.srt [18.2 KB] 10. Enemy Deployment.en.srt [12.6 KB] 4. Scroll Rect, Grid Layout Group.srt [14.3 KB] 9.1 Scripts.zip
- [41.5 KB] 7. OnMouseDown() method.en.srt [14.5 KB] 6. UI Button.en.srt [16.0 KB] 11.1 Scripts.zip
- [46.3 KB] 3. Heroes.srt [11.9 KB] 3.2 Sprites.zip
- [28.3 MB] 10. Enemy Deployment.mp4
- [111.4 MB] 5. Instantiate method.mp4
- [208.7 MB] 1. Scriptable Objects, Serialization.srt [17.1 KB] 5. Instantiate method.srt [26.7 KB] 12. Completing Hero Prefabs.mp4
- [176.4 MB] 8. Observer Pattern, Destroy() method.mp4
- [161.1 MB] 4. Scroll Rect, Grid Layout Group.en.srt [15.6 KB] 3. Heroes.en.srt [12.4 KB] 9. Delegates.srt [14.9 KB] 📁 2. Movement 2. Movement说明.zip
- [1.8 MB] 4.1 Scripts.zip
- [10.6 KB] 7. Interface.mp4
- [118.4 MB] 5.3 Scripts.zip
- [12.7 KB] 1. ListT.mp4
- [133.7 MB] 12.2 Scripts.zip
- [24.2 KB] 11. Movement, p.1, Time.deltaTime.mp4
- [120.5 MB] 8. Properties.srt [12.8 KB] 11. Movement, p.1, Time.deltaTime.en.srt [16.0 KB] 5.1 2-24.unitypackage [15.5 MB] 3. Start, Awake, Update functions.srt [12.8 KB] 12. Movement, p.2.mp4
- [197.4 MB] 1. ListT.en.srt [15.5 KB] 12. Movement, p.2.en.srt [25.4 KB] 7. Interface.srt [18.4 KB] 6. Inheritance.mp4
- [179.6 MB] 10. Optimal Path, p.2.mp4
- [177.5 MB] 11.2 Scripts.zip
- [22.7 KB] 13.2 Scripts.zip
- [25.5 KB] 9. Optimal Path, p.1.mp4
- [119.0 MB] 13. Movement, p.3, Ground Regiment.mp4
- [209.1 MB] 8. Properties.en.srt [13.6 KB] 4. Static classes and members.en.srt [16.7 KB] 10.1 2-29.unitypackage [15.5 MB] 12. Movement, p.2.srt [24.3 KB] 2. Adjacent hexes.en.srt [18.8 KB] 8.1 Property.unitypackage [2.2 MB] 4. Static classes and members.srt [15.8 KB] 3. Start, Awake, Update functions.en.srt [13.6 KB] 1. ListT.srt [15.2 KB] 5.2 new frames.zip
- [37.1 KB] 6.1 Scripts.zip
- [14.0 KB] 7. Interface.en.srt [19.8 KB] 2. Adjacent hexes.srt [17.9 KB] 10. Optimal Path, p.2.en.srt [25.3 KB] 13. Movement, p.3, Ground Regiment.en.srt [26.2 KB] 6. Inheritance.en.srt [28.9 KB] 8. Properties.mp4
- [80.5 MB] 6. Inheritance.srt [26.8 KB] 5. Available Positions.srt [24.4 KB] 4. Static classes and members.mp4
- [84.0 MB] 7.1 Scripts.zip
- [16.0 KB] 10. Optimal Path, p.2.srt [24.1 KB] 9. Optimal Path, p.1.srt [14.4 KB] 2. Adjacent hexes.mp4
- [152.4 MB] 13. Movement, p.3, Ground Regiment.srt [24.2 KB] 5. Available Positions.mp4
- [173.7 MB] 9. Optimal Path, p.1.en.srt [15.2 KB] 3. Start, Awake, Update functions.mp4
- [97.0 MB] 2.1 Scripts.zip
- [10.6 KB] 10.2 Scripts.zip
- [22.7 KB] 12.1 2-31.unitypackage [15.5 MB] 11. Movement, p.1, Time.deltaTime.srt [15.0 KB] 11.1 2-30.unitypackage [15.5 MB] 5. Available Positions.en.srt [25.7 KB] 13.1 2-32.unitypackage [15.5 MB] 📁 1. Creating the Battlefield 11. Hexes Prefabs.mp4
- [67.0 MB] 9. Creating Hex Prefab.mp4
- [92.2 MB] 23. Foreach loop.mp4
- [119.4 MB] 21. Coordinate System.mp4
- [102.5 MB] 6. Positioning GameObjects.mp4
- [46.1 MB] 18. Animation.mp4
- [153.3 MB] 20. Array, Two-Dimensional Array.mp4
- [90.6 MB] 5. UI Image.en.srt [15.0 KB] 7. Variables. Value and Reference types.en.srt [20.2 KB] 1. Project Plan.mp4
- [52.3 MB] 17. Hero Prefab.en.srt [9.3 KB] 4.1 hex v3.zip
- [9.3 MB] 23.1 1_19.unitypackage [15.4 MB] 5.1 UIImageAdd.unitypackage [3.2 MB] 14. Basics of OOP encapsulation, inheritance, polymorphism.srt [25.5 KB] 19. For Loop.mp4
- [69.2 MB] 10. Canvas, Transform, RectTransform.mp4
- [142.8 MB] 15. Access Modifiers.en.srt [23.3 KB] 21.2 Scripts.zip
- [3.8 KB] 2. Installing Unity and Visual Studio.mp4
- [90.3 MB] 4. Creating the first object.srt [9.9 KB] 12. Creating Battlefield.en.srt [8.5 KB] 5. UI Image.mp4
- [98.8 MB] 18. Animation.en.srt [17.8 KB] 15.1 V1_14_AM.unitypackage [133.9 MB] 16.1 V15_Methods.unitypackage [422.5 KB] 2. Installing Unity and Visual Studio.srt [16.9 KB] 24. All about UI Button.en.srt [24.0 KB] 17. Hero Prefab.srt [8.9 KB] 23. Foreach loop.srt [15.0 KB] 1. Project Plan.en.srt [4.1 KB] 22. Enumeration.srt [15.7 KB] 11. Hexes Prefabs.en.srt [9.5 KB] 16. Methods. Parameters. Ref, In, Out.srt [32.3 KB] 24. All about UI Button.srt [22.6 KB] 9. Creating Hex Prefab.srt [12.2 KB] 17.2 Fairy.zip
- [4.9 MB] 6. Positioning GameObjects.en.srt [8.1 KB] 24.1 M1_V10.unitypackage [2.8 MB] 16. Methods. Parameters. Ref, In, Out.en.srt [34.3 KB] 13. Else-If Statement, Ternary Operator.srt [18.6 KB] 21.1 1_17.unitypackage [15.4 MB] 5. UI Image.srt [13.9 KB] 16. Methods. Parameters. Ref, In, Out.mp4
- [241.4 MB] 8. Extra lecture. Prefabs (Unity 2020).srt [16.6 KB] 15. Access Modifiers.srt [21.7 KB] 23. Foreach loop.en.srt [15.9 KB] 13. Else-If Statement, Ternary Operator.en.srt [19.6 KB] 12. Creating Battlefield.mp4
- [101.9 MB] 1. Project Plan.srt [3.8 KB] 3.1 V4_P1.unitypackage [182.3 MB] 3. Extra Lecture. Canvas.en.srt [36.9 KB] 13. Else-If Statement, Ternary Operator.mp4
- [132.6 MB] 14. Basics of OOP encapsulation, inheritance, polymorphism.mp4
- [166.5 MB] 6. Positioning GameObjects.srt [7.6 KB] 21. Coordinate System.srt [13.1 KB] 3. Extra Lecture. Canvas.srt [35.1 KB] 10. Canvas, Transform, RectTransform.srt [17.8 KB] 17.1 1_13.unitypackage [15.4 MB] 7. Variables. Value and Reference types.mp4
- [130.6 MB] 13.1 Else_If_Unity_2020.unitypackage [9.7 MB] 8.1 M1_V7pack.unitypackage [22.6 MB] 7. Variables. Value and Reference types.srt [19.1 KB] 10.1 1_07.unitypackage [9.7 MB] 23.2 Scripts.zip
- [9.5 KB] 9. Creating Hex Prefab.en.srt [12.7 KB] 15. Access Modifiers.mp4
- [148.3 MB] 11.1 8-
- 01 Resources.zip
- [103.1 KB] 12. Creating Battlefield.srt [8.5 KB] 22. Enumeration.en.srt [16.4 KB] 2. Installing Unity and Visual Studio.en.srt [17.9 KB] 14. Basics of OOP encapsulation, inheritance, polymorphism.en.srt [27.3 KB] 8. Extra lecture. Prefabs (Unity 2020).en.srt [17.4 KB] 12.1 1_09.unitypackage [9.9 MB] 22. Enumeration.mp4
- [118.2 MB] 10. Canvas, Transform, RectTransform.en.srt [19.0 KB] 19. For Loop.en.srt [10.1 KB] 4. Creating the first object.mp4
- [58.5 MB] 3. Extra Lecture. Canvas.mp4
- [267.9 MB] 18. Animation.srt [17.1 KB] 20. Array, Two-Dimensional Array.en.srt [17.0 KB] 20. Array, Two-Dimensional Array.srt [16.5 KB] 11. Hexes Prefabs.srt [9.0 KB] 8. Extra lecture. Prefabs (Unity 2020).mp4
- [145.2 MB] 4. Creating the first object.en.srt [10.3 KB] 17. Hero Prefab.mp4
- [93.3 MB] 24. All about UI Button.mp4
- [148.6 MB] 21. Coordinate System.en.srt [13.7 KB] 19. For Loop.srt [9.3 KB] 适合人群 Unity开发者 游戏爱好者 学习收获 掌握Unity引擎使用 设计回合制战斗系统 实现AI决策逻辑 祝您学习愉快! 学有所成,前程似锦!





