mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Further abt testing, v2
This commit is contained in:
parent
0a733907d5
commit
9d28a1f2f6
@ -39,6 +39,39 @@
|
||||
@include IncreasedClickArea(0px);
|
||||
@include S(margin-top, 15px);
|
||||
|
||||
&[data-btn-variant="0"] {
|
||||
// nothing
|
||||
}
|
||||
|
||||
&[data-btn-variant="1"] {
|
||||
@include InlineAnimation(1s ease-in-out) {
|
||||
0% {
|
||||
opacity: 0.05;
|
||||
}
|
||||
50% {
|
||||
opacity: 0.05;
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&[data-btn-variant="2"] {
|
||||
@include InlineAnimation(2.5s ease-in-out) {
|
||||
0% {
|
||||
opacity: 0.05;
|
||||
}
|
||||
50% {
|
||||
opacity: 0.05;
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&[data-btn-variant="3"] {
|
||||
@include InlineAnimation(5s ease-in-out) {
|
||||
0% {
|
||||
opacity: 0.05;
|
||||
@ -52,6 +85,21 @@
|
||||
}
|
||||
}
|
||||
|
||||
&[data-btn-variant="4"] {
|
||||
@include InlineAnimation(10s ease-in-out) {
|
||||
0% {
|
||||
opacity: 0.05;
|
||||
}
|
||||
80% {
|
||||
opacity: 0.05;
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.playtimeDisclaimer {
|
||||
@include S(margin-bottom, 10px);
|
||||
@include PlainText;
|
||||
|
@ -21,7 +21,7 @@ export const THIRDPARTY_URLS = {
|
||||
|
||||
privacyPolicy: "https://tobspr.io/privacy.html",
|
||||
|
||||
standaloneCampaignLink: "https://get.shapez.io/$campaign",
|
||||
standaloneCampaignLink: "https://get.shapez.io/bundle/$campaign",
|
||||
puzzleDlcStorePage: "https://store.steampowered.com/app/1625400/shapezio__Puzzle_DLC",
|
||||
|
||||
levelTutorialVideos: {
|
||||
|
@ -39,7 +39,9 @@ export class HUDStandaloneAdvantages extends BaseHUDPart {
|
||||
: ""
|
||||
}
|
||||
</button>
|
||||
<button class="otherCloseButton">${T.ingame.standaloneAdvantages.no_thanks}</button>
|
||||
<button class="otherCloseButton" data-btn-variant="${this.root.app.gameAnalytics.abtVariant}">${
|
||||
T.ingame.standaloneAdvantages.no_thanks
|
||||
}</button>
|
||||
</div>
|
||||
`
|
||||
);
|
||||
|
@ -18,8 +18,8 @@ const analyticsUrl = G_IS_DEV ? "http://localhost:8001" : "https://analytics.sha
|
||||
// Be sure to increment the ID whenever it changes
|
||||
const analyticsLocalFile = G_IS_STEAM_DEMO ? "shapez_token_steamdemo.bin" : "shapez_token_123.bin";
|
||||
|
||||
const CURRENT_ABT = "abt_spl";
|
||||
const CURRENT_ABT_COUNT = 2;
|
||||
const CURRENT_ABT = "abt_sacb";
|
||||
const CURRENT_ABT_COUNT = 5;
|
||||
|
||||
export class ShapezGameAnalytics extends GameAnalyticsInterface {
|
||||
constructor(app) {
|
||||
@ -52,9 +52,7 @@ export class ShapezGameAnalytics extends GameAnalyticsInterface {
|
||||
}
|
||||
|
||||
fetchABVariant() {
|
||||
return this.app.storage
|
||||
.readFileAsync("shapez_" + CURRENT_ABT + ".bin")
|
||||
.then(
|
||||
return this.app.storage.readFileAsync("shapez_" + CURRENT_ABT + ".bin").then(
|
||||
abt => {
|
||||
if (typeof queryParamOptions.abtVariant === "string") {
|
||||
this.abtVariant = queryParamOptions.abtVariant;
|
||||
@ -76,12 +74,7 @@ export class ShapezGameAnalytics extends GameAnalyticsInterface {
|
||||
this.app.storage.writeFileAsync("shapez_" + CURRENT_ABT + ".bin", this.abtVariant);
|
||||
}
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
if (this.abtVariant === "1") {
|
||||
THIRDPARTY_URLS.standaloneCampaignLink = "https://get.shapez.io/bundle/$campaign";
|
||||
}
|
||||
});
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user