Hi,
I would like to put in one place all my imported modules so that when I create a new class player.js I automatically import all these modules. The goal is that if I add an import I only have to specify it once…there should be some kind of link to these imported modules.
import {
can_init,
can_add_element,
can_add_ghost,
can_add_physic,
can_animate_instances,
can_animate_physic,
can_check_collisions,
can_hide_eye,
can_move,
can_move_lateral,
can_ressurect,
can_wake_up,
create_box_with_rounded_edges,
} from '../classes/can_action.js'
example, if i add a another module “can_start”:
I don’t have to add it in player.js and enemy.js since if I manage to have a link to these imported modules, I have to do it only once and not for each class.
import {
can_init,
can_add_element,
can_add_ghost,
can_add_physic,
can_animate_instances,
can_animate_physic,
can_check_collisions,
can_hide_eye,
can_move,
can_move_lateral,
can_ressurect,
can_wake_up,
create_box_with_rounded_edges,
can_start,
} from '../classes/can_action.js'
Is it possible simply ?