Class ccs.ComAttribute

Class Summary
Constructor Attributes Constructor Name and Description
 
The attribute component for Cocostudio.

Method Summary

Class Detail

ccs.ComAttribute()
The attribute component for Cocostudio.

Method Detail

  • <static> {ccs.ComAttribute} ccs.ComAttribute.create()
    allocates and initializes a ComAttribute.
    // example
    var com = ccs.ComAttribute.create();
    Deprecated:
    since v3.0, please use new construction instead.
    Returns:
    {ccs.ComAttribute}
  • ctor()
    Construction of ccs.ComAttribute
  • {Boolean} getBool(key)
    Returns boolean value from attribute
    Parameters:
    {String} key
    Returns:
    {Boolean}
  • {Number} getDouble(key)
    Returns double value from attribute
    Parameters:
    {String} key
    Returns:
    {Number}
  • {Number} getFloat(key)
    Returns float value from attribute
    Parameters:
    {String} key
    Returns:
    {Number}
  • {Number} getInt(key)
    Returns int value from attribute
    Parameters:
    {String} key
    Returns:
    {Number}
  • {Object} getObject(key)
    Returns object value from attribute
    Parameters:
    {String} key
    Returns:
    {Object}
  • {String} getString(key)
    Returns string value from attribute
    Parameters:
    {String} key
    Returns:
    {String}
  • {boolean} init()
    Initializes a ccs.ComAttribute
    Returns:
    {boolean}
  • parse(filename)
    Parses json file.
    Parameters:
    filename
  • setBool(key, value)
    Sets boolean attribute
    Parameters:
    {String} key
    {Boolean} value
  • setDouble(key, value)
    Sets double attribute
    Parameters:
    {String} key
    {number} value
  • setFloat(key, value)
    Sets float attribute
    Parameters:
    {String} key
    {number} value
  • setInt(key, value)
    Sets int attribute
    Parameters:
    {String} key
    {number} value
  • setObject(key, value)
    Sets object attribute
    Parameters:
    {String} key
    {Object} value
  • setString(key, value)
    Sets string attribute
    Parameters:
    {String} key
    {Boolean} value