Lynda.com: Become a Unity 2D Developer (Day 10)
UNITY 2D LEVEL DESIGN (...continued part III)
******************************************************************
Due to circumstances out of my control, my prior post for part III was accidentally deleted. Below is my best efforts to document the learning process from memory.
******************************************************************
Doors
Create a Door
Creating the Door was much like all of the other game objects. Essentially, I had to select a series of images and then combined them into a single Door animation.
The Door's Logic
Although the door has been created, it does not actually do anything at this time. The remedy for this is to apply a custom C# script to delegate which frames to animate. Values have been associated with the transition animations.
Code Door Animation Events
Animation events are merely markers for reference. For example, the AnimState would delegate which transition to animate.
Trigger the Door
In order to trigger the door, I had to add a BoxCollider2D to the Door and expand its perimeter by twice the size. This large BoxCollider2D allows the Player to activate the door due to the expanded collision area.
******************************************************************
Due to circumstances out of my control, my prior post for part III was accidentally deleted. Below is my best efforts to document the learning process from memory.
******************************************************************
Doors
Create a Door
Creating the Door was much like all of the other game objects. Essentially, I had to select a series of images and then combined them into a single Door animation.
The Door's Logic
Although the door has been created, it does not actually do anything at this time. The remedy for this is to apply a custom C# script to delegate which frames to animate. Values have been associated with the transition animations.
Code Door Animation Events
Animation events are merely markers for reference. For example, the AnimState would delegate which transition to animate.
Trigger the Door
In order to trigger the door, I had to add a BoxCollider2D to the Door and expand its perimeter by twice the size. This large BoxCollider2D allows the Player to activate the door due to the expanded collision area.




Comments
Post a Comment