Incr

Constructor

Incr <id> (<0|1>)

Action

Adds a delta to its current state on each activation. The parameter specifies wether or not the component must be activated on tree traversal, that is when its parent is activated. default delta value is 1.

Predefined children

  • DoubleProperty: state, delta.

Example


use core
use base

_main_
Component root {
  Clock cl (500)
  Incr inc (1)

  cl.tick -> inc
  TextPrinter log
  inc.state => log.input
}