水浒神兽攻略接水果游戏怎样才算完成

当前位置:
接水果小游戏
原创共享素材
编号:上传时间:大小:1.072 M
分辨率:300dpi
尺寸:00像素 格式:FLA (CS5)颜色:CMYK
扫一扫,下载知聊
关&键&词:Flash 接水果 小游戏 源文件 绿色
多媒体 Flash动画 交互游戏 300DPI FLA
作品描述:
&昵图网所有作品均是用户自行上传分享并拥有版权或使用权,仅供网友学习交流,未经上传用户书面授权,请勿作他用。若您的权利被侵害,请联系 。
商用正版图片小霸王游戏 水浒神兽
小霸王游戏 水浒神兽游戏介绍
小霸王游戏需要FC模拟器,必须使用FC模拟器才可以玩
下载地址 /danjiyouxi/26760.html
小霸王游戏 水浒神兽下载地址
您可能还会喜欢Js实现的接水果游戏 | 科博网-钟科的个人博客Js实现的接水果游戏发布时间: 14:34:59编辑:Mr.Co阅读(727)
&& 很久之前写的一个JS小游戏,纯属娱乐,主要靠键盘左右键控制贪吃狗移动,每种水果分数不一样,分数越高等级越高,等级越高速度越快,这就需要靠你的移动技巧了,当然水果中还潜藏着炸弹跟导弹。要小心哦!!
&!DOCTYPE html&
&meta http-equiv="Content-Type" content="text/ charset=utf-8"/&
&title&接水果-科博网-Mr.Co个人博客&/title&
&meta name="Author" content="Mr.Co" /&
&style type='text/css'&
padding: 0
background:
.game_container {
width: 500
height: 530
left: 50%;
margin-left: -250
margin-top: -265
border: 2px solid #000;
#game_info {
height: 530
background: #
border-right: 1px solid #000;
#game_info dl {
list-style:
margin-top: 10
#game_info dl dt {
font-weight:
font-family: '微软雅黑';
font-size: 14
text-indent: 10
text-shadow: 1px 1px #
#game_info dl dd {
font-size: 12
line-height: 30
text-align:
#game_info #gameCent, #game_info #gameLevel {
font-weight:
text-shadow: 2px 1px #
color: #0000
font-size: 16
font-family: '微软雅黑';
margin: 0 2
#game_info #gameLevel {
#game_info .life_bar_box {
display: inline-
margin-left: 8
height: 12
border: 1px solid #000;
box-shadow: 2px 1px 5px #
border-radius: 2px 2
line-height:
_overflow:
#game_info #lifeBar {
display: inline-
height: 10
background:
margin-left: 1
box-shadow: 1px 1px 10px #
#game_info #lifeBar.yellow {
background: #ef9c26;
#game_info #lifeBar.red {
background:
#game_box {
width: 400
height: 500
border: 1px solid #00415e;
background: url(images/bg.jpg) no-repeat -600px -160
#game_box .bg_layer {
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.3);
z-index: 2;
.car_bar {
width: 100%;
height: 70
z-index: 9;
.car_bar .car {
height: 70
background: #b6d152;
background: url(images/jie.png) no-
height: 30
z-index: 10;
#game_box .tip_box {
display: inline-
background: url(images/kiss.png) no-
height: 16
z-index: 11;
#game_box .tip_box.miss {
background-position: 0px 0
#game_box .tip_box.kiss {
background-position: 0px -18
#game_box .tip_box.bomb {
background-position: 0px -37
height: 61
#game_box .upgrade_tip, #game_box .game_over_tip {
display: inline-
z-index: 12;
font-family: '华文琥珀', '微软雅黑', '宋体';
font-size: 36
color: #ffd800;
font-style:
text-shadow: 1px 1px 5px #
width: 100%;
height: 40
margin-top: -20
text-align:
#game_box .game_over_tip {
text-shadow: 1px 1px 5
font-family: 'Showcard Gothic';
#game_control {
width: 400
background: #a9a9a9;
height: 30
line-height: 30
text-align:
#game_control button {
margin-right: 10
height: 30
&div class='game_container'&
&!--游戏信息 start--&
&div id='game_info'&
&dt&生命力&/dt&
&dd style='text-align:'&
&div class='life_bar_box'&&span id='lifeBar'&&/span&&/div&
&dt&当前玩家&/dt&
&dd&西门吹雪&/dd&
&dt&当前关卡&/dt&
&dd&第&strong id='gameLevel'&1&/strong&关&/dd&
&dt&当前得分&/dt&
&dd id='gameCent'&0&/dd&
&dt&操控说明&/dt&
&dd style='line-height:'&使用"→"跟"←"来控制移动,要小心导弹、炸弹&/dd&
&!--游戏信息 end--&
&!--游戏屏幕 start--&
&div id='game_box'&
&div class='bg_layer'&&/div&
&!--&span class='game_over_tip'&Game Over!&/span&--&
&div class='car_bar'&
&div id='carBox' class='car'&&/div&
&!--游戏屏幕 end--&
&!--游戏控制 start--&
&div id='game_control'&
&button id='btnStart'&开始&/button&
&button id='btnPause'&暂停&/button&
&!--游戏控制 end--&
&script type='text/javascript' src='jquery.js'&&/script&
&script type='text/javascript' src='game.js'&&/script&
&script type='text/javascript'&
$(function () {
$('#btnStart').click(function () {
FruitGame.Start();
JS代码: &&
* 接水果-游戏
* User: MrCo
* Date: 14-4-22
* Time: 下午3:25
* Version:1.0
(function(window,undefined){
* 水果游戏初始化对象
var fruitGame = function(args){
/*水果类型*/
this.FruitList = [
{ ID:'F1', FruitName:'桃子',Icon:'images/1.png',Cent:50 },
{ ID:'F2', FruitName:'苹果',Icon:'images/2.png',Cent:50 },
{ ID:'F3', FruitName:'梨子',Icon:'images/3.png',Cent:50 },
{ ID:'F4', FruitName:'西红柿',Icon:'images/4.png',Cent:30 },
{ ID:'F5', FruitName:'香蕉',Icon:'images/5.png',Cent:30 },
{ ID:'F6', FruitName:'芒果',Icon:'images/6.png',Cent:50 },
{ ID:'F7', FruitName:'橘子',Icon:'images/7.png',Cent:30 },
{ ID:'F8', FruitName:'杏子',Icon:'images/8.png',Cent:20 },
{ ID:'F9', FruitName:'草莓',Icon:'images/9.png',Cent:10 },
{ ID:'F10', FruitName:'樱桃',Icon:'images/10.png',Cent:10 },
{ ID:'F11', FruitName:'柠檬',Icon:'images/11.png',Cent:30 },
{ ID:'F12', FruitName:'西瓜',Icon:'images/12.png',Cent:60 },
{ ID:'F13', FruitName:'火龙果',Icon:'images/13.png',Cent:100 },
{ ID:'F14', FruitName:'菠萝',Icon:'images/14.png',Cent:80 }
/*炸弹类型*/
this.BombList = [
{ ID:'B1',BombName:'土雷',Icon:'images/15.png',Life:10 },
{ ID:'B2',BombName:'导弹',Icon:'images/16.png',Life:40 }
/*关卡等级*/
this.LevelList = [
{ Level:1,Cent:1000,Speed:1000 },
{ Level:2,Cent:2000,Speed:600 },
{ Level:3,Cent:6000,Speed:400 },
{ Level:4,Cent:12000,Speed:200 }
/*生成水果炸弹的全局引用*/
this.BuilderFruit =
/*水果炸弹往下移动的全局引用*/
this.FruitMove =
/*全局参数设置*/
this.Setting = $.extend({
//游戏盒子
GameBox:$('div#game_box'),
CarBox:$('div#carBox'),
//水果篮移动像素
CarMoveWidth:30,
//水果篮宽度
CarBoxWidth:$('div#carBox').width(),
//游戏盒子宽度
BoxWidth:400,
//游戏盒子高度
BoxHeight:500,
//水果宽度
FruitWidth:30,
//当前总得分
CountCent:0,
//当前关卡级别
LevelNum:1,
//当前关卡级别-升级监听变量
ListenerLevelNum:1,
//玩家姓名
UserName:'张三',
//玩家总血量
LifeSize:80,
//是否暂停
Pause:false,
//是否开始
Start:false
* 获取游戏等级对象
fruitGame.prototype.GetLevelModel = function(level){
var _levels = this.LevelList,
for(var i = 0, _count = _levels. i & _ i++){
_levelObj = _levels[i];
if(_levelObj.Level == level)
return _levelO
* 随机获得水果类型,哈哈,有可能是炸弹
fruitGame.prototype.GetRandomFruit = function(){
var _this = this,
_fruitCount = 0,
_fruitIndex = 0,
_fruitList = _this.FruitList.concat(_this.BombList);
_fruitCount = _fruitList.
_fruitIndex = parseInt(Math.random() * _fruitCount);
return _fruitList[_fruitIndex];
* 游戏等级监听器
fruitGame.prototype.GameLevelListener = function(){
var _this = this,
_countCent = _this.Setting.CountCent,
_levelList = _this.LevelList,
for(var i = 0,_count = _levelList. i & _ i++){
_levelObj = _levelList[i];
if(_levelObj.Cent &= _countCent){
if(_levelObj.Level & _this.Setting.ListenerLevelNum){
_this.Setting.ListenerLevelNum = _levelObj.L
_this.ShowUpgrade(_levelObj.Level);
$('#gameLevel').text(_levelObj.Level);
_this.Setting.LevelNum = _levelObj.L
* 显示提示框,Miss,Kiss,Bomb
* @type int miss ,kiss, bomb
* @position object { X:0,Y:0 }
fruitGame.prototype.ShowTipBox = function(type,position){
var _this = this,
_tipBoxID = Math.random().toString().replace('.',''),
_tipBox = '&i id="'+ _tipBoxID +'" class="tip_box '+ type +'" style=" left:' + position.X + ' top:' + position.Y + '"&&/i&';
_this.Setting.GameBox.append(_tipBox);
setTimeout(function(){
$('#' + _tipBoxID).remove();
* 升级提示框
* @level int 等级
fruitGame.prototype.ShowUpgrade = function(level){
var _this = this,
_tipBox = '&span class="upgrade_tip"&第'+ level +'关,加油!&/span&';
_this.Setting.GameBox.append(_tipBox);
setTimeout(function(){
$('span.upgrade_tip').remove();
* 绑定控制水果篮的左右移动
fruitGame.prototype.BindControlMove = function(){
var _this =
$(window).keydown(function(e){
var _code = e.keyC
if(_code == 37)
_this.CarBoxMove('left');
if(_code == 39)
_this.CarBoxMove('right');
* 水果篮位置
fruitGame.prototype.CarBoxMove = function(action){
var _this = this,
_setting = _this.Setting,
_left = _setting.CarBox.position().
if(action == 'left'){
_left = _left - _setting.CarMoveW
if(_left & 0)
$('div#carBox').css({ left:_left + 'px' });
if(action == 'right'){
if(_left &
_setting.BoxWidth - _setting.CarBoxWidth)
_left = _left + _setting.CarMoveW
$('div#carBox').css({ left:_left + 'px' });
* 生成水果的X位置
fruitGame.prototype.BuilderFruitPosition = function(){
var _setting = this.Setting,
_left = parseInt(Math.random() * _setting.BoxWidth);
return _left & _setting.BoxWidth - _setting.FruitWidth ? _setting.BoxWidth - _setting.FruitWidth : _
* 控制水果下落
fruitGame.prototype.FruitDownMove = function(element){
var _this = this,
_setting = this.S
var _move = setInterval(function(){
var _$element = $(element),
_top = _$element.position().
_$element.css({ top:(_top + _setting.FruitWidth) + 'px' });
_this.FruitPutCount(_$element,_move);
},this.GetLevelModel(_setting.LevelNum).Speed / 2);
* 水果炸弹,血量减少
fruitGame.prototype.FruitBomb = function(life){
var _this = this,
_$lifeBar = $('#lifeBar'),
_lifeSize = _$lifeBar.width();
_lifeSize -=
if(_lifeSize &= 0){
_$lifeBar.animate({width:_lifeSize + 'px'},100,function(){
$('div.thing').remove();
_this.Setting.GameBox.append('&span class="game_over_tip"&Game Over!&/span&');
clearInterval(this.BuilderFruit);
_$lifeBar.animate({width:_lifeSize + 'px'},100,function(){
if(_lifeSize &= _this.Setting.LifeSize / 1.5)
_$lifeBar.removeAttr('class').addClass('yellow');
if(_lifeSize &= _this.Setting.LifeSize / 2)
_$lifeBar.removeAttr('class').addClass('red');
* 水果爆炸后,抖动屏幕
fruitGame.prototype.FruitBombShock = function(){
var _this = this,
_$gameBox = _this.Setting.GameBox.parent(),
_x = _$gameBox.position().left,
_y = _$gameBox.position().top,
_shockWidth = 5,
_shockHeight = 1,
_shockCount = 0;
var _shock = setInterval(function(){
if(_shockCount &= 10){
_$gameBox.css({ left:_x + 'px', top:_y + 'px'});
clearInterval(_shock);
if(_shockCount % 2 == 0)
_$gameBox.css({ left:_x + _shockWidth + 'px', top:_y + _shockHeight + 'px'});
_$gameBox.css({ left:_x - _shockWidth + 'px', top:_y - _shockHeight + 'px'});
_shockCount++;
* 计算投入到篮里的水果
fruitGame.prototype.FruitPutCount = function(element,elementMove){
var _this = this,
_setting = _this.Setting,
_carBoxLeft = _setting.CarBox.position().left,
_carBoxTop = _setting.CarBox.parent().position().top,
_elTop = element.position().top + element.height(),
_elLeft = element.position().left + element.width(),
_fruitCent = parseInt(element.attr('cent') || 0),
_life = element.attr('life');
if(_elLeft &= _carBoxLeft && _elLeft - element.width() &= _carBoxLeft + _setting.CarBoxWidth && _elTop - 50 &= _carBoxTop){
clearInterval(elementMove);
element.remove();
if(typeof _life == 'undefined'){
//console.log('A:' + _life + ' - ' + (typeof _life == 'undefined') + ' - ' + _fruitCent);
_setting.CountCent += _fruitC
$('#gameCent').text(_setting.CountCent);
_this.GameLevelListener();
_this.ShowTipBox('kiss',{ X:_elLeft - _setting.FruitWidth, Y: _elTop - 30 });
//console.log('B:' + _life);
_this.FruitBomb(_life);
_this.ShowTipBox('bomb',{ X:_elLeft - _setting.FruitWidth - 20, Y: _elTop - 60 });
_this.FruitBombShock();
}else if(_elTop - 60 & _carBoxTop){
clearInterval(elementMove);
element.remove();
_this.ShowTipBox('miss',{ X:_elLeft - _setting.FruitWidth, Y: _elTop - 60 });
* 开始游戏
fruitGame.prototype.Start = function(){
var _this = this,
_setting = this.S
_this.BindControlMove();
_this.BuilderFruit = setInterval(function(){
var _domDiv = document.createElement('div'),
_fruitObj = _this.GetRandomFruit();
_domDiv.setAttribute('class','thing');
_domDiv.setAttribute('idx',_fruitObj.ID);
if(_fruitObj.Life){
_domDiv.setAttribute('life',_fruitObj.Life);
_domDiv.setAttribute('cent',_fruitObj.Cent);
_domDiv.setAttribute('style','left:' + _this.BuilderFruitPosition() + '');
_domDiv.innerHTML = '&img src="'+ _fruitObj.Icon +'" width="30" height="30"/&';
_setting.GameBox.append(_domDiv);
_this.FruitDownMove(_domDiv);
},_this.GetLevelModel(_setting.LevelNum).Speed);
* 游戏初始化
fruitGame.prototype.Init = function(){
var _this =
//new fruitGame().Start();
window.FruitGame = function(){
return new fruitGame();
})(window);
Demo地址:转载请注明出自:相关文章推荐文章12345678910热门点击热评文章我的未来不是梦歌手:张雨生专辑:《国语精选》最新评论摄影作品}

我要回帖

更多关于 水浒神兽安卓 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信