Skip to content

Commit

Permalink
Merge pull request #84 from soltycabbage/feature/death-motion
Browse files Browse the repository at this point in the history
リソース周りを整理といろいろリファクタ
  • Loading branch information
iwag committed Feb 14, 2014
2 parents 89b3dba + 2a4b20e commit 0c75a30
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 26 deletions.
2 changes: 1 addition & 1 deletion public/js/src/beam/beam.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ bq.beam.Beam.createParticleBeam = function(beamType, shooterId, tag) {
beamType2Partile[bq.Types.Beams.METEOR] = cc.ParticleMeteor;

var particle = beamType2Partile[beamType];
var myTexture = cc.TextureCache.getInstance().textureForKey(s_beam0);
var myTexture = cc.TextureCache.getInstance().textureForKey(s_Beam0);

particle.setTexture(myTexture);
particle.setPosition(cc.p(0,0));
Expand Down
2 changes: 1 addition & 1 deletion public/js/src/entity/entity.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ bq.entity.Entity = cc.Sprite.extend({
tt.setPosition(cc.p(msgRect.getBoundingBox().getWidth() / 2, 10));

// 吹き出しのしっぽみたいなやつ
var tail = cc.Sprite.create(s_ChatTail);
var tail = cc.Sprite.create(s_ImgChatTail);
tail.setColor(cc.c3b(0, 0, 0));
tail.setOpacity(200);
tail.setPosition(cc.p(msgRect.getBoundingBox().getWidth() / 2, -3));
Expand Down
47 changes: 25 additions & 22 deletions public/js/src/resource.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,28 @@
// 設定値とかを入れる。
bq.beams = [];

// Note. 各種接頭辞をつけてね。(ex. 画像ならs_Img)

// img
var s_Player = 'res/img/player.png';
var s_ChatTail = 'res/img/chat_tail.png';
var s_PlayerWalkingImg = 'res/img/walk_anime.png';
var s_beam0 = 'res/img/star.png'; // TODO s_Beam0 にする (iwg)
var s_SimpleBeamImg = 'res/img/simple_beam.png';
var s_smoke0 = 'res/img/smoke.png'; // TODO s_Smoke0 にする (iwg)
var s_ImgPlayer = 'res/img/player.png';
var s_ImgChatTail = 'res/img/chat_tail.png';
var s_ImgPlayerWalking = 'res/img/player/walk.png';
var s_ImgBeam0 = 'res/img/beam/star.png';
var s_ImgSimpleBeam = 'res/img/beam/simple.png';
var s_ImgSmoke0 = 'res/img/beam/smoke.png';

// tmx
var s_ShinjukuTmx = 'res/map/shinjuku.tmx';
var s_ShinjukuMapSet= 'res/map/shinjuku_mapset.png';
var s_StartVillageTmx = 'res/map/map_village.tmx';
var s_StartVillageMapSet= 'res/map/tile_village.png';
var s_SmallVillageTmx = 'res/map/map_small_village.tmx';
var s_SmallVillageMapSet = 'res/map/tile_small_village.png';
// TODO s_Tmx, s_Tile はじまりにへんこー
var s_ShinjukuTmx = 'res/map/shinjuku.tmx';
var s_ShinjukuMapSet = 'res/map/shinjuku_mapset.png';
var s_StartVillageTmx = 'res/map/map_village.tmx';
var s_StartVillageMapSet = 'res/map/tile_village.png';
var s_SmallVillageTmx = 'res/map/map_small_village.tmx';
var s_SmallVillageMapSet = 'res/map/tile_small_village.png';

// plist
var s_PlayerWalkingPlist = 'res/img/walk_anime.plist';
var s_SimpleBeamPlist = 'res/img/simple_beam.plist';
var s_PlistPlayerWalking = 'res/img/player/walk.plist';
var s_PlistSimpleBeam = 'res/img/beam/simple.plist';

// sounds
var s_BgmField = 'res/sounds/Field.m4a';
Expand All @@ -34,19 +37,19 @@ var s_SeNoDamage = 'res/sounds/NoDamage.mp3';

var g_resources = [
//img
{type: 'image', src:s_Player},
{type: 'image', src:s_ImgPlayer},
//{type: 'image', src:s_ShinjukuMapSet},
{type: 'image', src:s_StartVillageMapSet},
{type: 'image', src:s_SmallVillageMapSet},
{type: 'image', src:s_ChatTail},
{type: 'image', src:s_PlayerWalkingImg},
{type: 'image', src:s_beam0},
{type: 'image', src:s_smoke0},
{type: 'image', src:s_SimpleBeamImg},
{type: 'image', src:s_ImgChatTail},
{type: 'image', src:s_ImgPlayerWalking},
{type: 'image', src:s_ImgBeam0},
{type: 'image', src:s_ImgSmoke0},
{type: 'image', src:s_ImgSimpleBeam},

//plist
{type: 'plist', src:s_PlayerWalkingPlist},
{type: 'plist', src:s_SimpleBeamPlist},
{type: 'plist', src:s_PlistPlayerWalking},
{type: 'plist', src:s_PlistSimpleBeam},

//fnt

Expand Down
4 changes: 2 additions & 2 deletions public/js/src/scene/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ bq.scene.LoginLayer = cc.Layer.extend({
// TODO: このクラスでframeCacheにセットするのはハイパー違和感があるので初期設定用のクラスとか作ってやりたい
// init frame cache
var frameCache = cc.SpriteFrameCache.getInstance();
frameCache.addSpriteFrames(s_PlayerWalkingPlist, s_PlayerWalkingImg);
frameCache.addSpriteFrames(s_PlistPlayerWalking, s_ImgPlayerWalking);
// FIXME ハイパー違和感2、誰か直して〜
frameCache.addSpriteFrames(s_SimpleBeamPlist, s_SimpleBeamImg);
frameCache.addSpriteFrames(s_PlistSimpleBeam, s_ImgSimpleBeam);

var player = new bq.entity.Player();
var hud = bq.Hud.getInstance();
Expand Down
Binary file removed public/res/img/akeome.png
Binary file not shown.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
Binary file removed public/res/img/iwa.png
Binary file not shown.
File renamed without changes.
File renamed without changes

0 comments on commit 0c75a30

Please sign in to comment.