Fix: add stageData
This commit is contained in:
@@ -32,6 +32,16 @@ var Loading = {
|
|||||||
|
|
||||||
// SpriteIconTimer.loadResources();
|
// SpriteIconTimer.loadResources();
|
||||||
|
|
||||||
|
game.load.image('windows_basic_koas', '../../../resources/image/license/itq/windows_basic_koas.png');
|
||||||
|
game.load.image('pen', '../../../resources/image/confirm_tester_number.png');
|
||||||
|
game.load.image('itq_itq_testsheet_small', '../../../resources/image/itq_itq_testsheet_small.png');
|
||||||
|
// game.load.image('register_tester_number', '../../../resources/image/register_tester_number.png');
|
||||||
|
// game.load.image('register_version', '../../../resources/image/register_version.png');
|
||||||
|
// game.load.image('send_file', '../../../resources/image/send_file.png');
|
||||||
|
// game.load.image('wait_paper', '../../../resources/image/wait_paper.png');
|
||||||
|
// game.load.image('windows_basic_koas_execute', '../../../resources/image/windows_basic_koas_execute.png');
|
||||||
|
|
||||||
|
|
||||||
game.load.start();
|
game.load.start();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ var GAME_SCREEN_SIZE = { x: 1024, y: 768 }
|
|||||||
var Simulator = {
|
var Simulator = {
|
||||||
|
|
||||||
preload: function() {
|
preload: function() {
|
||||||
this.game.load.image('windows_basic_koas', '../../../resources/image/license/itq/windows_basic_koas.png');
|
// this.game.load.image('windows_basic_koas', '../../../resources/image/license/itq/windows_basic_koas.png');
|
||||||
// this.game.load.image('confirm_tester_number', './image/confirm_tester_number.png');
|
// this.game.load.image('confirm_tester_number', './image/confirm_tester_number.png');
|
||||||
// this.game.load.image('control_center', './image/control_center.png');
|
// this.game.load.image('control_center', './image/control_center.png');
|
||||||
// this.game.load.image('register_tester_number', './image/register_tester_number.png');
|
// this.game.load.image('register_tester_number', './image/register_tester_number.png');
|
||||||
@@ -47,18 +47,98 @@ var Simulator = {
|
|||||||
initVariables: function() {
|
initVariables: function() {
|
||||||
this.stageIndex = 0;
|
this.stageIndex = 0;
|
||||||
|
|
||||||
this.tips = [
|
this.stageData = [
|
||||||
"파워포인트, 아래한글, 엑셀 프로그램을 실행해봅니다.\n다른 프로그램은 절대 실행하지 마세요. (특히 인터넷)",
|
{
|
||||||
"KOAS 수험자용 - 프로그램을 실행합니다.",
|
tip: "파워포인트, 아래한글, 엑셀 프로그램을 실행해봅니다.\n다른 프로그램은 절대 실행하지 마세요. (특히 인터넷)",
|
||||||
"수험표에 있는 수험번호를 정확히 입력합니다.",
|
textColor: "yellow",
|
||||||
"아래한글 또는 MS오피스\n2010 버전을 선택하세요.",
|
images: [
|
||||||
"입력한 내용이 정확한지 자세히 확인하고\n[확인] 버튼을 누르세요.",
|
{
|
||||||
"기다리는 동안 시험지를 받습니다.\n시험지 위에 볼펜으로\n자신의 [수험번호], [이름]을 적습니다.",
|
name: "pen",
|
||||||
"시험이 시작되면\n아래한글 또는 파워포인트/엑셀 프로그램을\n실행합니다.",
|
x: 100,
|
||||||
"프로그램 실행 후 가장 먼저 파일을 저장합니다.\n라이브러리>문서>ITQ 폴더!!! '수험번호-이름'!!!",
|
y: 100
|
||||||
"내 정답 파일이 목록에 잘 보이는지 확인한 후,\n[답안 전송] 버튼을 누르세요.",
|
},
|
||||||
"자주 저장하세요!!!\n슬라이드/페이지마다 / 시험 종료 5분전 / 시험 종료시\n답안 전송도 함께 하세요.",
|
{
|
||||||
|
name: "itq_testsheet_small",
|
||||||
|
x: 900,
|
||||||
|
y: 100
|
||||||
|
},
|
||||||
|
],
|
||||||
|
rectangles: [
|
||||||
|
{
|
||||||
|
x: 0,
|
||||||
|
y: 0,
|
||||||
|
width: 300,
|
||||||
|
height: 300
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
tip: "KOAS 수험자용 - 프로그램을 실행합니다.",
|
||||||
|
images: [
|
||||||
|
],
|
||||||
|
rectangles: [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
tip: "수험표에 있는 수험번호를 정확히 입력합니다.",
|
||||||
|
images: [
|
||||||
|
],
|
||||||
|
rectangles: [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
tip: "아래한글 또는 MS오피스\n2010 버전을 선택하세요.",
|
||||||
|
images: [
|
||||||
|
],
|
||||||
|
rectangles: [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
tip: "입력한 내용이 정확한지 자세히 확인하고\n[확인] 버튼을 누르세요.",
|
||||||
|
images: [
|
||||||
|
],
|
||||||
|
rectangles: [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
tip: "기다리는 동안 시험지를 받습니다.\n시험지 위에 볼펜으로\n자신의 [수험번호], [이름]을 적습니다.",
|
||||||
|
images: [
|
||||||
|
],
|
||||||
|
rectangles: [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
tip: "시험이 시작되면\n아래한글 또는 파워포인트/엑셀 프로그램을\n실행합니다.",
|
||||||
|
images: [
|
||||||
|
],
|
||||||
|
rectangles: [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
tip: "프로그램 실행 후 가장 먼저 파일을 저장합니다.\n라이브러리>문서>ITQ 폴더!!! '수험번호-이름'!!!",
|
||||||
|
images: [
|
||||||
|
],
|
||||||
|
rectangles: [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
tip: "내 정답 파일이 목록에 잘 보이는지 확인한 후,\n[답안 전송] 버튼을 누르세요.",
|
||||||
|
images: [
|
||||||
|
],
|
||||||
|
rectangles: [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
tip: "자주 저장하세요!!!\n슬라이드/페이지마다 / 시험 종료 5분전 / 시험 종료시\n답안 전송도 함께 하세요.",
|
||||||
|
images: [
|
||||||
|
],
|
||||||
|
rectangles: [
|
||||||
|
]
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
console.log(this.stageData);
|
||||||
|
|
||||||
|
this.rectangles = [];
|
||||||
},
|
},
|
||||||
|
|
||||||
prev: function() {
|
prev: function() {
|
||||||
@@ -80,18 +160,12 @@ var Simulator = {
|
|||||||
printContents: function() {
|
printContents: function() {
|
||||||
// this.bgImage.loadTexture(this.images[this.stageIndex]);
|
// this.bgImage.loadTexture(this.images[this.stageIndex]);
|
||||||
|
|
||||||
this.tipText.text = this.tips[this.stageIndex];
|
this.removeRectangles();
|
||||||
switch(this.stageIndex) {
|
|
||||||
case 0:
|
var data = this.stageData[this.stageIndex];
|
||||||
case 5:
|
this.tipText.text = data.tip;
|
||||||
case 7:
|
if(data.textColor != undefined)
|
||||||
case 9:
|
this.tipText.addColor(data.textColor, 0);
|
||||||
this.tipText.addColor("#ff0000", 0); // red
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
this.tipText.addColor("#ffffff", 0); // white
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
showImage: function(image, x, y) {
|
showImage: function(image, x, y) {
|
||||||
@@ -103,4 +177,21 @@ var Simulator = {
|
|||||||
image.y = 0;
|
image.y = 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
removeRectangles: function() {
|
||||||
|
var count = this.rectangles.length;
|
||||||
|
for(var i = 0; i < count; i++)
|
||||||
|
this.rectangles.pop().destroy();
|
||||||
|
},
|
||||||
|
|
||||||
|
drawRectangle: function(x, y, width, height) {
|
||||||
|
var index = this.rectangles.length;
|
||||||
|
|
||||||
|
graphics.lyneStyle(10, 0xff0000);
|
||||||
|
graphics.drawRect(0, 0, width, height);
|
||||||
|
var rectSprite = game.add.sprite(x, y, graphcis.generateTexture());
|
||||||
|
graphics.destroy();
|
||||||
|
|
||||||
|
this.rectangles.push(rectSprite);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user