OwlCyberSecurity - MANAGER
Edit File: pickscreen.js
var pickscreen = function(game) { var sceneSelected; } pickscreen.prototype = { create: function() { Selection_Bg = this.add.sprite(0,0,"selection_bg"); School_Btn = this.add.button(135,283,"school_btn",function() { sceneSelected = "school scene"; this.state.start("DressUp"); },this,1,0,0); School_Btn.anchor.setTo(0.5,0.5); School_Btn.smoothed = false; School_Blocker = this.add.sprite(School_Btn.x,School_Btn.y,"btn_blocker") School_Blocker.anchor.setTo(0.5,0.5); Cafe_Btn = this.add.button(406,283,"cafe_btn",function() { sceneSelected = "cafe scene"; this.state.start("DressUp"); },this,1,0,0); Cafe_Btn.anchor.setTo(0.5,0.5); Cafe_Btn.smoothed = false; Cafe_Blocker = this.add.sprite(Cafe_Btn.x,Cafe_Btn.y,"btn_blocker") Cafe_Blocker.anchor.setTo(0.5,0.5); Bedtime_Btn = this.add.button(676,283,"bedtime_btn",function() { sceneSelected = "bedtime scene"; this.state.start("DressUp"); },this,1,0,0); Bedtime_Btn.anchor.setTo(0.5,0.5); Bedtime_Btn.smoothed = false; Bedtime_Blocker = this.add.sprite(Bedtime_Btn.x,Bedtime_Btn.y,"btn_blocker") Bedtime_Blocker.anchor.setTo(0.5,0.5); this.CheckDone(); }, CheckDone: function() { if(!schoolDone && !cafeDone && !bedtimeDone) { School_Btn.inputEnabled = true; School_Btn.input.useHandCursor = true; School_Blocker.visible = false; Cafe_Btn.inputEnabled = false; Cafe_Btn.input.useHandCursor = false; Cafe_Blocker.visible = true; Bedtime_Btn.inputEnabled = false; Bedtime_Btn.input.useHandCursor = false; Bedtime_Blocker.visible = true; } else if(schoolDone && !cafeDone && !bedtimeDone) { School_Btn.inputEnabled = false; School_Btn.input.useHandCursor = false; School_Blocker.visible = true; Cafe_Btn.inputEnabled = true; Cafe_Btn.input.useHandCursor = true; Cafe_Blocker.visible = false; Bedtime_Btn.inputEnabled = false; Bedtime_Btn.input.useHandCursor = false; Bedtime_Blocker.visible = true; } else if(schoolDone && cafeDone && !bedtimeDone) { School_Btn.inputEnabled = false; School_Btn.input.useHandCursor = false; School_Blocker.visible = true; Cafe_Btn.inputEnabled = false; Cafe_Btn.input.useHandCursor = false; Cafe_Blocker.visible = true; Bedtime_Btn.inputEnabled = true; Bedtime_Btn.input.useHandCursor = true; Bedtime_Blocker.visible = false; } }, update: function() { } }