BaseObject class
This is the base class for all objects and includes sprites, models, actors, planes
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- ray ↔ Raycaster
-
getter/setter pair
- touchtriggerwait ↔ double
-
getter/setter pair
Static Methods
-
addTimer(
dynamic obj, dynamic timer) → dynamic -
Add a
timertoobject- record so can remove all timers if necessary -
clearAll(
dynamic obj) → dynamic -
Clear everything for
objincluding timers, randomwalk, moving, text, chatter, speech, lerping -
clearTimers(
dynamic obj) → dynamic -
Stop all of
objtimers and clear them all -
deselectHighLight(
dynamic obj) → dynamic -
set
objto be unselected and has smaller select outline -
deselectHighLights(
) → dynamic - deselect all high lighted objects
-
disableDistanceTrigger(
dynamic object) → dynamic -
Delete the distance trigger for the
object -
disableTouchTrigger(
dynamic object) → dynamic -
Delete the touch trigger for the
object -
getTimers(
dynamic obj) → dynamic -
Get all of
objtimers -
hasCustomTrigger(
dynamic object, dynamic name) → dynamic -
Does the
objecthave a custom trigger ofname -
highlight(
dynamic obj, dynamic on, {dynamic scale, dynamic opacity}) → dynamic -
Turn the highlight of
objon or off. Can increase the size of the highlight withscaleCan change theopacityof the highlight -
reenableDistanceTrigger(
dynamic object) → dynamic -
removeCustomTrigger(
dynamic object, dynamic name) → dynamic -
Remove the
objectcustom trigger ofname -
setCustomTrigger(
dynamic object) → dynamic -
Create your own trigger for
objecteg npc attacked -
setDistanceTrigger(
dynamic object, {dynamic dist, dynamic ndist, dynamic edist, dynamic wdist, dynamic sdist, }) → dynamic -
Set a distance trigger of
object. If camera goes within the square specified bydistor the rectangle specified byndist,sdist,edistandwdistthen sets off trigger. If camera was also in the trigger distance and moves out also triggersignoreifhiddenmeans even if theobjectis invisible the trigger still operates -
setHighlight(
dynamic obj, dynamic parent, dynamic color, dynamic opacity, {dynamic scale = 1.05, dynamic scalex, dynamic scaley, dynamic scalez, dynamic deselectopacity, dynamic deselectscale}) → dynamic -
Given an
obja select highlight and add to the sceneparentwithcolor,opacityCan set thescaleof hightlight and override in different axis withscalex,scaleyandscalezCan change the opacity when deselected withdeselectopacityCan change the scale when deselected withdeselectscale -
setHighLightOpacity(
dynamic obj, dynamic opacity) → dynamic -
Set the
opacityofobjhighlight -
setHighLightScale(
Object3D obj, {dynamic scale = 1.05, dynamic scalex, dynamic scaley, dynamic scalez}) → dynamic -
Set the
scaleof anobjhighlight Overridescalewithscalex,scaleyandscalezif want to scale highlight in different axis -
setTouchTrigger(
dynamic object) → dynamic -
Set an
objectto have a trigger when the object is touched -
setVisible(
dynamic object, dynamic visible, {dynamic delay}) → dynamic -
Make
objectvisibleindelayseconds -
touchup(
dynamic pointerdowntick, dynamic event, dynamic parent, dynamic width, dynamic height, dynamic numpoints) → dynamic -
For the objects touched any then trigger the touchtrigger if they have one
pointerdowntickis when the mouse was clicked so that dont trigger all the timeeventis the mouse positionparentis the scene that check for intersections ofwidthandheightis the width and height of screennumpointsis how many spots will check for interections - this is useful if low frame rate and isn't finding touched objects - try more often if low framerate -
update(
dynamic frameTime) → dynamic - Check if should trigger distance triggers