How to use the co.lanica.platino.createTextSprite function in co

To help you get started, we’ve selected a few co examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NatWeiss / RapidGame / templates / titanium / TwoScene / Resources / MenuScene.js View on Github external
// 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);
	};
github NatWeiss / BreakoutClones / Control / Titanium / Resources / MenuScene.js View on Github external
// 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
		});
github NatWeiss / BreakoutClones / Control / Titanium / Resources / MenuScene.js View on Github external
});
		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,
github NatWeiss / BreakoutClones / Control / Titanium / Resources / GameScene.js View on Github external
}
		
		// 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();
		}
github NatWeiss / RapidGame / templates / titanium / TwoScene / Resources / MenuScene.js View on Github external
});
		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,