Class: Entity

Carrot.Entity(game)

Carrot.Entity

Constructor

new Entity(game)

This class allows for creating custom stylesheets for game objects.
Parameters:
Name Type Description
game Carrot.Game The core game object.
Source:

Methods

add(name, styleopt)

Adds a new CSS rule to the class.
Parameters:
Name Type Attributes Default Description
name string The unique name of the class.
style object <optional>
null The style of the class.
Source:

add(name, key, value)

Edits an existing CSS rule of the class.
Parameters:
Name Type Description
name string The unique name of the class.
key string
value string
Source:

remove(name)

Removes an existing CSS rule from the class.
Parameters:
Name Type Description
name string The unique name of the class.
Source: