Commit a5553149 authored by 汪欢's avatar 汪欢

123

parent 21a3813f
This diff is collapsed.
This diff is collapsed.
...@@ -179,6 +179,8 @@ export default class GameTest extends engine.Container { ...@@ -179,6 +179,8 @@ export default class GameTest extends engine.Container {
var boardPointBody:p2.Body = new p2.Body({ var boardPointBody:p2.Body = new p2.Body({
position:[100/this.factor,800/this.factor] position:[100/this.factor,800/this.factor]
}) })
boardPointBody.addShape(boardPoint);
boardPointBody.displays = []
// 篮球 // 篮球
var boxShape: p2.Shape = new p2.Circle({radius: 60 / this.factor}); var boxShape: p2.Shape = new p2.Circle({radius: 60 / this.factor});
......
...@@ -52,15 +52,9 @@ function launchWithCustomModule(customModule) { ...@@ -52,15 +52,9 @@ function launchWithCustomModule(customModule) {
engine.globalEvent.dispatchEvent('pictures-start', { engine.globalEvent.dispatchEvent('pictures-start', {
picUrl: "http://yun.duiba.com.cn/aurora/assets/e1593b97c27077b85b92f7eaaeae1ed64a1eb79a.png", picUrl: "http://yun.duiba.com.cn/aurora/assets/e1593b97c27077b85b92f7eaaeae1ed64a1eb79a.png",
blockUrl: "888", blockUrl: "888",
<<<<<<< HEAD
row: 3,
column: 3,
gameTime: 50
=======
column:"2", column:"2",
row:"2", row:"2",
gameTime:"50" gameTime:"50"
>>>>>>> 33823dbdb9c3b079aa71a545ab5472146df6429b
}); });
const d = engine.gameStage.sceneContainer.getChildAt(0); const d = engine.gameStage.sceneContainer.getChildAt(0);
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
function injectProps(p) { function injectProps(p) {
engine.injectProp(props, p); engine.injectProp(props, p);
} }
//# sourceMappingURL=props.js.map
var picMap = {}; var picMap = {};
var posMap = {}; var posMap = {};
...@@ -64,6 +65,7 @@ ...@@ -64,6 +65,7 @@
posMap[url] = pos.concat([]); posMap[url] = pos.concat([]);
return [spr, pos]; return [spr, pos];
}); });
//# sourceMappingURL=qietu.js.map
function getIndexFromRC(row, col, maxCol) { function getIndexFromRC(row, col, maxCol) {
var index; var index;
...@@ -75,6 +77,7 @@ ...@@ -75,6 +77,7 @@
return .5 - Math.random(); return .5 - Math.random();
}); });
} }
//# sourceMappingURL=utils.js.map
var MAX_COL; var MAX_COL;
var MAX_ROW; var MAX_ROW;
...@@ -95,9 +98,9 @@ ...@@ -95,9 +98,9 @@
} }
GameView.prototype.start = function () { GameView.prototype.start = function () {
var _this = this; var _this = this;
MAX_COL = props.column || props.MAX_COL; MAX_COL = props.MAX_COL;
MAX_ROW = props.row || props.MAX_ROW; MAX_ROW = props.MAX_ROW;
GAME_TIME = props.gameTime || props.GAME_TIME; GAME_TIME = props.GAME_TIME;
console.log('start', props.column, props.row, props.gameTime); console.log('start', props.column, props.row, props.gameTime);
if (!this.guideHole) { if (!this.guideHole) {
this.guideHole = new engine.Image(); this.guideHole = new engine.Image();
...@@ -151,7 +154,7 @@ ...@@ -151,7 +154,7 @@
if (GAME_TIME < 10) { if (GAME_TIME < 10) {
GAME_TIME = '0' + GAME_TIME; GAME_TIME = '0' + GAME_TIME;
} }
console.log(GAME_TIME); console.log(GAME_TIME, "gametime1");
engine.globalEvent.dispatchEvent('pictures-time-update', { engine.globalEvent.dispatchEvent('pictures-time-update', {
second: this.getSecond(), second: this.getSecond(),
}); });
...@@ -187,10 +190,7 @@ ...@@ -187,10 +190,7 @@
MAX_COL = props.MAX_COL; MAX_COL = props.MAX_COL;
MAX_ROW = props.MAX_ROW; MAX_ROW = props.MAX_ROW;
GAME_TIME = props.GAME_TIME; GAME_TIME = props.GAME_TIME;
<<<<<<< HEAD
console.log(GAME_TIME, 'setuptime'); console.log(GAME_TIME, 'setuptime');
=======
>>>>>>> 33823dbdb9c3b079aa71a545ab5472146df6429b
W = props.W; W = props.W;
H = props.H; H = props.H;
GAP = props.GAP; GAP = props.GAP;
...@@ -296,6 +296,7 @@ ...@@ -296,6 +296,7 @@
}; };
return GameWrapper; return GameWrapper;
}(engine.Container)); }(engine.Container));
//# sourceMappingURL=GameWrapper.js.map
function index (props) { function index (props) {
prepareProps(); prepareProps();
...@@ -303,6 +304,7 @@ ...@@ -303,6 +304,7 @@
var instance = new GameWrapper(); var instance = new GameWrapper();
return instance; return instance;
} }
//# sourceMappingURL=index.js.map
return index; return index;
......
This diff is collapsed.
/** //Created by rockyl on 2018/8/16.
* Created by rockyl on 2018/8/16.
*/
import { props } from "../props";
import qietu from "./qietu"; import qietu from "./qietu";
import { getIndexFromRC, getRandomArray, getTexture } from "./utils"; import { getIndexFromRC, getRandomArray, getTexture } from "./utils";
import {props} from '../props'
import ObjectPool = engine.ObjectPool; import ObjectPool = engine.ObjectPool;
// let OFFSET_X; // let OFFSET_X;
...@@ -27,27 +24,16 @@ export default class GameView extends engine.Container { ...@@ -27,27 +24,16 @@ export default class GameView extends engine.Container {
private date private date
start() { start() {
<<<<<<< HEAD
<<<<<<< HEAD
=======
//优先获取start事件接收到的参数
>>>>>>> 2533efe07c13d1586974175c8874bc3dad71643a
=======
//优先获取start事件接收到的参数
>>>>>>> 33823dbdb9c3b079aa71a545ab5472146df6429b
MAX_COL = props.column || props.MAX_COL;
MAX_ROW = props.row || props.MAX_ROW;
GAME_TIME = props.gameTime || props.GAME_TIME;
console.log('start',props.column,props.row,props.gameTime)
<<<<<<< HEAD
<<<<<<< HEAD
=======
>>>>>>> 2533efe07c13d1586974175c8874bc3dad71643a //优先获取start事件接收到的参数
=======
>>>>>>> 33823dbdb9c3b079aa71a545ab5472146df6429b // MAX_COL = props.column || props.MAX_COL;
// MAX_ROW = props.row || props.MAX_ROW;
// GAME_TIME = props.gameTime || props.GAME_TIME;
MAX_COL = props.MAX_COL;
MAX_ROW = props.MAX_ROW;
GAME_TIME = props.GAME_TIME;
console.log('start',props.column,props.row,props.gameTime)
if (!this.guideHole) { if (!this.guideHole) {
this.guideHole = new engine.Image(); this.guideHole = new engine.Image();
this.guideHole.source = 'asset://' + props.blockUrl; this.guideHole.source = 'asset://' + props.blockUrl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment