소스 검색

Show text when saving

tags/v0.0.2
Fen Dweller 5 년 전
부모
커밋
4a9f2b177c
2개의 변경된 파일27개의 추가작업 그리고 1개의 파일을 삭제
  1. +22
    -0
      gorge.css
  2. +5
    -1
      gorge.js

+ 22
- 0
gorge.css 파일 보기

@@ -339,6 +339,17 @@ button {
--target: -200px;
}

.click-popup-info {
pointer-events: none;
transform-origin: -50% 50%;
text-align: center;
position: fixed;
animation: click-popup-upgrade 2s linear;
animation-fill-mode: both;
font-size: 36px;
--target: -200px;
}

@keyframes click-popup-food {
0% {
transform: translate(0px, 0px) scale(1, 1);
@@ -372,6 +383,17 @@ button {
}
}

@keyframes click-popup-info {
0% {
transform: translate(0px, 0px) scale(1, 1);
opacity: 1;
}
100% {
transform: translate(var(--target), 200px) scale(0.5, 0.5);
opacity: 0;
}
}



div::-webkit-scrollbar {


+ 5
- 1
gorge.js 파일 보기

@@ -569,6 +569,8 @@ function clickPopup(text, type, location) {
direction = -150;
} else if (type == "upgrade") {
direction = -50;
} else if (type == "info") {
direction = 50;
}

direction *= Math.random() * 0.5 + 1;
@@ -684,7 +686,7 @@ window.onload = function() {
setTimeout(updateDisplay, 1000/updateRate);
}

function save() {
function save(e) {
let storage = window.localStorage;

storage.setItem("save-version", "0.0.1");
@@ -694,6 +696,8 @@ function save() {
storage.setItem("resources", JSON.stringify(resources));

storage.setItem("belongings", JSON.stringify(belongings));

clickPopup("Saved!", "upgrade", [e.clientX, e.clientY]);
}

function load() {


불러오는 중...
취소
저장