| ResourceWindow.as | |
| Variables | |
| LEFT | |
| RIGHT | |
| NONE | |
| m_WeaponInventory | |
| m_RightResource | |
| m_LeftResource | |
| m_Character | |
| m_CharacterId | |
| m_LeftPos | |
| m_RightPos | |
| m_MaxCounter | |
| m_MinCounter | |
| m_Resources | |
| m_Scale | |
| m_IsPlayerCharacter | |
| Functions | |
| Init | called from the onload method. |
| SetCharacter | static mapping of all resources |
| GetResource | map the weapon type to the correct weapon |
| SetResourcesVisibility | |
| AddResource | |
| Layout | updates the resources on stage with their counters |
| ClearResource | removes the resource indicator from stage without modifying the resource object |
| SlotResourceUpdated | param resourceType:Number The resource type (1-9). |
| IsResourceVisible | checks to see if there is a resource indicator on stage for this resource allready |
| SlotWeaponRemoved | param inventoryID:com.Utils.ID32 [] identity of the inventory sending the signal |
| SlotWeaponAdded | This will be called both when you get an item and if an item is moved from a different inventory to this. |
| SlotWeaponChanged | |
| IsSelfWeaponResource |
function GetResource( weaponType: Number ) : Number
map the weapon type to the correct weapon
| weaponType | :Number, the m_Type property of the inventoryItem contained in the equipped inventory |
Number - the resource mapped to this weapon or 0 on erroe, the 0 will be catched later if this error occur
function SlotWeaponAdded( inventoryID: com.Utils.ID32, itemPos: Number )
This will be called both when you get an item and if an item is moved from a different inventory to this.
| inventoryID | :com.Utils.ID32 [] identity of the inventory sending the signal |
| itemPos | [in] The position for this new item. |
var LEFT: String
var RIGHT: String
var NONE: String
var m_WeaponInventory: Inventory
var m_RightResource: Object
var m_LeftResource: Object
var m_Character: Character
var m_CharacterId: ID32
var m_LeftPos: Number
var m_RightPos: Number
var m_MaxCounter: Number
var m_MinCounter: Number
var m_Resources: Array
var m_Scale: Number
var m_IsPlayerCharacter: Boolean
called from the onload method.
function Init()
static mapping of all resources
function SetCharacter( character: Character ) : Void
map the weapon type to the correct weapon
function GetResource( weaponType: Number ) : Number
function SetResourcesVisibility( isCharacterPresent: Boolean ) : Void
function AddResource( resource: Number, direction: String )
updates the resources on stage with their counters
function Layout()
removes the resource indicator from stage without modifying the resource object
function ClearResource( resourceSide: String ) : Void
param resourceType:Number The resource type (1-9).
function SlotResourceUpdated( resourceType: Number, resourceAmount: Number, targetID: ID32 )
checks to see if there is a resource indicator on stage for this resource allready
function IsResourceVisible( resource: Number ) : Boolean
param inventoryID:com.Utils.ID32 [] identity of the inventory sending the signal
function SlotWeaponRemoved( inventoryID: com.Utils.ID32, itemPos: Number, moved: Boolean )
This will be called both when you get an item and if an item is moved from a different inventory to this.
function SlotWeaponAdded( inventoryID: com.Utils.ID32, itemPos: Number )
function SlotWeaponChanged( inventoryID: com.Utils.ID32, itemPos: Number )
function IsSelfWeaponResource( resource: Number )