Home | History | Annotate | Download | only in resources

Lines Matching defs:Obstacle

144     {name: 'CACTUS_LARGE', id: '1x-obstacle-large'},
145 {name: 'CACTUS_SMALL', id: '1x-obstacle-small'},
153 {name: 'CACTUS_LARGE', id: '2x-obstacle-large'},
154 {name: 'CACTUS_SMALL', id: '2x-obstacle-small'},
950 * @param {!Obstacle} obstacle
956 function checkForCollision(obstacle, tRex, opt_canvasCtx) {
957 var obstacleBoxXPos = Runner.defaultDimensions.WIDTH + obstacle.xPos;
968 obstacle.xPos + 1,
969 obstacle.yPos + 1,
970 obstacle.typeConfig.width * obstacle.size - 2,
971 obstacle.typeConfig.height - 2);
980 var collisionBoxes = obstacle.collisionBoxes;
1085 * Obstacle.
1087 * @param {Obstacle.type} type
1093 function Obstacle(canvasCtx, type, obstacleImg, dimensions,
1100 this.size = getRandomNum(1, Obstacle.MAX_OBSTACLE_LENGTH);
1116 Obstacle.MAX_GAP_COEFFICIENT = 1.5;
1119 * Maximum obstacle grouping count.
1122 Obstacle.MAX_OBSTACLE_LENGTH = 3,
1125 Obstacle.prototype = {
1127 * Initialise the DOM for the obstacle.
1182 * Obstacle frame update.
1207 var maxGap = Math.round(minGap * Obstacle.MAX_GAP_COEFFICIENT);
1212 * Check if obstacle is visible.
1213 * @return {boolean} Whether the obstacle is in the game area.
1221 * obstacle type and size.
1236 * Obstacle definitions.
1240 Obstacle.types = [
1833 * Similar to an obstacle object but without collision boxes.
2159 * Update the obstacle positions.
2168 var obstacle = this.obstacles[i];
2169 obstacle.update(deltaTime, currentSpeed);
2172 if (obstacle.remove) {
2195 * Add a new obstacle.
2200 getRandomNum(0, Obstacle.types.length - 1);
2201 var obstacleType = Obstacle.types[obstacleTypeIndex];
2204 this.obstacles.push(new Obstacle(this.canvasCtx, obstacleType,