Aspects
Aspects define the entity's interactions in the game. They often work as a pair, with an active aspect and a passive aspect (e.g. Damager/Damageable, Slower/Slowable).
Custom aspect
Aspects are just regular components that inherit from the GameEntityAspect
class.
using EODE.Wonderland;
[AddComponentMenu("")]
public class MyAspect : GameEntityAspect {}
Editor decorations
using EODE.Wonderland;
[AddComponentMenu("")]
public class MyAspect : GameEntityAspect {
public override string IconPath => "GameEntity_MyAspectIcon";
public override string EditorTitle => "My Aspect";
public override string EditorDescription => "My description"; // appears in (see sensor image at bottom of this page)
}
You can change EditorTitle and EditorDescription dynamically
Helpers
myAspect.GameEntity = myAspect.getComponent<GameEntity>();
myAspect.Owner = myAspect.getComponent<GameEntity>().Owner;
Included Aspects
GameEntitySensor
Based on physic (2D or 3D or Both) it can create a list of other GameEntities in and trigger events. It works with and without trigger.
Radar + RadarTarget
This aspects are included. Radar
aspect can detect RadarTarget
s. It works with all combinaisons (Collider + Collider2D, Distance + Collider, Collider + point...), using Layers
and Tags
. It is very powerfull and easy to use but less efficient than Physics engine.