Commit 64d62ee0 authored by haiyoucuv's avatar haiyoucuv

分数气泡

parent 5b3029e5
......@@ -2,7 +2,7 @@ import { Element } from "@/pages/GamePage/Components/Element/Element.ts";
import { Ele } from "@/pages/GamePage/config/Config.ts";
import { collisionSys } from "@/pages/GamePage/GamePage.tsx";
import { SATVector } from "detect-collisions";
import { Assets, DEG_TO_RAD, Sprite } from "pixi.js";
import { Assets, DEG_TO_RAD, PointData, Sprite } from "pixi.js";
import { Tween } from "@/pages/GamePage/tween";
/**
......@@ -22,8 +22,8 @@ export class Mugwort extends Element {
Tween.get(this.dgTip, {
loop: true,
}).to({ alpha: 0.2 }, 666)
.to({ alpha: 1 }, 666);
}).to({ alpha: 0.2 }, 444)
.to({ alpha: 1 }, 444);
}
......
......@@ -22,8 +22,8 @@ export class Realgar extends Element {
Tween.get(this.dgTip, {
loop: true,
}).to({ alpha: 0.2 }, 666)
.to({ alpha: 1 }, 666);
}).to({ alpha: 0.2 }, 444)
.to({ alpha: 1 }, 444);
}
......
......@@ -18,7 +18,7 @@ import { System } from 'detect-collisions';
import gameStore from "@/store/gameStore.ts";
export const collisionSys: System = new System();
const DEBUG = true;
const DEBUG = true ;
export function getApp(): Application {
return window["__app"];
......@@ -47,9 +47,12 @@ class GamePage extends React.Component {
this.initEvent();
this.debugCtx = this.debugCanvas.getContext("2d");
this.debugCanvas.width = winSize.width;
this.debugCanvas.height = winSize.height;
if (DEBUG) {
this.debugCtx = this.debugCanvas.getContext("2d");
this.debugCanvas.width = winSize.width;
this.debugCanvas.height = winSize.height;
}
await this.initStage();
}
......@@ -60,6 +63,7 @@ class GamePage extends React.Component {
this.app?.destroy();
window["__app"] = null;
collisionSys.clear();
Tween.removeAllTweens();
}
async initStage() {
......
......@@ -32,19 +32,19 @@ export const EleConfig: { [key in Ele]: EleData } = {
[Ele.Yeast]: {
cls: Yeast,
texture: "元素/酵母菌.png",
weight: 3,
weight: 4,
score: 1,
},
[Ele.Filiform]: {
cls: Filiform,
texture: "元素/丝状菌.png",
weight: 2,
weight: 3,
score: 2,
},
[Ele.Molecule]: {
cls: Molecule,
texture: "元素/黄色分子.png",
weight: 1,
weight: 2,
score: 3,
},
[Ele.Mugwort]: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment