Skip to content

FormulaGraph ​

Inherits: Control

A small line graph of a formula: stat points (or levels) along the bottom, the value it gives up the side. Drawn from samples (FormulaPipeline.sample), so it shows the real result of the formula, the diminishing returns and the max result together. See docs/systems/entity-stats.md, section 24.4.

Variables ​

PackedVector2ArraysamplesPackedVector2Array()
Stringx_label"points"

Methods ​

voidshow_samples( new_samples: PackedVector2Array, new_x_label: String = "points" )

Constants ​

  • float GRAPH_HEIGHT = 140.0
  • float MARGIN_LEFT = 46.0
  • float MARGIN_BOTTOM = 20.0
  • float MARGIN_TOP = 8.0
  • float MARGIN_RIGHT = 10.0

Variable descriptions ​

PackedVector2Array samples = PackedVector2Array() ​

No description yet.

String x_label = "points" ​

No description yet.

Method descriptions ​

void show_samples( new_samples: PackedVector2Array, new_x_label: String = "points" ) ​

Shows these samples (x = points or level, y = the value)