Skip to content

Commit

Permalink
better threepeater bullets and sun position fix
Browse files Browse the repository at this point in the history
Signed-off-by: ClaytonTDM <[email protected]>
  • Loading branch information
ClaytonTDM committed Oct 12, 2024
1 parent 61e082a commit 36a1799
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 14 deletions.
19 changes: 18 additions & 1 deletion game/Custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
}
#sSunNum {
font-family: "continuumbold" !important;
margin-top: -2px !important;
margin-top: -5px !important;
}
#DivTeach {
width: 50% !important;
Expand Down Expand Up @@ -379,3 +379,20 @@ td {
transform: translate(0px, 0px);
}
}

@keyframes threepeaterDown { /* threepeaterDown 1.25s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards */
0% {
transform: translateY(0px);
}
100% {
transform: translateY(102px);
}
}
@keyframes threepeaterUp { /* threepeaterUp 1.25s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards */
0% {
transform: translateY(0px);
}
100% {
transform: translateY(-102px);
}
}
30 changes: 17 additions & 13 deletions game/js/CPlants.js
Original file line number Diff line number Diff line change
Expand Up @@ -2000,30 +2000,34 @@ var CPlants = NewO({
f.BulletClass = [];
f.BulletEle = [];
for (b in c) {
f.BulletClass.push(
NewO({
X: e,
R: b,
D: 0,
Attack: 20,
Kind: 0,
ChangeC: 0,
pixelLeft: d,
F: oGd.MB1,
})
);
let bullet = NewO({
X: e,
R: f.R,
D: 0,
Attack: 20,
Kind: 0,
ChangeC: 0,
pixelLeft: d,
F: oGd.MB1,
});
f.BulletClass.push(bullet);
f.BulletEle.push(
NewImg(
0,
"images/Plants/PB00.gif",
"left:" +
d +
"px;top:" +
(GetY(b) - 50) +
(GetY(f.R) - 65) +
"px;visibility:hidden;z-index:" +
(3 * b + 2)
)
);
if (b % 3 == 0) {
f.BulletEle[f.BulletEle.length - 1].style.animation = `threepeaterDown ${1.25 * $User.Visitor.TimeStep / 10}s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards`;
} else if (b % 3 == 1) {
f.BulletEle[f.BulletEle.length - 1].style.animation = `threepeaterUp ${1.25 * $User.Visitor.TimeStep / 10}s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards`;
}
}
},
PrivateDie: function (a) {
Expand Down

0 comments on commit 36a1799

Please sign in to comment.