Profectus / features/clickables/action / Action
Interface: Action ​
An object that represents a feature that can be clicked upon, and then has a cooldown before it can be clicked again.
Extends ​
Properties ​
[VueFeature] ​
[VueFeature]:
true
Used to identify Vue Features
Inherited from ​
Defined in ​
autoStart ​
autoStart:
MaybeRef
<boolean
>
Whether or not the action should perform automatically when the cooldown is finished.
Defined in ​
profectus/src/features/clickables/action.tsx:37
canClick ​
canClick:
MaybeRef
<boolean
>
Whether or not the action may be performed.
Defined in ​
profectus/src/features/clickables/action.tsx:39
classes? ​
Dictionary of CSS classes to apply to this feature.
Inherited from ​
Defined in ​
components ​
components:
MaybeGetter
<Renderable
>[]
The components to render inside the vue feature
Inherited from ​
Defined in ​
display? ​
optional
display:MaybeGetter
<Renderable
>
The display to use for this action.
Defined in ​
profectus/src/features/clickables/action.tsx:41
duration ​
duration:
MaybeRef
<DecimalSource
>
The cooldown during which the action cannot be performed again, in seconds.
Defined in ​
profectus/src/features/clickables/action.tsx:35
id ​
id:
string
An auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates.
Inherited from ​
Defined in ​
isHolding ​
isHolding:
Ref
<boolean
,boolean
>
Whether or not the player is holding down the action. Actions will be considered clicked as soon as the cooldown completes when being held down.
Defined in ​
profectus/src/features/clickables/action.tsx:45
onClick() ​
onClick: (
amount
) =>void
A function that is called when the action is clicked.
Parameters ​
amount ​
Returns ​
void
Defined in ​
profectus/src/features/clickables/action.tsx:43
progress ​
progress:
Ref
<DecimalSource
,DecimalSource
>
The current amount of progress through the cooldown.
Defined in ​
profectus/src/features/clickables/action.tsx:47
progressBar ​
progressBar:
Bar
The bar used to display the current cooldown progress.
Defined in ​
profectus/src/features/clickables/action.tsx:49
style? ​
optional
style:MaybeRef
<CSSProperties
>
CSS to apply to this feature.
Inherited from ​
Defined in ​
type ​
type: typeof
ActionType
A symbol that helps identify features of the same type.
Defined in ​
profectus/src/features/clickables/action.tsx:53
update() ​
update: (
diff
) =>void
Update the cooldown the specified number of seconds
Parameters ​
diff ​
number
Returns ​
void
Defined in ​
profectus/src/features/clickables/action.tsx:51
visibility? ​
optional
visibility:MaybeRef
<boolean | Visibility>
Whether this feature should be visible.
Inherited from ​
Defined in ​
wrappers ​
wrappers:
Wrapper
[]
The components to render wrapped around the vue feature