Method: data

Gets / sets a key / value pair in the object's data object. Useful for storing arbitrary game data in the object.
data (String key, * value)
  • Stringkey The key under which the data resides.
  • *value The data to set under the specified key.
Returns *

Set some arbitrary data key value pair

var entity = new IgeEntity();
entity.data('playerScore', 100);
entity.data('playerName', 'iRock');

Get the value of a data key

© Copyright 2013 Irrelon Software Limited. All Rights Reserved. UK Registered Company Number: 07522767
Isogenic (ī´sōjen´ik): Adj originating from a common source; possessing the same genetic composition.
Strange Things Happen at the One Two Point