Esempio n. 1
0
 // Use this for initialization
 void Start()
 {
     globalVariables = (Global)GameObject.FindObjectOfType(typeof(Global));
     connection = GameObject.Find("Connection").GetComponent<Connection>();
     gameStarted = false;
     players = new ArrayList();
     pellets = new ArrayList();
 }
Esempio n. 2
0
 // Use this for initialization
 void Start()
 {
     connection = GameObject.Find("Connection").GetComponent<Connection>();
     error = 0;
     newAccount = false;
     remember = PlayerPrefs.GetInt("remember")==1;
     if (remember) player1Name = PlayerPrefs.GetString("playerName");
     rememberPass = PlayerPrefs.GetInt("rememberPass")==1;
     if (rememberPass)player1Password = PlayerPrefs.GetString("playerPass");
 }
Esempio n. 3
0
 // Use this for initialization
 void Start()
 {
     connection = GameObject.Find("Connection").GetComponent<Connection>();
     resetCalled = false;
     gameObject.name = "Player";
     globalVariables = (Global)GameObject.FindObjectOfType(typeof(Global));
     //	maxSpeed = 4;
     //	size = 1;
     //	int dir = UnityEngine.Random.Range(1,5);
     //	speedX = (dir%2==1?GetCurrentSpeed()*(dir-2):0);
     //	speedY = (dir%2==1?0:GetCurrentSpeed()*(dir-3));
     //	transform.position = new Vector3(UnityEngine.Random.Range(-30.0f, 30.0f)/10.0f,UnityEngine.Random.Range(-30.0f, 30.0f)/10.0f, 0.0f);
 }