Achievements (#9665)

* wip

* Update ja-JP.yml

* wip

* wip

* Update MkAchievements.vue

* wip

* 🎨

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip
This commit is contained in:
syuilo 2023-01-21 13:14:55 +09:00 committed by GitHub
parent b8afabde2c
commit 65cd605b73
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 1385 additions and 18 deletions

View file

@ -20,6 +20,7 @@ import * as os from '@/os';
import { useInterval } from '@/scripts/use-interval';
import * as game from '@/scripts/clicker-game';
import number from '@/filters/number';
import { claimAchievement } from '@/scripts/achievements';
defineProps<{
}>();
@ -30,14 +31,18 @@ let cps = $ref(0);
let prevCookies = $ref(0);
function onClick(ev: MouseEvent) {
const x = ev.clientX;
const y = ev.clientY;
os.popup(MkPlusOneEffect, { x, y }, {}, 'end');
saveData.value!.cookies++;
saveData.value!.totalCookies++;
saveData.value!.totalHandmadeCookies++;
saveData.value!.clicked++;
const x = ev.clientX;
const y = ev.clientY;
os.popup(MkPlusOneEffect, { x, y }, {}, 'end');
if (cookies.value === 1) {
claimAchievement('cookieClicked');
}
}
useInterval(() => {