- 最后登录
- 2024-6-3
- 注册时间
- 2009-10-16
- 阅读权限
- 100
- 积分
- 18803
  
- 纳金币
- 17488
- 精华
- 1
|
Increment Once (Animation Behavior)
Summary
Increments the value of any property on the parent object by a set amount each time the 'Increment' action is called.
Category
Latest Behaviors
Author
Gavin Kistner
Difficulty
(Reference)
Time to Complete
5 Minutes
Downloads
Click Here
to download the associated files.
(This document covers version 2.0.2 of the 'Increment Once' behavior, current as of 2005-Feb-11)
Description
The
Property Name
is specified relative to the behavior’s parent. For example, ‘rotation.x’ refers to the x value of the ‘rotation’ property on the object to which the behavior is attached.
The
Revert?
option causes the property to decrement by the Increment Amount once the ‘opposite’ event occurs. For example, if the
Increment
action is invoked as the result of an ‘onMouseDown’ event on someObject, the
Decrement
action will automatically be set to***n ‘onMouseUp’ for the same object. The following event pairs are recognized:
onMouseOver <-> onMouseOut
onGroupedMouseOver <-> onGroupedMouseOut
onMouseDown <-> onMouseUp
onAttach <-> onDetach
onMiddleMouseDown <-> onMiddleMouseUp
onKeyDown <-> onKeyUp
onMouseClick <-> onMouseClick
onMouseDblClick <-> onMouseDblClick
Events which are their own opposite (e.g. onMouseClick) will reverse the next time the event occurs. Events which have no opposite (e.g. onLoadError) will ignore the
Revert?
option.
If
Use Max?
is checked, the property will not go above the specified Max Value. If
Use Loop?
is checked in addition to
Use Max?
, the property will wrap back to the
Loop Value
if it exceeds
Max Value
.
Basic Properties
Property Name
Code reference to the property to change.
Increment Amount
Amount to increment by each time the 'Increment' action is called.
Revert?
Revert changes when opposite event occurs?
Go on mouse down?
Increment whenever the mouse is pressed on the parent?
Advanced Properties
Use Max?
Should the Incrementor stop/loop when the 'Max Value' is reached?
Max Value
If 'Use Max?' is checked, the value to stop/loop at.
Use Loop?
Should the Incrementor reset to the 'Loop Value' when the 'Max Value' is reached?
Loop Value
If 'Use Max?' and 'Use Loop?' are checked, the value to loop to whenever the 'Max Value' is hit.
Actions
Increment
Increment the property by the Increment Amount (one time only).
Decrement
Decrement the property by the Increment Amount (one time only).
Demonstration
![]()
View Demonstration Project
![]()
Download Project File
|
|