Game Development Reference
In-Depth Information
To use this variable, create a new script called Enemy.cs and add it to the enemy
ship. Change the code to the following:
Here, we store the AIRig for the entity by retrieving it at the start. Then, we get the
isAttacking variable from the working memory, and if the enemy is attacking, the
ship starts blinking green. If it's not attacking, the ship stays its default color, which is
white. Create a new prefab in Unity named Enemy and drag the ship into it. Now we
have enemies that can start attacking the player, and we can start setting up our AI.
Search WWH ::




Custom Search