// Update is called once per frame void Update() { if (flying) { if (transform.position.y < ceiling) { add_force(); } } Vector3 screenPos = camera.WorldToScreenPoint(transform.position); if (screenPos.y < 4 * Screen.height * 0.2f && screenPos.y > Screen.height * 0.2f && screenPos.x < 4 * Screen.width * 0.2f && screenPos.x > Screen.width * 0.2f) { gui = "eins"; if (Input.acceleration.x > accelerationTrigger || Input.acceleration.y > accelerationTrigger || Input.acceleration.z > accelerationTrigger) { noise1.Play(); UserManagerParse.IncreasePoint(); destroy(); } } else { gui = "zwei"; } }
public void LoginFB() { FB_METHODS.CallFBLogin(delegate { //on success login UserManagerParse.loadUser(FB.UserId); loginButton.SetActive(false); data.text = "Ready for increase points?"; }); }
public void IncreasePoints() { UserManagerParse.IncreasePoint(); data.text = "ObjectId:" + UserManagerParse.global_user.idObject + " idFacebook:" + UserManagerParse.global_user.idFacebook + " Points:" + UserManagerParse.global_user.points; }