• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/33

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

33 Cards in this Set

  • Front
  • Back

enum setName { item1, item2, ... itemN };

This data type allows you to create a collection of related constants.

CancelInvoke( "functionName" );

This function aborts the next scheduled Invoke call of the named function.

Invoke( "functionName", timeDelay );




InvokeRepeating( "functionName", timeDelay, intervalTime );

This function calls another void function after a specified delay time in seconds.




A related function performs the same action, but repeatedly, with the interval duration in seconds passed to it as an additional parameter.

type[] arrayName = new type[ range ];

This data type contains a set of variables whose range is defined when it is declared.

instanceName Instantiate( objectType );

This function returns a copy of the named object and places that copy in the scene.

public class Name : type


{


...


}

This object type behaves as a template function that defines a set of variables and behaviors.

Time.deltaTime




Time.fixedDeltaTime

This function returns the elapsed time since the last Update() call.




A related function returns the elapsed time since the last FixedUpdate() call.

GetComponent< componentName >();

This function returns a component from another game object.

foreach( type identifier in expression )


{


...


}

This loop iterates through each item in a set of variables (i.e., an array), and ends when reaching the end of the set.

type name = value;

Variable declaration syntax.

type name ( parameter name )


{


...


return [ expression ];


}

Function declaration syntax.

Nation.city.street

Dot operators call specific elements from within larger objects.

if ( condition1 == true )


{ ... }


else if ( condition2 == true )


{ ... }


else


{ ... }

This statement evaluates a condition and executes instructions if that condition is true. A related statement will execute instructions if that condition is false.

while ( condition1 == true )


{


...


}

This loop first evaluates a condition and then executes instructions repeatedly as long as that condition remains true.

for ( int a = 0; a < 5; a++ )


{


...


}

This loop initializes, iterates, and evaluates a condition all passed to it as its declarative parameters, and then executes a set of instructions a number of times determined by those parameters.

do


{


...


} while ( condition == true );

This loop executes instructions repeatedly as long as a condition evaluated at the end of those instructions remains true.

Start()


{


...


}

This function calls when the game object it is attached to is created in the scene.

OnMouseDown()


{


...


}

This function is called when the user presses the mouse button while over the GUI element or active collision object it is attached to.

Input.GetAxis( "axisName" )

This function returns a float value between -1 and 1 defined by the named axis (Horizontal or Vertical) .

Input.GetKeyDown( "keyName" )




Input.GetKeyUp( "keyName" )

This function returns true the first frame the user presses the named key.




A related function returns true the first frame the user releases the named key.

Input.GetKey( "keyName" )

This function returns true as long as the user holds down the named key.

Input.GetButtonDown( "buttonName" )




Input.GetButtonUp( "buttonName" )

This function returns true the first frame the named button (as defined in the Input Manager) is pressed.



A related function returns true the first frame the named button is released.

Destroy( targetName, delayTime );

This function removes from the scene the named object or component, with an optional delay time in seconds passed to it as a second parameter.

Mathf.Lerp( value1, value2, percentageValue );

This function interpolates between two numerical values based on a percentage value passed as the third parameter.

transform.LookAt( targetName );

This transform flag orients the object calling it at the named target.

transform.Rotate( Vector3value );




transform.Translate( Vector3value );




transform.Scale( Vector3value );

These functions spin, move, or resize the object along the x, y, and z, axes, as determined by the Vector3 value passed to it.

myObject.activeSelf




myObject.activeInHierarchy

This function returns true or false based on whether or not the object calling it is active in the scene.




A related function returns true or false based on whether or not the object's parent hierarchy is active in the scene.

gameObject.setactive( trueOrFalse );

This function applied to an object will toggle it between active or inactive in the scene, based on the parameter passed to it.

component.enabled = trueOrFalse;

This function applied to an object's component will toggle it between active or inactive in the scene, based on the value assigned to it.

FixedUpdate()


{


...


}

This function is called every physics step at fixed intervals, independent from the frame rate.

Update()


{


...


}

This function is called once per frame. Cannot be used for physics objects.

Awake()


{


...


}

This function calls the moment the object is loaded, regardless of whether or not the object is active in the scene.

switch( var )


{


case a: ... break;


case b: ... break;


default: ... break;


}

This conditional statement allows you to compare a single variable against a series of constants, and is useful for choosing between several outcomes.