Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ゲームの画面サイズをちょっと広くするよ #19

Merged
merged 4 commits into from
Dec 31, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion public/cocos2d.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
box2d:false,
chipmunk:false,
showFPS:true,
frameRate:60,
frameRate:30,
loadExtension:false,
renderMode:0, //Choose of RenderMode: 0(default), 1(Canvas only), 2(WebGL only)
tag:'gameCanvas', //the dom element to run cocos2d on
Expand Down
7 changes: 5 additions & 2 deletions public/css/layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@
#bq-canvas-container {
position: relative;
overflow: hidden;
width: 800px;
height: 450px;
width: 1040px;
height: 680px;
margin: 0px auto;
-moz-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
}

.bq-menu {
Expand Down
2 changes: 1 addition & 1 deletion public/js/src/entity/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @type {*|void|Object|Function}
*/
var Player = Entity.extend({
moveSpeed: 2, // 1frameの移動量(px)
moveSpeed: 4, // 1frameの移動量(px)
animationSpeed:0.15, // delay on animation
direction: EntityState.Direction.bottom, // 向いている方向
state:EntityState.Mode.stop, // 動いてるとか止まってるとかの状態
Expand Down
2 changes: 1 addition & 1 deletion public/js/src/entityManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ bq.EntityManager = cc.Class.extend({
if (!this.otherPlayers_[moveData.userId]) {
this.createOtherPlayer(moveData);
} else {
var act = cc.MoveTo.create(0.1, cc.p(moveData.x, moveData.y));
var act = cc.MoveTo.create(0.2, cc.p(moveData.x, moveData.y));
var otherPlayer = this.otherPlayers_[moveData.userId];
otherPlayer.runAction(act);
}
Expand Down
20 changes: 5 additions & 15 deletions public/js/src/scene/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,15 @@ var LoginLayer = cc.Layer.extend({
onEnter: function() {
this._super();
var size = cc.Director.getInstance().getWinSize();
var title = bq.Label.createWithShadow('- Beam Quest -', 50);
title.setPosition(cc.p(size.width/2, size.height - 100));
this.addChild(title);

var label = bq.Label.create('キャラクター名を入力してください。', 16);
label.setPosition(cc.p(size.width/2, size.height/2 + 50));
this.addChild(label);

var nameField = cc.TextFieldTTF.create(this.defaultPlaceHolder_, 'pixelMplus', 16);
var nameField = cc.TextFieldTTF.create(this.defaultPlaceHolder_, 'pixelMplus', 32);
this.addChild(nameField);
nameField.setPosition(cc.p(size.width / 2, size.height / 2));
this.nameField_ = nameField;
Expand Down Expand Up @@ -95,20 +99,6 @@ var LoginLayer = cc.Layer.extend({
this.addChild(failedLabel);
},

/**
* 入力されたUserIDが正しいか判定する
* @param {string} userId
* @return {boolean}
* @private
*/
isValidUserId_: function(userId) {
var valid = true;
// TODO: 条件増やす
valid = (userId.length > 0);

return valid;
},

/**
* パスワードの代わりにランダムハッシュを使う
* @return {string}
Expand Down
4 changes: 2 additions & 2 deletions public/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ var cocos2dApp = cc.Application.extend({
var director = cc.Director.getInstance();

// cc.EGLView.getInstance()._adjustSizeToBrowser();
//cc.EGLView.getInstance()._resizeWithBrowserSize(true);
//cc.EGLView.getInstance().setDesignResolutionSize(640, 450, cc.RESOLUTION_POLICY.SHOW_ALL);
// cc.EGLView.getInstance()._resizeWithBrowserSize(true);
cc.EGLView.getInstance().setDesignResolutionSize(1040, 680, cc.RESOLUTION_POLICY.SHOW_ALL);

// turn on display FPS
director.setDisplayStats(this.config['showFPS']);
Expand Down