|
Inventory Engine v4.2
|
Add this component to an object and you'll be able to define a path, that can then be used by another component. More...
Inherits MonoBehaviour.
Classes | |
| struct | Data |
| A data structure. More... | |
Public Types | |
| enum | CycleOptions { BackAndForth , Loop , OnlyOnce } |
| the possible cycle options More... | |
| enum | MovementDirection { Ascending , Descending } |
| the possible movement directions More... | |
Public Member Functions | |
| virtual void | Initialization () |
| Flag inits, initial movement determination, and object positioning. | |
| int | CurrentIndex () |
| Vector3 | CurrentPoint () |
| Vector3 | CurrentPositionRelative () |
| virtual IEnumerator< Vector3 > | GetPathEnumerator () |
| Returns the current target point in the path. | |
| virtual void | ChangeDirection () |
| Call this method to force a change in direction at any time. | |
| virtual void | UpdateOriginalTransformPosition (Vector3 newOriginalTransformPosition) |
| Updates the original transform position. | |
| virtual Vector3 | GetOriginalTransformPosition () |
| Gets the original transform position. | |
| virtual void | SetOriginalTransformPositionStatus (bool status) |
| Sets the original transform position status. | |
| virtual bool | GetOriginalTransformPositionStatus () |
| Gets the original transform position status. | |
| void | SetPath (in Data configuration) |
| Replaces this MMPath's settings with the ones passed in parameters. | |
Public Attributes | |
| CycleOptions | CycleOption |
| MovementDirection | LoopInitialMovementDirection = MovementDirection.Ascending |
| the initial movement direction : ascending > will go from the points 0 to 1, 2, etc ; descending > will go from the last point to last-1, last-2, etc | |
| List< MMPathMovementElement > | PathElements |
| the points that make up the path the object will follow | |
| MMPath | ReferenceMMPath |
| another MMPath that you can reference. If set, the reference MMPath's data will replace this MMPath's | |
| bool | AbsoluteReferencePath = false |
| if this is true, this object will move to the 0 position of the reference path | |
| float | MinDistanceToGoal = .1f |
| the minimum distance to a point at which we'll arbitrarily decide the point's been reached | |
| bool | LockHandlesOnXAxis = false |
| bool | LockHandlesOnYAxis = false |
| bool | LockHandlesOnZAxis = false |
Protected Member Functions | |
| virtual void | Start () |
| Initialization. | |
| virtual void | Update () |
| On update we keep moving along the path. | |
| virtual void | ComputePath () |
| Moves the object and determines when a point has been reached. | |
| virtual void | OnDrawGizmos () |
| On DrawGizmos, we draw lines to show the path the object will follow. | |
Protected Attributes | |
| Vector3 | _originalTransformPosition |
| the original position of the transform, hidden and shouldn't be accessed | |
| bool | _originalTransformPositionStatus =false |
| internal flag, hidden and shouldn't be accessed | |
| bool | _active =false |
| IEnumerator< Vector3 > | _currentPoint |
| int | _direction = 1 |
| Vector3 | _initialPosition |
| Vector3 | _initialPositionThisFrame |
| Vector3 | _finalPosition |
| Vector3 | _previousPoint = Vector3.zero |
| int | _currentIndex |
| float | _distanceToNextPoint |
| bool | _endReached = false |
Properties | |
| bool | EndReached [get] |
| if this is true, the path has reached its end | |
| virtual bool | CanMove [get, set] |
| if this is true, the object can move along the path | |
| virtual bool | Initialized [get, set] |
| if this is true, this path has gone through its Initialization method | |
| virtual int | Direction [get] |
Add this component to an object and you'll be able to define a path, that can then be used by another component.
|
virtual |
Call this method to force a change in direction at any time.
|
protectedvirtual |
Moves the object and determines when a point has been reached.
| int MoreMountains.Tools.MMPath.CurrentIndex | ( | ) |
| Vector3 MoreMountains.Tools.MMPath.CurrentPoint | ( | ) |
| Vector3 MoreMountains.Tools.MMPath.CurrentPositionRelative | ( | ) |
|
virtual |
Gets the original transform position.
|
virtual |
Gets the original transform position status.
true, if original transform position status was gotten, false otherwise.
|
virtual |
Returns the current target point in the path.
|
virtual |
Flag inits, initial movement determination, and object positioning.
|
protectedvirtual |
On DrawGizmos, we draw lines to show the path the object will follow.
|
virtual |
Sets the original transform position status.
| status | If set to true status. |
| void MoreMountains.Tools.MMPath.SetPath | ( | in Data | configuration | ) |
Replaces this MMPath's settings with the ones passed in parameters.
| configuration |
|
protectedvirtual |
Initialization.
|
protectedvirtual |
On update we keep moving along the path.
|
virtual |
Updates the original transform position.
| newOriginalTransformPosition | New original transform position. |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
the original position of the transform, hidden and shouldn't be accessed
|
protected |
internal flag, hidden and shouldn't be accessed
|
protected |
| bool MoreMountains.Tools.MMPath.AbsoluteReferencePath = false |
if this is true, this object will move to the 0 position of the reference path
| CycleOptions MoreMountains.Tools.MMPath.CycleOption |
| bool MoreMountains.Tools.MMPath.LockHandlesOnXAxis = false |
| bool MoreMountains.Tools.MMPath.LockHandlesOnYAxis = false |
| bool MoreMountains.Tools.MMPath.LockHandlesOnZAxis = false |
| MovementDirection MoreMountains.Tools.MMPath.LoopInitialMovementDirection = MovementDirection.Ascending |
the initial movement direction : ascending > will go from the points 0 to 1, 2, etc ; descending > will go from the last point to last-1, last-2, etc
| float MoreMountains.Tools.MMPath.MinDistanceToGoal = .1f |
the minimum distance to a point at which we'll arbitrarily decide the point's been reached
| List<MMPathMovementElement> MoreMountains.Tools.MMPath.PathElements |
the points that make up the path the object will follow
| MMPath MoreMountains.Tools.MMPath.ReferenceMMPath |
|
getset |
if this is true, the object can move along the path
|
get |
|
get |
if this is true, the path has reached its end
|
getset |
if this is true, this path has gone through its Initialization method