Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// Logo tween
var tweenY = 25;
logo.y -= tweenY * .5;
transform = platino.createTransform({
duration: 2000,
y: logo.y + tweenY,
autoreverse: true,
repeat: -1,
easing: platino.ANIMATION_CURVE_EASE_IN_OUT
});
logo.transform(transform);
// Play label
var xOffset = 0;
var yOffset = 400;
playLabel = platino.createTextSprite({
text: "Play",
fontSize: 120,
fontFamily: "Dolce Vita",
alpha: 0.333
});
size = playLabel.sizeWithText(playLabel.text);
playLabel.center = {x: middle.x - size.width * .5 - xOffset, y: middle.y - size.height * .5 + yOffset};
scene.add(playLabel);
game.addEventListener('enterframe', scene.update);
game.addEventListener('touchstart', scene.onTouch);
game.addEventListener('touchmove', scene.onTouch);
game.addEventListener('touchend', scene.onTouch);
game.addEventListener('touchcancel', scene.onTouch);
};
// Logo tween
var tweenY = 25;
logo.y -= tweenY * .5;
transform = platino.createTransform({
duration: 2000,
y: logo.y + tweenY,
autoreverse: true,
repeat: -1,
easing: platino.ANIMATION_CURVE_EASE_IN_OUT
});
logo.transform(transform);
// Play label
var xOffset = 300;
var yOffset = 400;
playLabel = platino.createTextSprite({
text: "Play",
fontSize: 120,
fontFamily: "Dolce Vita",
alpha: 0.333
});
size = playLabel.sizeWithText(playLabel.text);
playLabel.center = {x: middle.x - size.width * .5 - xOffset, y: middle.y - size.height * .5 + yOffset};
scene.add(playLabel);
// Exit label
exitLabel = platino.createTextSprite({
text: "Exit",
fontSize: 120,
fontFamily: "Dolce Vita",
alpha: 0.333
});
});
bg.color(218/255, 214/255, 212/255);
bg.center = {x: middle.x, y: middle.y};
scene.add(bg);
// Logo
logo = platino.createSprite({image: "Logo.png"});
logo.anchorPoint = {x: 0.5, y: 0.5};
logo.center = {
x: middle.x,
y: middle.y - 200,
};
scene.add(logo);
// Logo label
logoLabel = platino.createTextSprite({
text: logoText,
fontSize: 220,
fontFamily: "Dolce Vita",
alpha: 0.5
});
size = logoLabel.sizeWithText(logoLabel.text);
logoLabel.center = {x: logo.center.x - size.width * .5, y: logo.center.y - size.height * .5};
scene.add(logoLabel);
// Logo tween
var tweenY = 25;
logo.y -= tweenY * .5;
transform = platino.createTransform({
duration: 2000,
y: logo.y + tweenY,
autoreverse: true,
}
// Labels
scoreLabel = platino.createTextSprite({
text: "Score: " + game.score,
fontSize: 36,
fontFamily: "Dolce Vita",
alpha: 0.5,
width: 300,
height: 100,
x: bounds.x1,
y: bounds.y1 + 10
});
scene.add(scoreLabel);
livesLabel = platino.createTextSprite({
text: "Lives: " + game.lives,
fontSize: 36,
fontFamily: "Dolce Vita",
alpha: 0.5,
width: 300,
height: 100,
x: bounds.x2 - 120,
y: bounds.y1 + 10
});
scene.add(livesLabel);
// Play music
if (playMusic) {
music.looping = true;
music.play();
}
});
bg.color(218/255, 214/255, 212/255);
bg.center = {x: middle.x, y: middle.y};
scene.add(bg);
// Logo
logo = platino.createSprite({image: "Logo.png"});
logo.anchorPoint = {x: 0.5, y: 0.5};
logo.center = {
x: middle.x,
y: middle.y - 200,
};
scene.add(logo);
// Logo label
logoLabel = platino.createTextSprite({
text: logoText,
fontSize: 220,
fontFamily: "Dolce Vita",
alpha: 0.5
});
size = logoLabel.sizeWithText(logoLabel.text);
logoLabel.center = {x: logo.center.x - size.width * .5, y: logo.center.y - size.height * .5};
scene.add(logoLabel);
// Logo tween
var tweenY = 25;
logo.y -= tweenY * .5;
transform = platino.createTransform({
duration: 2000,
y: logo.y + tweenY,
autoreverse: true,