void Update() { if (body == BodyType.MovingBody) { Jump(); float jumping = isJump ? -jumpSpeed : 1.0f; attractor.Attract(myTransform, gravity, jumping, rotationSpeed); } else { attractor.Attract(myTransform, gravity, 1.0f, rotationSpeed); } }
// Update is called once per frame void Update() { if (Time.timeScale > 0) { if (useAlternativeGravity) { attractor.Attract(transform, rig, newGravity); } else { attractor.Attract(transform, rig); } } }
void Update() { if (rotateUpwardGravity) { attractor.Attract(myTransform, rotateUpwardGravity); } else if (alwaysFacing) { attractor.Attract(myTransform, facingDirection); } else { attractor.Attract(myTransform, rotateUpwardGravity); } }
void FixedUpdate() { if (attractor) { attractor.Attract(myTransform); } }
private void Update() { if (canAttract) { attracter.Attract(myTransform); } }
void FixedUpdate() { if (Config.isPause) { return; } if (PlayerCollision.isDie) { return; } if (placeOnSurface) { if (rb != null) { attractor.PlaceOnSurface(rb); } } else { if (rb != null) { attractor.Attract(rb); } } }
// Update is called once per frame void Update() { if (attractor) { attractor.Attract(myTransform, lockedRotation); } }
// Update is called once per frame void FixedUpdate() { if (OnPlanet) { planet.Attract(myTransform, customGravity); } }
// Update is called once per frame void Update() { switch (Faux) { case 1: attractors1.Attract(myTransform); break; case 2: attractors2.Attract(myTransform); break; case 3: attractors3.Attract(myTransform); break; case 4: attractors4.Attract(myTransform); break; case 5: attractors5.Attract(myTransform); break; case 6: attractors6.Attract(myTransform); break; default: break; } }
void FixedUpdate() { if (attractorPlanet) { attractorPlanet.Attract(bodyTransform); } }
void Update() { attractor.Attract(myTransform); rb.AddForce(new Vector2(x, y), ForceMode2D.Force); }
void FixedUpdate() { myRigidBody.AddForce(transform.forward * thrust); if (attractor) { attractor.Attract(myTransform); } }
void FixedUpdate() { attractor.Attract(myTransform, gravity, rotation); if (myRigidBody2D.velocity.magnitude > speedLimit) { limitSpeed_Strict(); } currentSpeed = myRigidBody2D.velocity.magnitude; }
void FixedUpdate() { if (placeOnSurface) { attractor.PlaceOnSurface(rb); } else { attractor.Attract(rb); } }
// Update is called once per frame void Update() { attractor.Attract(myTransform); /* * if (attractor) * { * attractor.Attract(myTransform); * } */ }
/// <summary> /// This function is called every fixed framerate frame, if the MonoBehaviour is enabled. /// </summary> void FixedUpdate() { // place the player on surface if (placeOnSurface) { fauxGravityAttractor.PlaceOnSurface(rb); } else { fauxGravityAttractor.Attract(rb); } }
void FixedUpdate() //give Component Rigidbody to Attractor { if (placeOnSurface) { attractor.PlaceOnSurface(rb); } else { attractor.Attract(rb); } }
// Update is called once per frame void Update() { //if (Input.GetKeyDown(KeyCode.Space) && playerJump.IsGrounded()) //{ // attractor.Jump(m_MyTransform); // //playerJump.Jump(); //} //check that there is something to pull body towards if (attractor) { attractor.Attract(m_MyRigid); } }
void Update() { if (useMultiAttractor) { for (int i = 1; i < _attractor.Count; i++) { _attractor[i - 1].GetComponent <FauxGravityAttractor>().Attract(myTransform); } } else { attractor.Attract(myTransform); } }
private void Update() { gravityUp = attractor.Attract(transform, gravityMultiplier); if (Input.GetKeyDown(KeyCode.Space)) { if (GetComponent <PlayerController>() != null) { Vector3 gravityUp = (transform.position - attractor.transform.position).normalized; Vector3 bodyUp = transform.up; GetComponent <Rigidbody>().AddForce(gravityUp * 500.0f); } } }
// Update is called once per frame void Update() { attractor.Attract(currentTransform); }
// Update is called once per frame void Update() { attractor.Attract(myTransform); }
void FixedUpdate() { attractor.Attract(_rigidbody); }
void FixedUpdate() { attractor.Attract(_rb); }
// Update is called once per frame void FixedUpdate() { attractor.Attract(transform); }
// Update is called once per frame void Update() { attractor.Attract(carTransform); }
// Update is called once per frame void Update() { attractor.Attract(GetComponent <Transform> ()); }
void Update() { _attractor.Attract(rb); }
// Update is called once per frame void Update() { Attractor.Attract(planetTransform); }
// Update is called once per frame void LateUpdate() { GetComponent <Rigidbody>().constraints = RigidbodyConstraints.FreezeRotation; //GetComponent<Rigidbody>().useGravity = true; attractor.Attract(transform); }