This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var canvasNode = document.getElementById(cc.game.config["id"]); | |
| canvasNode.style.backgroundColor = "transparent"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| expect = chai.expect | |
| Effect = require '../../app/greatEffect' | |
| Sys = require '../../app/gamesys' | |
| utils = require './utils' | |
| describe 'GreatEffect class test', ()-> | |
| capNum = 0 | |
| sys = new Sys 640, 480 | |
| res = | |
| greatEffect : |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class GreatEffect | |
| constructor : (@_sys, @_res)-> | |
| @_effects = [] | |
| @_index = 0 | |
| init : (num)-> | |
| for i in [0...num] | |
| effect = @_sys.createSprite @_res.width, @_res.height, @_res.src | |
| effect.y = -100 | |
| @_sys.getFrame 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "watchify_test", | |
| "version": "0.0.1", | |
| "description": "", | |
| "main": "main.js", | |
| "scripts": { | |
| "test": "echo \"Error: no test specified\" && exit 1" | |
| }, | |
| "author": "bokuweb", | |
| "license": "MIT", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| gulp = require 'gulp' | |
| watchify = require 'gulp-watchify' | |
| plumber = require 'gulp-plumber' | |
| rename = require 'gulp-rename' | |
| gulp.task 'watchify', watchify (watchify)-> | |
| gulp.src 'src/main.coffee' | |
| .pipe plumber() | |
| .pipe watchify | |
| watch : on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| gulp = require 'gulp' | |
| coffee = require 'gulp-coffee' | |
| watchify = require 'gulp-watchify' | |
| plumber = require 'gulp-plumber' | |
| runSequence = require 'run-sequence' | |
| .use gulp | |
| gulp.task 'build:coffee', -> | |
| gulp.src 'src/*.coffee' | |
| .pipe plumber() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| res = require('./resource').res | |
| music = require('./music') | |
| Note = require('./note') | |
| Timer = require('./timer') | |
| GameOver = require('./gameOver') | |
| GameLayer = cc.Layer.extend | |
| _keyNum : 5 | |
| _margin : 60 | |
| _offset : 38 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| res = require('./resource').res | |
| music = require('./music') | |
| Note = require('./note') | |
| Timer = require('./timer') | |
| GameOver = require('./gameOver') | |
| GameLayer = cc.Layer.extend | |
| _keyNum : 5 | |
| _margin : 60 | |
| _offset : 38 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| res = require('./resource').res | |
| music = require('./music') | |
| Note = require('./note') | |
| Timer = require('./timer') | |
| GameOver = require('./gameOver') | |
| GameLayer = cc.Layer.extend | |
| _keyNum : 5 | |
| _margin : 60 | |
| _offset : 38 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| res = require('./resource').res | |
| music = require('./music') | |
| Note = require('./note') | |
| Timer = require('./timer') | |
| GameOver = require('./gameOver') | |
| GameLayer = cc.Layer.extend | |
| _keyNum : 5 | |
| _margin : 60 | |
| _offset : 38 |