Add: ITQ simulator basic files
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 35 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 411 KiB |
@@ -1,5 +1,5 @@
|
||||
FullscreenButton.prototype = Object.create(RoundRectButton);
|
||||
FullscreenButton.constructor = BackButton;
|
||||
FullscreenButton.constructor = FullscreenButton;
|
||||
|
||||
function FullscreenButton() {
|
||||
game.scale.fullScreenScaleMode = Phaser.ScaleManager.EXACT_FIT;
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
var Loading = {
|
||||
|
||||
preload: function() {
|
||||
// game.load.image('loadingbar', './image/phaser.png');
|
||||
},
|
||||
|
||||
create: function() {
|
||||
// var userID = sessionStorage.getItem("UserID");
|
||||
// console.log("userID : " + userID);
|
||||
|
||||
game.stage.backgroundColor = '#4d4d4d';
|
||||
|
||||
// // Progress report
|
||||
// this.textProgress = game.add.text(game.world.centerX, 100, '로딩중 . . .', textStyleBasic);
|
||||
// this.textProgress.anchor.setTo(0.5, 0.4);
|
||||
// this.textProgress.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
|
||||
|
||||
// // Preload bar
|
||||
// this.preloadBar = this.add.sprite(game.world.centerX, game.world.centerY, 'loadingbar');
|
||||
// this.preloadBar.anchor.setTo(0.5);
|
||||
// this.preloadBar.alpha = 0;
|
||||
|
||||
game.load.onFileComplete.add(this.fileComplete, this);
|
||||
game.load.onLoadComplete.add(this.loadComplete, this);
|
||||
|
||||
this.startLoading();
|
||||
},
|
||||
|
||||
startLoading: function() {
|
||||
game.load.image('icon_fullscreen', '../../../resources/image/icon/fullscreen_white.png');
|
||||
game.load.image('icon_home', '../../../resources/image/icon/home.png');
|
||||
|
||||
// SpriteIconTimer.loadResources();
|
||||
|
||||
game.load.start();
|
||||
},
|
||||
|
||||
fileComplete: function(progress, cacheKey, success, totalLoaded, totalFiles) {
|
||||
// this.preloadBar.alpha = progress / 100;
|
||||
|
||||
// console.log('progress : ' + progress);
|
||||
|
||||
// text.setText("File Complete: " + progress + "% - " + totalLoaded + " out of " + totalFiles);
|
||||
|
||||
// var newImage = game.add.image(x, y, cacheKey);
|
||||
// newImage.scale.set(0.3);
|
||||
|
||||
// x += newImage.width + 20;
|
||||
// if (x > 700)
|
||||
// {
|
||||
// x = 32;
|
||||
// y += 332;
|
||||
// }
|
||||
},
|
||||
|
||||
loadComplete: function(progress, cacheKey, success, totalLoaded, totalFiles) {
|
||||
// this.preloadBar.alpha = 1;
|
||||
|
||||
// if(isDebugMode()) {
|
||||
// this.state.start('Login');
|
||||
// return;
|
||||
// }
|
||||
|
||||
this.state.start('Simulator');
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
/////////////////////////////
|
||||
// Main game
|
||||
|
||||
var CONTENT_ID = "ITQ Simulator";
|
||||
|
||||
var game = new Phaser.Game(
|
||||
GAME_SCREEN_SIZE.x, GAME_SCREEN_SIZE.y,
|
||||
Phaser.CANVAS, CONTENT_ID,
|
||||
this, false, false
|
||||
);
|
||||
|
||||
game.state.add('Loading', Loading);
|
||||
game.state.add('Simulator', Simulator);
|
||||
|
||||
game.state.start('Loading');
|
||||
@@ -0,0 +1,24 @@
|
||||
var GAME_SCREEN_SIZE = { x: 1024, y: 768 }
|
||||
|
||||
var Simulator = {
|
||||
|
||||
create: function() {
|
||||
game.stage.backgroundColor = "#4d4d4d";
|
||||
|
||||
// keyboard shortcut
|
||||
this.keyboardShortcut = new KeyboardShortcut();
|
||||
this.keyboardShortcut.addCallback(
|
||||
Phaser.KeyCode.ESC, // keyCode
|
||||
null, // keyDownHandler
|
||||
(function() { this.back(); }).bind(this), // keyUpHandler
|
||||
"keyboard_test" // callerClassName
|
||||
);
|
||||
|
||||
this.fullscreenButton = new FullscreenButton();
|
||||
|
||||
},
|
||||
|
||||
back: function() {
|
||||
},
|
||||
|
||||
}
|
||||
@@ -62,7 +62,7 @@
|
||||
<script src="../../game/lib/experience_app_timer.js"></script>
|
||||
<script src="../../game/lib/stage_timer.js"></script>
|
||||
|
||||
<!-- Space Invaders : source files -->
|
||||
<!-- Grilled meat : source files -->
|
||||
<script src="../../game/mouse/grilled_meat/loading.js"></script>
|
||||
|
||||
<script src="../../game/mouse/grilled_meat/god.js"></script>
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
<meta charset="UTF-8">
|
||||
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-85912788-2"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', 'UA-85912788-2');
|
||||
</script>
|
||||
|
||||
<!-- Google Tag Manager -->
|
||||
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
|
||||
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
||||
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
||||
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
|
||||
})(window,document,'script','dataLayer','GTM-N8PB4F3');</script>
|
||||
<!-- End Google Tag Manager -->
|
||||
|
||||
<title>ITQ 시뮬레이터 | 초코마에</title>
|
||||
<meta name="description" CONTENT="ITQ 시험장 사전 연습 앱 | 초코마에 ‧ ITQ license test simulation app | ChocoMae">
|
||||
|
||||
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
|
||||
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
|
||||
|
||||
<link href="../../../resources/font/open-iconic-master/font/css/open-iconic-bootstrap.css" rel="stylesheet">
|
||||
<link href="../../../resources/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
||||
|
||||
<!-- <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script> -->
|
||||
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/phaser/2.6.2/phaser.js"></script> -->
|
||||
<script src="../../../resources/js/phaser.min.js"></script>
|
||||
|
||||
|
||||
<!-- library source files -->
|
||||
<script src="../../game/lib/button/round_rect_button.js"></script>
|
||||
<script src="../../game/lib/button/fullscreen_button.js"></script>
|
||||
<script src="../../game/lib/keyboard_shortcut.js"></script>
|
||||
|
||||
<!-- ITQ simulator : source files -->
|
||||
<script src="../../game/license_simulator/itq/loading.js"></script>
|
||||
<script src="../../game/license_simulator/itq/simulator.js"></script>
|
||||
<script src="../../game/license_simulator/itq/main.js"></script>
|
||||
|
||||
|
||||
<style>
|
||||
body{
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
canvas{
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="ITQ Simulator" style="text-align:center;" ></div>
|
||||
|
||||
<div style="margin-top: 20px; text-align:center;">
|
||||
앱이 실행되지 않으면, 브라우저의 새로 고침 버튼( <span class="oi oi-reload" title="icon reload" aria-hidden="true"></span> , 단축키 : Ctrl + R)을 눌러주세요.<br/>
|
||||
(그래도 실행되지 않을때에는, Ctrl + Shift + R 을 눌러서 브라우저 캐시 삭제를 실행해 주세요)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user