Advanced Game Development: Assignment 2

hana grimmer
Aug 25, 2017 · 1 min read

Line 5: “public class Enter” means that the name of the class is enter (and is able to be called by things of other classes due to being “public”. MonoBehavior is “the base script” ((according to the manual (=v=;;)))

Line 6: void means that there will be no value returned from this function. OnTriggerEnter makes it so that the function will play out once the player enters the trigger.

Line 9: Debug.Log (“Activating move platform”)sends the message within the quotes to the console once the function takes action (aka, a sanity check) The semi colon is to close off that particular line of code

Line 10 movePlatform references the object named movePlatform within the “Hiearchy” window. Since it should be inactive, one the function starts “.setActive(true)” will make the platform active again.

)

    hana grimmer

    Written by

    Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
    Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
    Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade