Inventory Engine
v4.0
|
This class acts as an interface to allow the demo levels to work whether the environment (colliders, rigidbodies) are set as 2D or 3D. More...
Inherits MonoBehaviour.
Public Member Functions | |
virtual void | AddForce (Vector3 force) |
Adds the specified force to the rigidbody associated to the interface. More... | |
virtual void | AddRelativeForce (Vector3 force) |
Adds the specified relative force to the rigidbody associated to the interface. More... | |
virtual void | MovePosition (Vector3 newPosition) |
Move the rigidbody to the position vector specified More... | |
virtual void | ResetAngularVelocity () |
Resets the angular velocity. More... | |
virtual void | ResetRotation () |
Resets the rotation. More... | |
virtual void | IsKinematic (bool status) |
Determines whether the rigidbody associated to the interface is kinematic More... | |
virtual void | EnableBoxCollider (bool status) |
Enables the box collider associated to the interface. More... | |
Protected Member Functions | |
virtual void | Awake () |
Initialization More... | |
Protected Attributes | |
string | _mode |
Rigidbody2D | _rigidbody2D |
Rigidbody | _rigidbody |
Collider2D | _collider2D |
Collider | _collider |
Bounds | _colliderBounds |
Properties | |
Vector3 | position [get, set] |
Returns the rigidbody's position More... | |
Rigidbody2D | InternalRigidBody2D [get] |
Only use if you absolutely need to target the rigidbody2D specifically More... | |
Rigidbody | InternalRigidBody [get] |
Only use if you absolutely need to target the rigidbody2D specifically More... | |
Vector3 | Velocity [get, set] |
Gets or sets the velocity of the rigidbody associated to the interface. More... | |
Bounds | ColliderBounds [get] |
Gets the collider bounds. More... | |
bool | isKinematic [get] |
Gets a value indicating whether this MoreMountains.Tools.RigidbodyInterface is kinematic. More... | |
bool | Is3D [get] |
Use this to check if you're dealing with a 3D object More... | |
bool | Is2D [get] |
Use this to check if you're dealing with a 2D object More... | |
This class acts as an interface to allow the demo levels to work whether the environment (colliders, rigidbodies) are set as 2D or 3D.
If you already know for sure that you're going for a 2D or 3D game, I suggest you replace the use of this class with the appropriate classes.
|
virtual |
Adds the specified force to the rigidbody associated to the interface.
force | Force. |
|
virtual |
Adds the specified relative force to the rigidbody associated to the interface.
force | Force. |
|
protectedvirtual |
Initialization
|
virtual |
Enables the box collider associated to the interface.
status | If set to true status. |
|
virtual |
Determines whether the rigidbody associated to the interface is kinematic
true
if this instance is kinematic the specified status; otherwise, false
.status | If set to true status. |
|
virtual |
Move the rigidbody to the position vector specified
newPosition |
|
virtual |
Resets the angular velocity.
|
virtual |
Resets the rotation.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
get |
Gets the collider bounds.
The collider bounds.
|
get |
Only use if you absolutely need to target the rigidbody2D specifically
The internal rigid body.
|
get |
Only use if you absolutely need to target the rigidbody2D specifically
The internal rigid body2 d.
|
get |
Use this to check if you're dealing with a 2D object
The position.
|
get |
Use this to check if you're dealing with a 3D object
true
if this instance is3 d; otherwise, false
.
|
get |
Gets a value indicating whether this MoreMountains.Tools.RigidbodyInterface is kinematic.
true
if is kinematic; otherwise, false
.
|
getset |
Returns the rigidbody's position
The position.
|
getset |
Gets or sets the velocity of the rigidbody associated to the interface.
The velocity.