User Tools

Site Tools


api:taxation_function

TAXATION_FUNCTION

Properties


MinimalTimeBetweenVisits

Serialized


Texture

Serialized

  • Type: TEXTURE
  • Expected: asset ID
  • Default value: nil

NameKey

Serialized

  • Type: string
  • Expected: string value

TaxedNameKey

Serialized

  • Type: string
  • Expected: string value

DescriptionKey

Serialized

  • Type: string
  • Expected: string value

CategoryKey

Serialized

  • Type: string
  • Expected: string value

IsActiveByDefault

Serialized

  • Type: boolean
  • Expected: boolean value
  • Default value: false

IsOtherTax

Serialized

  • Type: boolean
  • Expected: boolean value
  • Default value: true

Functions


init

Virtual function

void init(instTaxationFunction)

Name Type Description
instTaxationFunction InstTaxationFunction

finalize

Virtual function

void finalize(instTaxationFunction)

Function called when taxation function is removed. You can cleanup components added during init (except TaxCollectables, those will be managed by the system).

Name Type Description
instTaxationFunction InstTaxationFunction

collect

Virtual function

InstTaxationTransactionCollectInfo collect(compTaxCollectable)

Function called every frame to compute how much to cumulate.

Name Type Description
compTaxCollectable CompTaxCollectable

getMaximumAmountToCollect

Virtual function

integer getMaximumAmountToCollect(compTaxCollectable)

Name Type Description
compTaxCollectable CompTaxCollectable

getMinimalTimeBetweenVisits

Virtual function

float getMinimalTimeBetweenVisits()


getTaxedCount

Virtual function

integer getTaxedCount(instTaxationFunction)

Name Type Description
instTaxationFunction InstTaxationFunction
api/taxation_function.txt · Last modified: 2023/05/23 13:31 (external edit)