How to use the co.lanica.platino.createScene 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 / BreakoutClones / Control / Titanium / Resources / MenuScene.js View on Github external
var MenuScene = function(window, game) {
	var fontName = "Dolce Vita";
	
	var screenWidth = 0;
	var screenHeight = 0;
	var middle = {};
	var scene = platino.createScene();
	var bg = null;
	var bg2 = null;
	var logo = null;
	var transform = null;
	var labelTransform = null;
	var logoLabel = null;
	var playLabel = null;
	var exitLabel = null;
	var introSound = Ti.Media.createSound({url:"Intro.mp3"});
	var winSound = Ti.Media.createSound({url:"Win.mp3"});
	var loseSound = Ti.Media.createSound({url:"Lose.mp3"});
	
	var onSceneActivated = function(e) {
		var size,logoText;
		Ti.API.info("MenuScene has been activated.");
		screenWidth = game.TARGET_SCREEN.width;
github NatWeiss / RapidGame / templates / titanium / TwoScene / Resources / MenuScene.js View on Github external
var MenuScene = function(window, game) {
	var fontName = "Dolce Vita";
	
	var screenWidth = 0;
	var screenHeight = 0;
	var middle = {};
	var scene = platino.createScene();
	var bg = null;
	var bg2 = null;
	var logo = null;
	var transform = null;
	var labelTransform = null;
	var logoLabel = null;
	var playLabel = null;
	var introSound = Ti.Media.createSound({url:"Intro.mp3"});
	
	var onSceneActivated = function(e) {
		var size,logoText;
		Ti.API.info("MenuScene has been activated.");
		screenWidth = game.TARGET_SCREEN.width;
		screenHeight = game.TARGET_SCREEN.height;
		middle.x = game.STAGE_START.x + (screenWidth * 0.5);
		middle.y = game.STAGE_START.y + (screenHeight * 0.5);
github NatWeiss / BreakoutClones / Control / Titanium / Resources / GameScene.js View on Github external
var paddleSpeed = 1500;
	var minPaddleMovement = 25;
	var wallThickness = 40;
	var brickPadding = 16;
	var numOfRows = 4;
	var numOfCols = 11;
	var fontName = "Dolce Vita";
	var ballVelocity = {x: 0, y: 0};
	
	var screenWidth = 0;
	var screenHeight = 0;
	var isHeld = false;
	var touchX = 0;
	var middle = {};
	var bounds = {};
	var scene = platino.createScene();
	var bg = null;
	var bg2 = null;
	var paddle = null;
	var ball = null;
	var bricks = [];
	var brickCount = 0;
	var transforms = [];
	var scoreLabel = null;
	var livesLabel = null;
	var music = Ti.Media.createSound({url:"Song.mp3"});
	var paddleSound = Ti.Media.createSound({url:"Paddle.mp3"});
	var brickSound = Ti.Media.createSound({url:"Brick.mp3"});
	var wallSound = Ti.Media.createSound({url:"Wall.mp3"});
	var dieSound = Ti.Media.createSound({url:"Die.mp3"});
	
	var clamped = function(value, lowest, highest){