2DShooter

uke 的头像

2DShooter-2d简单射击游戏系列教程之五,创建触发器脚本代码

还是转的英文,边看边翻译吧!

Create a script called EnemyTrigger in the same way that you did for Enemy, and then load it.

uke 的头像

2DShooter-2d简单射击游戏系列教程之五,创建触发器脚本代码

还是转的英文,边看边翻译吧!

Create a script called EnemyTrigger in the same way that you did for Enemy, and then load it.

uke 的头像

2DShooter-2d简单射击游戏系列教程之五,给敌人物体添加脚本

First we want the enemy to appear in the game: start off by loading the Game level. Click on the Manager object in the Hierarchy, and open the arrow next to the Object Prefabs variable in the Load Level script in the Inspector. By now you can probably guess what you need to do: change the Size element to 4, and drag your Enemy prefab onto element 3. If you run the game now, your enemies will appear in the locations where you put them in the level editor.