Closed Joncom closed 3 years ago
I was passing through and saw this. This property is in fact quite useful (I've used it many times). Should not be dropped.
As far as I could tell, the value was always undefined. How were you using it?
I mean, not undefined, but an empty object...
I think the Entity class docs explain it best :
Typically, you should create your entities through the ig.Game's spawnEntity() method, which creates the entity and adds it to the game world. The settings object overwrites the properties for this one particular entity.
var settings = {health: 100, vel: {x: 200, y: 100}};
var myEnt = new EntityMyEntityClass( 0, 0, settings );
Weltmeister makes use of the settings object, to store additional settings for each entity.
https://github.com/phoboslab/Impact/blob/70f34c803acc39ff1ec2b706a5be512dc4275e0d/lib/impact/entity.js#L10-L12
Therefore, line 12 could probably be removed?