Beginning of dialog window. Escape will cancel and close the window.
End of dialog window.
ScopeAndAccessModifiers
using UnityEngine;
using System.Collections;
publicclassScopeAndAccessModifiers : MonoBehaviour
{
publicint alpha = 5;
privateint beta = 0;
privateint gamma = 5;
private AnotherClass myOtherClass;
voidStart(){
alpha = 29;
myOtherClass = new AnotherClass();
myOtherClass.FruitMachine(alpha, myOtherClass.apples);
}
voidExample(int pens, int crayons){
int answer;
answer = pens * crayons * alpha;
Debug.Log(answer);
}
voidUpdate(){
Debug.Log("Alpha is set to: " + alpha);
}
}
AnotherClass
using UnityEngine;
using System.Collections;
publicclassAnotherClass
{publicint apples;
publicint bananas;
privateint stapler;
privateint sellotape;
publicvoidFruitMachine(int a, int b){
int answer;
answer = a + b;
Debug.Log("Fruit total: " + answer);
}
privatevoidOfficeSort(int a, int b){
int answer;
answer = a + b;
Debug.Log("Office Supplies total: " + answer);
}
}