2D Game Kit在unity的使用

本文参考:

如何制作游戏?【不需要编程 __】新手30分钟 学会制作2D游戏!_ 如何制作游戏 _ unity教学 _ 制作游戏 _ 2d游戏_哔哩哔哩_bilibili

1、下载2d game kit

新建一个unity工程,进入该工程后,在Window -> Asset Store中搜索 2d game kit。

然后下载导入到Unity中。

此时会报错,报错信息类似如下:

 Assets\2DGamekit\Utilities\Editor\RuleTileEditor.cs(69,10): error CS0433: The type 'RuleTile' exists in both 'Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' and 'Unity.2D.Tilemap.Extras, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' 

这是因为在导入的2d game kit和使用Unity 2D创建的项目中出现了相同的类名RuleTile。

此时使用对2D Game Kit中重名的文件进行重构。

具体参考:Unity 导入项目报错: error CS0433: The type ‘RuleTile‘ exists in both ‘Assembly-CSharp, Version=0.0.0.0,..._the type 'jsonmapper' exists in both 'assembly-csh-CSDN博客

2、 启动第一个demo

(1)在Kit Tools下选择Create New Scene

(2)点击Create后,就会自动导入Scene如下图所示:

点击启动,就可以运行Game了,运行用到的按键罗列如下:

空格:跳起来

S:蹲下来

O:发射子弹

K:用刀横扫千军

3、设计场景(scene)

(3.1)必备知识

(3.1.1)打开scene light

否则场景下会非常昏暗。

Unity 2017 2D Game Development Projects: Create three interactive and engaging 2D games with Unity 2017 Build classic arcade, shooter and platform games with Unity 2D toolset 2D games are everywhere! Timeless and popular, 2D games represent a substantial segment of the games market. The Unity engine has revolutionized the gaming industry, by making it easier for game developers to create quality games on a budget. If you are looking for a guide to create 2D games using Unity 2017, look no further. With this book, you will learn all the essentials of 2D game development by creating three epic games in a step-by-step manner throughout the course of this book. The first game will have you collecting as many cakes as possible. The second will transport you to outer space to traverse as far as possible while avoiding enemy spaceships. The last game will have you running and jumping across platforms to collect coins and other exotic items. Throughout all these three games, you will create characters, make them move, and create some enemies. And then, of course, write code to destroy them!. After showing you the necessities of creating a game, this book will then help you to porting the game to a mobile platform, and provide a path to publish it on the stores. By the end of this book, you will not only have created three complete great games, but be able to apply your knowledge to create and deploy your own games. What You Will Learn Work with Unity 2017’s new 2D workflow and create a 2D scene Set the scene with different types of backgrounds, either static or dynamically using a tileset Bring your character to life through simple animations Understand the core concepts of programming by creating basic code that controls a character and destroys an enemy Create buttons and game controls by using code snippets for input detection Develop three 2D games from genres such as classic arcade, space shooter, and platformer games Add audio and feedback and deploy your games
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值