官术网_书友最值得收藏!

Creating the enemy tank

Let's go ahead and create an animator controller in your assets folder. This will be your enemy tank's state machine. Call it EnemyFsm.

This state machine will drive the tank's basic actions. As described earlier in our example, the enemy can patrol, chase, and shoot the player. Let's go ahead and set up our state machine. Select the EnemyFsm asset and open up the Animator window.

Now, we'll go ahead and create three empty states that will conceptually and functionally represent our enemy tank's states. Name them Patrol, Chase, and Shoot. Once they are created and named, we'll want to make sure we have the correct default state assigned. At the moment, this will vary depending on the order in which you created and named the states, but we want the Patrol state to be the default state, so right-click on it and select Set as Layer Default State. Now it is colored orange and the Entry state is connected to it.

主站蜘蛛池模板: 阿图什市| 安义县| 天门市| 宜川县| 玛沁县| 罗甸县| 临安市| 清徐县| 镇原县| 桓台县| 巫溪县| 新泰市| 乌拉特中旗| 大余县| 岚皋县| 通州市| 湛江市| 沾益县| 苏尼特右旗| 云南省| 房产| 偃师市| 渭南市| 将乐县| 边坝县| 普定县| 吉木乃县| 农安县| 吉林省| 中西区| 射洪县| 布拖县| 武功县| 兴义市| 遂平县| 湖南省| 茌平县| 武义县| 安泽县| 隆林| 孟津县|