Prop: Contains functions and data for manipluating Props in rooms. Eg.
P.GoldKey.Hide();
P.Ball.MoveTo(10,20,5);
P.Door.PlayAnimation("SlamShut");
P.Door.Animation = "Closed";
Inherits IQuestClickableInterface.
|
| string | Description [get, set] |
| | Gets/Sets the name shown to players.
|
| |
| string | ScriptName [get] |
| | The name used in scripts.
|
| |
| MonoBehaviour | Instance [get] |
| | Access to the actual game object component in the scene.
|
| |
| bool | Visible [get, set] |
| | Gets or sets whether the object is visible.
|
| |
| bool | Clickable [get, set] |
| | Gets or Sets whether the prop is collidable (NB: Not yet implemented, can use hotspots and set as not Walkable instead)
|
| |
| Vector2 | Position [get, set] |
| | The location of the prop.
|
| |
| bool | Moving [get] |
| | Returns true while the prop is moving.
|
| |
| float | Baseline [get, set] |
| | Gets or sets the baseline used for sorting.
|
| |
| Vector2 | WalkToPoint [get, set] |
| | Gets or sets the walk to point.
|
| |
| Vector2 | LookAtPoint [get, set] |
| | Gets or sets the look at point.
|
| |
| string | Cursor [get, set] |
| | Gets or sets the cursor to show when hovering over the object. If empty, default active cursor will be used.
|
| |
| bool | FirstUse [get] |
| | Returns true the first time the player "uses" the object.
|
| |
| bool | FirstLook [get] |
| | Returns true the first time the player "looked" at the object.
|
| |
| int | UseCount [get] |
| | Returns the number of times player has "used" at the object. 0 when it's the first click on the object.
|
| |
| int | LookCount [get] |
| | Returns the number of times player has "looked" at the object. 0 when it's the first click on the object.
|
| |
| string | Animation [get, set] |
| | The prop's animation, change this to change the visuals of the prop.
|
| |
| bool | Animating [get] |
| | Whether an animation triggered by PlayAnimation() is currently playing. Note- this does not include animations set using the Animation property.
|
| |
| UnityEngine.Video.VideoPlayer | VideoPlayer [get] |
| | Gets the prop's VideoPlayer component (if it has one). This can be used to pause/resume/stop video playback.
|
| |
| float | Alpha [get, set] |
| | Gets/Sets the transparency of the prop. (0.0f being fully transparent, 1.0f being fully opaque.)
|
| |
| Prop | Data [get] |
| | Access to the base class with extra functionality used by the PowerQuest.
|
| |
|
| void | SetPosition (float x, float y) |
| | Set the location of the prop.
|
| |
| void | SetPosition (Vector2 position) |
| | Set the location of the prop.
|
| |
| Coroutine | MoveTo (float x, float y, float speed, eEaseCurve curve=eEaseCurve.None) |
| | Move the prop over time.
|
| |
| Coroutine | MoveTo (Vector2 toPos, float speed, eEaseCurve curve=eEaseCurve.None) |
| | Move the prop over time.
|
| |
| void | MoveToBG (Vector2 toPos, float speed, eEaseCurve curve=eEaseCurve.None) |
| | Move the prop over time, non-blocking.
|
| |
| void | Show (bool clickable=true) |
| | Set's visible & clickable (Same as Enable())
|
| |
| void | Hide () |
| | Set's invisible & non-clickable (Same as Disable())
|
| |
| void | Enable (bool clickable=true) |
| | Set's visible & clickable.
|
| |
| void | Disable () |
| | Set's invisible & non-clickable.
|
| |
| Coroutine | PlayAnimation (string animName) |
| | Plays an animation on the prop, overriding whatever the current prop's 'Animation' property is set to until complete.
|
| |
| void | PlayAnimationBG (string animName) |
| | Plays an animation on the prop. Will return to playing Animation once it ends (Non-blocking)
|
| |
| void | StopAnimation () |
| | Stops an animation played from PlayAnimationBG(). The prop will return to it's default sprite or Animation.
|
| |
| void | PauseAnimation () |
| | Pauses the currently playing animation.
|
| |
| void | ResumeAnimation () |
| | Resumes the currently paused animation.
|
| |
| Coroutine | PlayVideo (float skippableAfterTime=-1) |
| | Starts video playback if the prop has a video component. Returns once the video has completed, or on mouse click if skippableAfterTime is greater than zero.
|
| |
| void | PlayVideoBG () |
| | Starts video playback if the prop has a video component.
|
| |
| void | AddAnimationTrigger (string triggerName, bool removeAfterTriggering, System.Action action) |
| | Adds a function to be called on an animation event here. Eg: to play a sound or effect on an animation tag.
|
| |
| void | RemoveAnimationTrigger (string triggerName) |
| | Removes an existing animation trigger.
|
| |
| Coroutine | WaitForAnimTrigger (string eventName) |
| | Waits until an Event/Tag in the current animation is reached.
|
| |
| Coroutine | Fade (float start, float end, float duration, eEaseCurve curve=eEaseCurve.Smooth) |
| | Fade the sprite's alpha (0.0f being fully transparent, 1.0f being fully opaque.)
|
| |
| void | FadeBG (float start, float end, float duration, eEaseCurve curve=eEaseCurve.Smooth) |
| | Fade the sprite's alpha (non-blocking). (0.0f being fully transparent, 1.0f being fully opaque.)
|
| |
| Coroutine PlayAnimation |
( |
string | animName | ) |
|
Plays an animation on the prop, overriding whatever the current prop's 'Animation' property is set to until complete.
NB: Animation play/pause/resume/stop stuff doesn't get saved. If you want to permanently change anim, set the Animation property
For example- If a door's Animation is set to "closed", play an "opening" animation, then change it's 'animation' to "open"
if ( P.Door.Animation == "closed")
{
P.Door.PlayAnimation("opening");
P.Door.Animation = "open";
}
- See also
- Animation
-
PlayAnimation
-
PlayAnimationBG
-
PauseAnimation
-
StopAnimation