Posts

Showing posts from October, 2018

Lynda.com: Become a Unity 2D Developer (Day 12, Completion)

Image
More Enemies Aliens that Attack For this exercise, I once again had to create a game object using specified frames and assigning values accordingly.  Ultimately, I created another alien enemy using frames 1 - 10 for an idle animation.  From there, I created an additional animation based on the frames 11- 16 for an attack animation.  Lastly, I placed the new Alien enemy onto the stage and tested it.  Although the animations worked by manually adjusting the values, it was now time to add code to automate the animations. I then applied this script onto the alien in order to trigger the new attack animation.  At this time, the code and the trigger function is working as designed. **Note, there appears to be some sort of transparency issue with the Alien, but the code is working as intended.** Animation-based Attack Trigger In order to ensure that the alien attack will trigger the correct animations for the alien and the astronaut, I had to incor...

Lynda.com: Become a Unity 2D Developer (Day 11..Sort of)

Image
UNITY 2D LEVEL DESIGN (...continued part IV) Unfortunately, I had to take a huge departure from learning Unity.  Let's just say that I'm also studying Cisco stuff.  Needless to say, I figured it was time to finish what I had started.  Switches Create Switches This chapter was similar to other animation tutorials, specifically in the setup process.  First, I had to create a switch object by utilizing the three images of the switch, which are the three states of the switch, specifically "Down, Up, and Idle". Afterwards, it was a matter of setting up the animations and then sequencing them.  I created three animations for the switch: SwitchUpAnimation, SwitchDownAnaimtion, and SwitchIdleAnimation.  From there, the AnimState was configured according to the sequence of the animation. Switch Collision Trigger Creating the switch now leads to implementing code.  First, I created a new C# script and then proceeded to create new funct...