UnitAction

data class UnitAction(type: UnitActionType, title: String, isCurrentAction: Boolean, uncivSound: UncivSound, action: () -> Unit?)

Unit Actions - class - carries dynamic data and actual execution. Static properties are in UnitActionType. Note this is for the buttons offering actions, not the ongoing action stored with a MapUnit

Constructors

UnitAction
Link copied to clipboard
fun UnitAction(type: UnitActionType, title: String = type.value, isCurrentAction: Boolean = false, uncivSound: UncivSound = type.uncivSound, action: () -> Unit? = null)

Types

Companion
Link copied to clipboard
object Companion

Functions

component1
Link copied to clipboard
operator fun component1(): UnitActionType
component2
Link copied to clipboard
operator fun component2(): String
component3
Link copied to clipboard
operator fun component3(): Boolean
component4
Link copied to clipboard
operator fun component4(): UncivSound
component5
Link copied to clipboard
operator fun component5(): () -> Unit?
copy
Link copied to clipboard
fun copy(type: UnitActionType, title: String = type.value, isCurrentAction: Boolean = false, uncivSound: UncivSound = type.uncivSound, action: () -> Unit? = null): UnitAction
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
getIcon
Link copied to clipboard
fun getIcon(): Actor
hashCode
Link copied to clipboard
open override fun hashCode(): Int
toString
Link copied to clipboard
open override fun toString(): String

Properties

action
Link copied to clipboard
val action: () -> Unit? = null
isCurrentAction
Link copied to clipboard
val isCurrentAction: Boolean = false
title
Link copied to clipboard
val title: String
type
Link copied to clipboard
val type: UnitActionType
uncivSound
Link copied to clipboard
val uncivSound: UncivSound

Sources

jvm source
Link copied to clipboard