Skip to content
This repository has been archived by the owner on Apr 15, 2022. It is now read-only.

Create an Entity

Derek Detweiler edited this page Aug 16, 2017 · 3 revisions

To create an Entity, we create a JSON file and add it to the "src/config/platypus/entities" folder. Once we have this in place we can start editing the entity JSON file. Here we add the components that we want to make up the entity. Here is an example of an entity JSON file with two component definitions:

{
    "id": "pickaxe",
    "components": [{
        "type": "CollisionBasic", 
        "collisionType": "pickaxe"
    },{
        "type": "LogicDestroyMe"
    }]
}

The types are the ids of the components from the Platypus configuration. The other fields are passed in as the definition into the constructor of the components.

Clone this wiki locally