This project will start with setting up the AI's ragdoll
object, which will be used to replace the AI when it dies. Then, we add the script in our AI
script to switch the ragdoll
object with the AI
object. Next, we will create the destroyable wall from four cube objects, which will each have Rigidbody attached. Of course, we will create a script to break the object apart by having a script to check for the colliding object.
Then, we will also create another destructible rock from multiple cubes, which will fall when the player gets close to it. We will create a trigger area, RocksTrigger
, and Rock
scripts to make the rock fall down when the player enters this trigger area using the delegate
and event
functions. However, the delegate
and event
functions are only available for C# users. For Unity JavaScript users, we will create the JSDelegate
class to create our custom delegate
and event
functions.
We already know that in Project 1, Develop a Sprite and Platform...