OwlCyberSecurity - MANAGER
Edit File: titlescreen.js
var titlescreen = function(game) { GameTitle = "24-hour-snow-white"; } titlescreen.prototype = { create: function() { cover = this.add.sprite(0,0,"cover"); Clock_Bg = this.add.sprite(431,119,"clock_bg"); Clock_Bg.anchor.setTo(0.5,0.5); Minute_Hand = this.add.sprite(429,122,"minute_hand"); Minute_Hand.anchor.setTo(0.5,0.5); Minute_Anim = Minute_Hand.animations.add("minuteanim",[0,1,2,3,4,5],3,true); Minute_Anim.play("minuteanim"); Hour_Hand = this.add.sprite(426,116,"hour_hand"); Hour_Hand.anchor.setTo(0.5,0.5); Hour_Anim = Hour_Hand.animations.add("houranim",[0,1,2,3,4,5],1,true); Hour_Anim.play("houranim"); Clock_Group = this.add.group(); Clock_Group.add(Clock_Bg); Clock_Group.add(Minute_Hand); Clock_Group.add(Hour_Hand); Clock_Group.alpha = 0; Title = this.add.sprite(625,0-342,"title");//200 Title.anchor.setTo(0.5,0.5); Title.alpha = 0; Title_Tween = this.add.tween(Title).to({y: 200,alpha: 1},400,Phaser.Easing.Linear.None,true); Title_Tween.onComplete.add(function() { Clock_Tween = this.add.tween(Clock_Group).to({alpha:1},1000,Phaser.Easing.Linear.None,true); this.CharWink(); Clock_Tween.onComplete.add(function() { Play_Btn.inputEnabled = true; Logo_Btn.inputEnabled = true; MoreGames_Btn.inputEnabled = true; },this); },this); Eyes = this.add.sprite(193,198,"intro_eyes"); Eyes.anchor.setTo(0.5,0.5); Blink = this.add.sprite(195,205,"intro_blink"); Blink.anchor.setTo(0.5,0.5); Blink.visible = false; Wink = this.add.sprite(193,204.5,"intro_wink"); Wink.anchor.setTo(0.5,0.5); Wink.visible = false; Play_Btn = this.add.button(622,446,"play_btn",function() { this.state.start("PickScreen"); },this,0,0,1); Play_Btn.anchor.setTo(0.5,0.5); Play_Btn.inputEnabled = false; Logo_Btn = this.add.button(615,555,"logo_btn",function() { window.open("http://www.dressupgames.com/?utm_source=html5-24-hours-of-snow-white&utm_medium=html5-24-hours-of-snow-white&utm_campaign=24-hours-of-snow-white","_blank"); },this,0,0,1); Logo_Btn.anchor.setTo(0.5,0.5); Logo_Btn.smoothed = false; Logo_Btn.inputEnabled = false; MoreGames_Btn = this.add.button(79,532,"moregames_btn",function() { window.open("http://www.dressupgames.com/?utm_source=html5-24-hours-of-snow-white&utm_medium=html5-24-hours-of-snow-white&utm_campaign=24-hours-of-snow-white","_blank"); },this,1,1,0); MoreGames_Btn.anchor.setTo(0.5,0.5); MoreGames_Btn.inputEnabled = false; }, BlinkWink: function() { this.game.time.events.add(2000,function() { var RandNum = Math.floor(Math.random()*(2 - 1 + 1)) + 1; if(RandNum == 0 || RandNum == 2){this.CharBlink();} if(RandNum == 1){this.CharWink();} },this); }, CharBlink: function() { Eyes_Tween = this.add.tween(Eyes).to({visible: false},10,Phaser.Easing.Linear.None,true); Eyes_Tween.start(); Blink_Tween = this.add.tween(Blink).to({visible: true},100,Phaser.Easing.Linear.None,true); Blink_Tween.start(); Blink_Tween.onComplete.add(function() { var RandNum = Math.floor(Math.random()*(2 - 1 + 1)) + 1; var BlinkTimer = 0; if(RandNum == 0 || RandNum == 2){BlinkTimer = 2000;} if(RandNum == 1){BlinkTimer = 600;} this.game.time.events.add(50,function() { Blink.visible = false; Eyes.visible = true; this.game.time.events.add(BlinkTimer,function(){this.BlinkWink();},this); },this); },this); }, CharWink: function() { Eyes_Tween = this.add.tween(Eyes).to({visible: false},10,Phaser.Easing.Linear.None,true); Eyes_Tween.start(); Wink_Tween = this.add.tween(Wink).to({visible: true},100,Phaser.Easing.Linear.None,true); Wink_Tween.start(); Wink_Tween.onComplete.add(function() { var RandNum = Math.floor(Math.random()*(2 - 1 + 1)) + 1; var WinkTimer = 0; if(RandNum == 0 || RandNum == 2){WinkTimer = 2000;} if(RandNum == 1){WinkTimer = 600;} this.game.time.events.add(50,function() { Wink.visible = false; Eyes.visible = true; this.game.time.events.add(WinkTimer,function(){this.BlinkWink();},this); },this); },this); }, update: function() { } }