本节是关于 CGA 特性的,涵盖了典型的结构、CGA 语法和方便的特性。形状操作概述中介绍了 CGA 操作。
将多个字符串、数字或布尔值从规则传递给其后继者。 |
|
根据条件调用不同的后继规则。 |
|
随机调用不同的后继规则。每个继任者的可能性可以通过百分比来控制。 |
|
用于在多个规则中存储值的全局变量。它们可以在规则文件或Inspector中修改。 |
|
样式是一组属性值的特定组合。您可以在Inspector中切换样式 。 |
|
封装代码,以便它可以被多个规则使用。有助于避免重复代码。 |
|
将中间值存储在局部变量中。 |
|
导入规则文件以访问其所有规则、函数和属性。 |
|
让您的同行程序员(或未来的您自己)更容易理解您的代码。 |
This section is about CGA Features and covers typical constructs, CGA syntax and handy features. CGA Operations are covered in Shape operations overview.
Pass multiple strings, numbers or boolean values from a rule to its successors. |
|
Call different successor rules based on conditions. |
|
Call different successor rules at random. The likelihood of each successor can be controlled by percentages. |
|
Global variables used to store values in multiple rules. They can be modified in the rule file or the Inspector. |
|
A style is a specific combination of values for a set of attributes. You can switch between styles in the Inspector. |
|
Encapsulate code so that it can be used by multiple rules. Helps to avoid duplicated code. |
|
Store intermediate values in local variables. |
|
Import rule files to get access to all of its rules, functions, and attributes. |
|
Make your code easier to understand for your peer programmers (or yourself in the future). |