import{_ as a,c as r,a0 as t,o}from"./chunks/framework.P9qPzDnn.js";const f=JSON.parse('{"title":"Interface: Action","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/features/clickables/action/interfaces/Action.md","filePath":"api/features/clickables/action/interfaces/Action.md","lastUpdated":null}'),i={name:"api/features/clickables/action/interfaces/Action.md"};function n(c,e,s,l,d,h){return o(),r("div",null,e[0]||(e[0]=[t('
Profectus / features/clickables/action / Action
An object that represents a feature that can be clicked upon, and then has a cooldown before it can be clicked again.
[VueFeature]:
true
Used to identify Vue Features
autoStart:
MaybeRef
<boolean
>
Whether or not the action should perform automatically when the cooldown is finished.
profectus/src/features/clickables/action.tsx:37
canClick:
MaybeRef
<boolean
>
Whether or not the action may be performed.
profectus/src/features/clickables/action.tsx:39
Dictionary of CSS classes to apply to this feature.
components:
MaybeGetter
<Renderable
>[]
The components to render inside the vue feature
optional
display:MaybeGetter
<Renderable
>
The display to use for this action.
profectus/src/features/clickables/action.tsx:41
duration:
MaybeRef
<DecimalSource
>
The cooldown during which the action cannot be performed again, in seconds.
profectus/src/features/clickables/action.tsx:35
id:
string
An auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates.
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.
profectus/src/features/clickables/action.tsx:45
onClick: (
amount
) =>void
A function that is called when the action is clicked.
void
profectus/src/features/clickables/action.tsx:43
progress:
Ref
<DecimalSource
,DecimalSource
>
The current amount of progress through the cooldown.
profectus/src/features/clickables/action.tsx:47
progressBar:
Bar
The bar used to display the current cooldown progress.
profectus/src/features/clickables/action.tsx:49
optional
style:MaybeRef
<CSSProperties
>
CSS to apply to this feature.
type: typeof
ActionType
A symbol that helps identify features of the same type.
profectus/src/features/clickables/action.tsx:53
update: (
diff
) =>void
Update the cooldown the specified number of seconds
number
void
profectus/src/features/clickables/action.tsx:51
optional
visibility:MaybeRef
<boolean | Visibility>
Whether this feature should be visible.
wrappers:
Wrapper
[]
The components to render wrapped around the vue feature