[gs-longan](../README.md) / StatePack

# Class: StatePack

## Table of contents

### Constructors

- [constructor](StatePack.md#constructor)

### Properties

- [afterRoll](StatePack.md#afterroll)

### Accessors

- [currentRollType](StatePack.md#currentrolltype)
- [name](StatePack.md#name)
- [stateItemList](StatePack.md#stateitemlist)
- [tag](StatePack.md#tag)

### Methods

- [add](StatePack.md#add)
- [clear](StatePack.md#clear)
- [indexOf](StatePack.md#indexof)
- [insert](StatePack.md#insert)
- [merage](StatePack.md#merage)
- [remove](StatePack.md#remove)
- [removeItemByType](StatePack.md#removeitembytype)
- [roll](StatePack.md#roll)
- [createByStateItem](StatePack.md#createbystateitem)

## Constructors

### constructor

• **new StatePack**(`name?`): [`StatePack`](StatePack.md)

#### Parameters

| Name | Type |
| :------ | :------ |
| `name?` | `string` |

#### Returns

[`StatePack`](StatePack.md)

## Properties

### afterRoll

• **afterRoll**: [`List`](List.md)\<(`process`: [`Process`](Process.md), `args`: `StatePackEventArgs`) => `void`\>

## Accessors

### currentRollType

• `get` **currentRollType**(): [`RollType`](../enums/RollType.md)

#### Returns

[`RollType`](../enums/RollType.md)

___

### name

• `get` **name**(): `string`

#### Returns

`string`

• `set` **name**(`value`): `void`

#### Parameters

| Name | Type |
| :------ | :------ |
| `value` | `string` |

#### Returns

`void`

___

### stateItemList

• `get` **stateItemList**(): [`List`](List.md)\<[`StateItem`](StateItem.md)\>

#### Returns

[`List`](List.md)\<[`StateItem`](StateItem.md)\>

___

### tag

• `get` **tag**(): `any`

#### Returns

`any`

• `set` **tag**(`value`): `void`

#### Parameters

| Name | Type |
| :------ | :------ |
| `value` | `any` |

#### Returns

`void`

## Methods

### add

▸ **add**(`item`): `void`

#### Parameters

| Name | Type |
| :------ | :------ |
| `item` | [`StateItem`](StateItem.md) |

#### Returns

`void`

___

### clear

▸ **clear**(): `void`

#### Returns

`void`

___

### indexOf

▸ **indexOf**(`item`): `number`

#### Parameters

| Name | Type |
| :------ | :------ |
| `item` | [`StateItem`](StateItem.md) |

#### Returns

`number`

___

### insert

▸ **insert**(`index`, `item`): `void`

#### Parameters

| Name | Type |
| :------ | :------ |
| `index` | `number` |
| `item` | [`StateItem`](StateItem.md) |

#### Returns

`void`

___

### merage

▸ **merage**(`pack`): `void`

#### Parameters

| Name | Type |
| :------ | :------ |
| `pack` | [`StatePack`](StatePack.md) |

#### Returns

`void`

___

### remove

▸ **remove**(`item`): `void`

#### Parameters

| Name | Type |
| :------ | :------ |
| `item` | [`StateItem`](StateItem.md) |

#### Returns

`void`

___

### removeItemByType

▸ **removeItemByType**(`type`): `void`

#### Parameters

| Name | Type |
| :------ | :------ |
| `type` | `any` |

#### Returns

`void`

___

### roll

▸ **roll**(`process`, `type`): `void`

#### Parameters

| Name | Type |
| :------ | :------ |
| `process` | [`Process`](Process.md) |
| `type` | [`RollType`](../enums/RollType.md) |

#### Returns

`void`

___

### createByStateItem

▸ **createByStateItem**(`item`): [`StatePack`](StatePack.md)

#### Parameters

| Name | Type |
| :------ | :------ |
| `item` | [`StateItem`](StateItem.md) |

#### Returns

[`StatePack`](StatePack.md)
