Options
All
  • Public
  • Public/Protected
  • All
Menu

Base class for all flow nodes

Type parameters

Hierarchy

Index

Constructors

constructor

  • new BaseFlowNode<PropertiesType, TemplateType>(args: ArticyCreatorArguments<PropertiesType, TemplateType>): BaseFlowNode<PropertiesType, TemplateType>

Properties

Readonly db

Database owner

Readonly id

id: string

Articy ID (ex. 0x000010003B)

Readonly properties

properties: Readonly<PropertiesType>

Properties loaded from JSON

Optional Readonly template

template: Readonly<TemplateType & Partial<GlobalFeatures>>

Template loaded from JSON

Readonly type

type: string

Type this object was loaded as (ex. DialogueFragment or MyCustomTemplate)

Methods

as

execute

  • execute(_context: ExecuteContext): void
  • Executes scripts on the node (should do the same as next without the iteration advancement)

    Parameters

    • _context: ExecuteContext

    Returns void

getChildrenOfType

getParent

is

  • is(type: string): boolean
  • Checks if this object is the given type or derives from it

    Parameters

    • type: string

      Type to check

    Returns boolean

needsShadow

  • needsShadow(): boolean
  • Return true if this node might modify the variable state during a call to next()

    Returns boolean

next

  • Returns the next node along the given branch index

    Parameters

    • _context: ExecuteContext
    • _branchIndex: number
    • _last: null | string
    • _shadowing: boolean

    Returns [undefined | BaseFlowNode<FlowObjectProps, TemplateProps>, undefined | ConnectionProps]

    The next node along the branch (or undefined) and any Incoming/Outgoing Connection that was used to get there.

numBranches

  • numBranches(_context: ExecuteContext, _last: null | string, _shadowing: boolean): number
  • Returns the number of valid branches at this node

    Parameters

    • _context: ExecuteContext
    • _last: null | string
    • _shadowing: boolean

    Returns number

    Number of valid branches (so, not branches with failing conditions)

visits

  • visits(_context: ExecuteContext): undefined | string | string[]
  • If this returns something other than undefined, then all node Ids returned will be counted as visited at the same time as this node

    Parameters

    • _context: ExecuteContext

      Execution context

    Returns undefined | string | string[]

    Id(s) to visit

Legend

  • Constructor
  • Property
  • Method
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Property
  • Method

Generated using TypeDoc