public void onEnterWorld(KBEngine.Entity entity)
{
if(entity.isPlayer())
return;
float y = entity.position.y;
if(entity.isOnGround)
y = 1.3f;
entity.renderObj = Instantiate(entityPerfab, new Vector3(entity.position.x, y, entity.position.z),
Quaternion.Euler(new Vector3(entity.direction.y, entity.direction.z, entity.direction.x))) as UnityEngine.GameObject;
((UnityEngine.GameObject)entity.renderObj).name = entity.className + "_" + entity.id;
}