Compare commits
4
Commits
test
...
three_wins
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
39be746cc1 | ||
|
|
2278a7ba24 | ||
|
|
1c715e9c27 | ||
|
|
efc396bee9 |
@@ -17,8 +17,11 @@ import MiniProgramBenefitsBridge from "./module/MiniProgramBenefitsBridge";
|
||||
import WucaiEntry from "./module/WucaiEntry";
|
||||
import ClientUpdate from "./module/Config/ClientUpdate";
|
||||
import DailyTaskProgressTracker from "./module/Task/DailyTaskProgressTracker";
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
import ServerEnvironment from "./module/Config/ServerEnvironment";
|
||||
import ServerSwitch from "./module/Config/ServerSwitch";
|
||||
>>>>>>> main
|
||||
import ThreeWinStreak from "./ThreeWinStreak";
|
||||
|
||||
const { ccclass, property } = cc._decorator;
|
||||
|
||||
@@ -5763,7 +5763,11 @@ export default class MapConroler extends cc.Component {
|
||||
}
|
||||
// MiniGameSdk.API.showToast("体力值减少");
|
||||
cc.fx.GameConfig.LEVEL_INFO_init(false, 0, false);
|
||||
<<<<<<< HEAD
|
||||
if (customEventData == false) this.threeWinStreak.fail();
|
||||
=======
|
||||
if (!this.gameWin) this.threeWinStreak.fail();
|
||||
>>>>>>> main
|
||||
if (cc.fx.GameConfig.GM_INFO.otherLevel == 0 && customEventData == false) {
|
||||
cc.fx.GameTool.setWinStreak("fail");
|
||||
DailyTaskProgressTracker.invalidateAttempt();
|
||||
|
||||
@@ -68,14 +68,21 @@ export default class SceneManager extends cc.Component {
|
||||
const view = cc.instantiate(this.threeWinsPrefab);
|
||||
root.addChild(view);
|
||||
view.setPosition(0, 0);
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
const mask = view.getChildByName("New Sprite(Splash)");
|
||||
mask.parent = root;
|
||||
mask.setSiblingIndex(0);
|
||||
>>>>>>> main
|
||||
const panel = this.threeWinsPanel = view.addComponent(ThreeWinsPanel);
|
||||
panel.init(this.threeWinsFont, this.threeWinsData(), {
|
||||
onProp: (prop, selected) => {
|
||||
cc.fx.AudioManager._instance.playEffect("anniu_little", null);
|
||||
if (selected && !canCarryStartBoost(cc.fx.GameConfig.GM_INFO, prop)) {
|
||||
<<<<<<< HEAD
|
||||
root.active = false;
|
||||
=======
|
||||
>>>>>>> main
|
||||
this.openPropBuy(prop);
|
||||
} else panel.setSelected(prop, selected);
|
||||
},
|
||||
@@ -83,6 +90,10 @@ export default class SceneManager extends cc.Component {
|
||||
for (const prop of ["hourglass", "rocket"] as StartBoostProp[]) {
|
||||
if (selection[prop] && !canCarryStartBoost(cc.fx.GameConfig.GM_INFO, prop)) {
|
||||
panel.setSelected(prop, false);
|
||||
<<<<<<< HEAD
|
||||
root.active = false;
|
||||
=======
|
||||
>>>>>>> main
|
||||
this.openPropBuy(prop);
|
||||
return;
|
||||
}
|
||||
@@ -1916,9 +1927,12 @@ export default class SceneManager extends cc.Component {
|
||||
});
|
||||
prop.getChildByName("buy_Btn").active = name !== "hourglass" && name !== "rocket";
|
||||
this.propBuyButton(prop).getComponent("btnControl").setTouch(true);
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
const overOpening = this.threeWinsRoot && this.threeWinsRoot.active;
|
||||
propRoot.parent = overOpening ? this.node : gameRoot;
|
||||
propRoot.zIndex = overOpening ? this.threeWinsRoot.zIndex + 1 : 1000;
|
||||
>>>>>>> main
|
||||
propRoot.active = true;
|
||||
prop.scale = 0.3;
|
||||
cc.tween(prop)
|
||||
|
||||
@@ -6,7 +6,11 @@ import { StartBoostLoadout, StartBoostProp, startBoostRewards } from "./StartBoo
|
||||
const ENTRY_SECONDS = 0.65;
|
||||
const ENTRY_HOLD_SECONDS = 0.3;
|
||||
const LAUNCH_CLOUD_SECONDS = 0.65;
|
||||
<<<<<<< HEAD
|
||||
const HOURGLASS_SPEED = 1100;
|
||||
=======
|
||||
const HOURGLASS_SPEED = 1320;
|
||||
>>>>>>> main
|
||||
const ROCKET_SPEED = 950;
|
||||
const ROCKET_ARC_HEIGHT = 480;
|
||||
// 复用炸弹的爆炸段,跳过火箭命中后不需要的引爆前摇。
|
||||
|
||||
@@ -171,7 +171,11 @@
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 1080,
|
||||
<<<<<<< HEAD
|
||||
"height": 1920
|
||||
=======
|
||||
"height": 2920
|
||||
>>>>>>> main
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
@@ -252,8 +256,13 @@
|
||||
"_alignFlags": 45,
|
||||
"_left": 0,
|
||||
"_right": 0,
|
||||
<<<<<<< HEAD
|
||||
"_top": 0,
|
||||
"_bottom": 0,
|
||||
=======
|
||||
"_top": -500,
|
||||
"_bottom": -500,
|
||||
>>>>>>> main
|
||||
"_verticalCenter": 0,
|
||||
"_horizontalCenter": 0,
|
||||
"_isAbsLeft": true,
|
||||
|
||||
@@ -362,7 +362,11 @@ test('all seven props launch together with distinct trails, grant exactly 40 sec
|
||||
assert.equal(new Set(arrivalTimes.slice(0,hourglasses.length)).size,hourglasses.length);
|
||||
assert.ok(Math.max(...speeds)/Math.min(...speeds)<1.02,'hourglasses keep the same speed along every curve');
|
||||
const averageSpeeds=travelled.map((distance,i)=>distance/arrivalTimes[i]);
|
||||
<<<<<<< HEAD
|
||||
for(const [first,last,expected] of [[0,hourglasses.length,1100],[hourglasses.length,opening.flights.length,950]]){
|
||||
=======
|
||||
for(const [first,last,expected] of [[0,hourglasses.length,1320],[hourglasses.length,opening.flights.length,950]]){
|
||||
>>>>>>> main
|
||||
const group=averageSpeeds.slice(first,last);
|
||||
assert.ok(Math.max(...group)/Math.min(...group)<1.02,'each prop type keeps one travel speed');
|
||||
assert.ok(group.every(speed=>Math.abs(speed/expected-1)<0.02),'rocket timing must not change hourglass speed');
|
||||
|
||||
@@ -28,6 +28,8 @@ function fixture(cache = {}, acknowledge = true) {
|
||||
return { Streak: output.exports.default, info: cc.fx.GameConfig.GM_INFO, storage, saves, cc };
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
function methods(file, names, globals) {
|
||||
const source = ts.createSourceFile(file, read(file), ts.ScriptTarget.Latest, true);
|
||||
const type = source.statements.find(ts.isClassDeclaration);
|
||||
@@ -134,6 +136,7 @@ test('force quit after an actual first operation clears every tier on relaunch d
|
||||
}
|
||||
});
|
||||
|
||||
>>>>>>> main
|
||||
test('existing accounts without the new field start at zero, independent of ten wins', () => {
|
||||
const f = fixture({ threeWinStreak: 2 });
|
||||
f.Streak.restore();
|
||||
|
||||
@@ -403,7 +403,11 @@ test('failed intermediate-panel initialization releases its modal and allows a f
|
||||
let shouldFail = true, finished = 0;
|
||||
const panel = { init() { if (shouldFail) throw new Error('missing prefab child'); } };
|
||||
const cc = { Node, BlockInputEvents: class {}, winSize: {},
|
||||
<<<<<<< HEAD
|
||||
instantiate: () => ({ setPosition() {}, addComponent: () => panel }),
|
||||
=======
|
||||
instantiate: () => ({ setPosition() {}, getChildByName: () => ({ setSiblingIndex() {} }), addComponent: () => panel }),
|
||||
>>>>>>> main
|
||||
};
|
||||
const manager = { isPopupRuntimeAlive: () => true, threeWinsPrefab: {}, threeWinsFont: {},
|
||||
node: { addChild() {} }, threeWinsData: () => ({}), finishDynamicPopupLoad: () => finished++ };
|
||||
|
||||
Reference in New Issue
Block a user