Made frontend landscape.

This commit is contained in:
genxium
2023-01-17 23:29:05 +08:00
parent b8e757064d
commit 342efc623c
23 changed files with 8547 additions and 2789 deletions

View File

@@ -68,6 +68,8 @@ cc.Class({
// LIFE-CYCLE CALLBACKS:
onLoad() {
cc.view.setOrientation(cc.macro.ORIENTATION_LANDSCAPE);
cc.view.enableAutoFullScreen(true);
window.atFirstLocationHref = window.location.href.split('#')[0];
const self = this;

View File

@@ -409,6 +409,9 @@ cc.Class({
},
onLoad() {
cc.view.setOrientation(cc.macro.ORIENTATION_LANDSCAPE);
cc.view.enableAutoFullScreen(true);
const self = this;
window.mapIns = self;
window.forceBigEndianFloatingNumDecoding = self.forceBigEndianFloatingNumDecoding;
@@ -912,7 +915,7 @@ batchInputFrameIdRange=[${batch[0].inputFrameId}, ${batch[batch.length - 1].inpu
if (elapsedMillisSinceLastFrameIdTriggered < self.tooFastDtIntervalMillis) {
// [WARNING] We should avoid a frontend ticking too fast to prevent cheating, as well as ticking too slow to cause a "resync avalanche" that impacts user experience!
// console.debug("Avoiding too fast frame@renderFrameId=", self.renderFrameId, ": elapsedMillisSinceLastFrameIdTriggered=", elapsedMillisSinceLastFrameIdTriggered);
return;
//return;
}
try {
let st = performance.now();

View File

@@ -11,6 +11,8 @@ cc.Class({
},
onLoad() {
cc.view.setOrientation(cc.macro.ORIENTATION_LANDSCAPE);
cc.view.enableAutoFullScreen(true);
const self = this;
window.mapIns = self;
self.showCriticalCoordinateLabels = false;
@@ -94,7 +96,7 @@ cc.Class({
const p2Vpos = gopkgs.WorldToVirtualGridPos(boundaryObjs.playerStartingPositions[1].x, boundaryObjs.playerStartingPositions[1].y);
const colliderRadiusV = gopkgs.WorldToVirtualGridPos(12.0, 0);
const speciesIdList = [1, 4096];
const speciesIdList = [4096, 1];
const chConfigsOrderedByJoinIndex = gopkgs.GetCharacterConfigsOrderedByJoinIndex(speciesIdList);
const startRdf = window.pb.protos.RoomDownsyncFrame.create({
@@ -154,7 +156,7 @@ cc.Class({
if (elapsedMillisSinceLastFrameIdTriggered < self.tooFastDtIntervalMillis) {
// [WARNING] We should avoid a frontend ticking too fast to prevent cheating, as well as ticking too slow to cause a "resync avalanche" that impacts user experience!
// console.debug("Avoiding too fast frame@renderFrameId=", self.renderFrameId, ": elapsedMillisSinceLastFrameIdTriggered=", elapsedMillisSinceLastFrameIdTriggered);
return;
//return;
}
try {
let st = performance.now();

View File

@@ -173,11 +173,11 @@ cc.Class({
});
self.btnA.on(cc.Node.EventType.TOUCH_END, function(evt) {
self._triggerEdgeBtnA(false);
evt.target.runAction(cc.scaleTo(0.1, 1.0));
evt.target.runAction(cc.scaleTo(0.1, 0.5));
});
self.btnA.on(cc.Node.EventType.TOUCH_CANCEL, function(evt) {
self._triggerEdgeBtnA(false);
evt.target.runAction(cc.scaleTo(0.1, 1.0));
evt.target.runAction(cc.scaleTo(0.1, 0.5));
});
}
@@ -188,11 +188,11 @@ cc.Class({
});
self.btnB.on(cc.Node.EventType.TOUCH_END, function(evt) {
self._triggerEdgeBtnB(false);
evt.target.runAction(cc.scaleTo(0.1, 1.0));
evt.target.runAction(cc.scaleTo(0.1, 0.5));
});
self.btnB.on(cc.Node.EventType.TOUCH_CANCEL, function(evt) {
self._triggerEdgeBtnB(false);
evt.target.runAction(cc.scaleTo(0.1, 1.0));
evt.target.runAction(cc.scaleTo(0.1, 0.5));
});
}