C# Class AlbLib.SaveGame.Backpack

Inheritance: Inventory
Show file Open project: IllidanS4/AlbLib Class Usage Examples

Public Methods

Method Description
Backpack ( ) : System

Creates empty inventory.

Backpack ( byte data, int offset ) : System

Loads inventory from byte array.

Clear ( ) : void

Removes all items from inventory.

GetEnumerator ( ) : IEnumerator

Enumerates through all items in inventory.

ToRawData ( ) : byte[]

Converts items to byte array.

this ( int index ) : SaveGame.ItemStack

Accesses item using item index.

this ( int x, int y ) : SaveGame.ItemStack

Accesses item using x and y displayed position.

Method Details

Backpack() public method

Creates empty inventory.
public Backpack ( ) : System
return System

Backpack() public method

Loads inventory from byte array.
public Backpack ( byte data, int offset ) : System
data byte /// Byte array containing inventory items. ///
offset int /// Position of inventory. ///
return System

Clear() public method

Removes all items from inventory.
public Clear ( ) : void
return void

GetEnumerator() public method

Enumerates through all items in inventory.
public GetEnumerator ( ) : IEnumerator
return IEnumerator

ToRawData() public method

Converts items to byte array.
public ToRawData ( ) : byte[]
return byte[]

this() public method

Accesses item using item index.
public this ( int index ) : SaveGame.ItemStack
index int /// Item index in range from 0 to 23. ///
return SaveGame.ItemStack

this() public method

Accesses item using x and y displayed position.
public this ( int x, int y ) : SaveGame.ItemStack
x int /// Item X position between 0 and 3. ///
y int /// Item Y position between 0 and 5. ///
return SaveGame.ItemStack