Skip to content

Latest commit

 

History

History
113 lines (70 loc) · 2.48 KB

FireComponent.md

File metadata and controls

113 lines (70 loc) · 2.48 KB

Class: FireComponent

Types

<ComponentProps>

See <ComponentProps>


<FireComponentProps>

A portion of the configuration object to pass to the FireComponent constructor.

type FireComponentPropsV1 = {
  fuelConsumptionProgress?: number | undefined;
};

type FireComponentProps = FireComponentPropsV1;

Since v1

  • fuelConsumptionProgress (optional, default 1) <number>

Constructors

new FireComponent(props)

Creates a versioned Fire component.

import { FireComponent } from 'att-string-transcoder';

const componentVersion = 1;
const component = new FireComponent({ version: componentVersion });

FireComponent.fromBinary(reader, version)

See Component.fromBinary(reader, version)

Properties

Note that the following properties are sorted in order of appearance when decoding component binary data.

hash

See Component.hash


name

See Component.name


version

See Component.version


fuelConsumptionProgress

The progress of the consumption of fuel attached to this component's prefab.

  • Since: v1
  • <number> A number between 0 and 1 (inclusive).
import { FireComponent } from 'att-string-transcoder';

const componentVersion = 1;
const component = new FireComponent({ version: componentVersion });

const fuelConsumptionProgress = component.fuelConsumptionProgress;
// `fuelConsumptionProgress` is `1`

Methods

toBinary(version?)

See Component.toBinary(version?)


write(writer, version?)

See Component.write(writer, version?)