mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-01 07:24:30 +08:00
feat: 传送门渲染
This commit is contained in:
1 parent
d0ff2f1dc5
commit
292e17ed53
6 files changed
+318
-36
No files matched your search
+17
-17
@@ -39,24 +39,24 @@ let ctx: CanvasRenderingContext2D;
|
||||
let particleSetting: MotaSettingItem;
|
||||
|
||||
let lastTime = 0;
|
||||
Mota.require('var', 'loading').once('coreInit', () => {
|
||||
canvas = MotaCanvas2D.for('@portal');
|
||||
ctx = canvas.ctx;
|
||||
canvas.mount();
|
||||
canvas.css(`z-index: 51`);
|
||||
canvas.withGameScale(true);
|
||||
canvas.pos(0, 0);
|
||||
canvas.size(480, 480);
|
||||
canvas.on('resize', () => {
|
||||
canvas.css(`z-index: 51`);
|
||||
});
|
||||
particleSetting = mainSetting.getSetting('fx.portalParticle')!;
|
||||
ticker.add(tickPortal);
|
||||
});
|
||||
// Mota.require('var', 'loading').once('coreInit', () => {
|
||||
// canvas = MotaCanvas2D.for('@portal');
|
||||
// ctx = canvas.ctx;
|
||||
// canvas.mount();
|
||||
// canvas.css(`z-index: 51`);
|
||||
// canvas.withGameScale(true);
|
||||
// canvas.pos(0, 0);
|
||||
// canvas.size(480, 480);
|
||||
// canvas.on('resize', () => {
|
||||
// canvas.css(`z-index: 51`);
|
||||
// });
|
||||
// particleSetting = mainSetting.getSetting('fx.portalParticle')!;
|
||||
// ticker.add(tickPortal);
|
||||
// });
|
||||
|
||||
Mota.require('var', 'hook').on('changingFloor', id => {
|
||||
drawPortals(id);
|
||||
});
|
||||
// Mota.require('var', 'hook').on('changingFloor', id => {
|
||||
// drawPortals(id);
|
||||
// });
|
||||
|
||||
let needDraw = false;
|
||||
function tickPortal(time: number) {
|
||||
|
||||
Reference in new issue
Block a user