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

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.

主站蜘蛛池模板: 云安县| 姜堰市| 桐城市| 丹寨县| 富平县| 城固县| 咸阳市| 德阳市| 大邑县| 迭部县| 武清区| 新兴县| 唐河县| 科技| 凤翔县| 赤壁市| 铅山县| 吉木萨尔县| 鄂尔多斯市| 阿拉尔市| 沁水县| 那坡县| 阳谷县| 女性| 永顺县| 凉城县| 绍兴县| 塔城市| 武宁县| 永吉县| 双峰县| 灵武市| 芦溪县| 沅江市| 广南县| 方正县| 无棣县| 康定县| 中宁县| 集贤县| 保靖县|