diff --git a/src/core/index.ts b/src/core/index.ts index e63d081..5d7f596 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -13,7 +13,7 @@ import { } from './main/setting'; import { KeyCode, ScanCode } from '@/plugin/keyCodes'; import { status } from '@/plugin/ui/statusBar'; -import './plugin'; +import '@/plugin'; import './package'; import { AudioPlayer } from './audio/audio'; import { CustomToolbar } from './main/custom/toolbar'; diff --git a/src/core/plugin.ts b/src/core/plugin.ts deleted file mode 100644 index 75b09f8..0000000 --- a/src/core/plugin.ts +++ /dev/null @@ -1,40 +0,0 @@ -// import pop from '@/plugin/pop'; -// import use from '@/plugin/use'; -// import animate from '@/plugin/animateController'; -// import utils from '@/plugin/utils'; -// import status from '@/plugin/ui/statusBar'; -// import fly from '@/plugin/ui/fly'; -// import chase from '@/plugin/chase/chase'; -// import webglUtils from '@/plugin/webgl/utils'; -// import shadow from '@/plugin/shadow/shadow'; -// import gameShadow from '@/plugin/shadow/gameShadow'; -// import achievement from '@/plugin/ui/achievement'; -// import completion, { floors } from '@/plugin/completion'; -// import path from '@/plugin/fx/path'; -// import gameCanvas from '@/plugin/fx/gameCanvas'; -// import noise from '@/plugin/fx/noise'; -// import smooth from '@/plugin/fx/smoothView'; -// import frag from '@/plugin/fx/frag'; -// import { Mota } from '.'; - -import * as fly from '@/plugin/ui/fly'; -import * as chase from '@/plugin/chase/chase'; -import * as completion from '@/plugin/completion'; -import * as pop from '@/plugin/pop'; -import * as frag from '@/plugin/fx/frag'; -import * as use from '@/plugin/use'; -import * as gameCanvas from '@/plugin/fx/gameCanvas'; -import * as animateController from '@/plugin/animateController'; - -Mota.Plugin.register('fly_r', fly); -Mota.Plugin.register('chase_r', chase); -Mota.Plugin.register('completion_r', completion, completion.init); -Mota.Plugin.register('pop_r', pop, pop.init); -Mota.Plugin.register('frag_r', frag, frag.init); -Mota.Plugin.register('use_r', use); -Mota.Plugin.register('gameCanvas_r', gameCanvas); -Mota.Plugin.register( - 'animateController_r', - animateController, - animateController.default -); diff --git a/src/plugin/index.ts b/src/plugin/index.ts new file mode 100644 index 0000000..0c5c320 --- /dev/null +++ b/src/plugin/index.ts @@ -0,0 +1,21 @@ +import * as fly from './ui/fly'; +import * as chase from './chase/chase'; +import * as completion from './completion'; +import * as pop from './pop'; +import * as frag from './fx/frag'; +import * as use from './use'; +import * as gameCanvas from './fx/gameCanvas'; +import * as animateController from './animateController'; + +Mota.Plugin.register('fly_r', fly); +Mota.Plugin.register('chase_r', chase); +Mota.Plugin.register('completion_r', completion, completion.init); +Mota.Plugin.register('pop_r', pop, pop.init); +Mota.Plugin.register('frag_r', frag, frag.init); +Mota.Plugin.register('use_r', use); +Mota.Plugin.register('gameCanvas_r', gameCanvas); +Mota.Plugin.register( + 'animateController_r', + animateController, + animateController.default +);