Ejemplo n.º 1
0
	// Use this for initialization
	void Start () {
		stats = GetComponent<playerStats> ();
		debugOn = true;
		render = playerMesh.GetComponent<Renderer> ();
		//playerNameObject.text = playerName;
		Application.runInBackground = true;
		charControl = GetComponent<CharacterController> ();
		distToGround = charControl.bounds.extents.y + 0.1f;
		cam = Camera.main;
		if (photonView.isMine && !stats.isDead()) {
			cam.GetComponent<cameraFollow> ().target = this.gameObject.transform;
		}
	}