Games


I’m not sure if we can call it an engine, but that’s almost the case. Actually, every “object” in the LREditor is a Phaser derived class that we call an entity, contained in the namespace LR.Entity ( LR stands for LadybugRiders )
For example, the LR.Entity.Sprite extends the Phaser.Sprite class.

Then, every entity holds a LR.GameObject instance, an entirely “home-made” class, that manages lots of things in an entity. In general, we prefer to manipulate GameObjects, and here is why – if you are familiar with Unity3D, this will be easy to understand :
A GameObject contains an array of what we call behaviours ( LR.Behaviour ), which act in the same way as Unity Components do. Here is basically the structure of an entity :

tuto_lr_struct

Each behaviour has its own update() function that you can override to code your game’s entities behaviours. We will provide you with some coding examples so that you can grasp the way we usually do things with LREditor.