Inscription #72642113#72,642,113htmltransfer100.pizza#71,390,173brc-20mint1,000.slrf#64,963,708brc-20mint1,000.slrf#64,963,679brc-20mint1,000.slrf#64,963,635brc-20mint1,000.slrf#64,963,610brc-20mint1,000.slrf#64,963,593brc-20mint1,000.slrf#64,963,544brc-20transfer15,000.slrf#64,960,184brc-20mint1,000.slrf#64,956,987brc-20mint1,000.slrf#64,956,986brc-20mint1,000.slrf#64,956,985brc-20mint1,000.slrf#64,956,984brc-20mint1,000.slrf#64,956,983brc-20mint1,000.slrf#64,956,973brc-20mint1,000.slrf#64,956,971brc-20mint1,000.slrf#64,956,970brc-20mint1,000.slrf#64,956,969brc-20mint1,000.slrf#64,956,968brc-20mint1,000.slrf#64,956,962brc-20mint1,000.slrf#64,956,957brc-20mint1,000.slrf#64,956,956brc-20mint1,000.slrf#64,956,955brc-20mint1,000.slrf#64,956,926brc-20mint1,000.slrf#64,956,918brc-20mint1,000.slrf#64,956,914brc-20mint1,000.slrf#64,956,908brc-20mint1,000.slrf#64,956,907brc-20mint1,000.slrf#64,956,905brc-20mint1,000.slrf#64,956,887brc-20mint1,000.slrf#64,956,880brc-20mint1,000.slrf#64,956,875brc-20mint1,000.slrf#64,956,874brc-20transfer10,000.oxbt#59,047,265brc-20Inscription #56741672#56,741,672htmlInscription #50407642#50,407,642htmlmint100,000,000.sats#33,145,615brc-20mint100,000,000.sats#33,145,614brc-20mint1.sats#33,121,158brc-20mint1.sats#33,121,157brc-20mint1.sats#33,121,156brc-20mint1.sats#33,120,401brc-20mint1.sats#33,120,400brc-20mint1.sats#33,120,399brc-20mint1.sats#33,120,398brc-20mint1.sats#33,120,397brc-20mint1.sats#33,120,396brc-20mint1.sats#33,120,395brc-20transfer1,000.oxbt#27,744,928brc-20Inscription #27608541#27,608,541htmltransfer5,000.oxbt#22,160,654brc-20552843.bitmap#13,243,459text<html> <head> <meta charset="utf8"> <title>PAC-MAN for BTC</title> <meta name="description" content="BTC Version of Pac-Man inscribed as Ordinal NFT, one of the most famous game who made the history"> <meta name="keywords" content="btc, ordinals, pacman, pac-man, crypto, game"> <link rel="shortcut icon" href="favicon.png"> <style> html{color:#FFF; background: linear-gradient(90deg, rgba(2,0,36,1) 0%, #fffb00 0%, #ff7700 100%);}div,dl,dt,dd,ul,ol,li,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0}table{border-collapse:collapse;border-spacing:0}fieldset,img{border:0}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal}ol,ul{list-style:none}caption,th{text-align:left}h1,h3,h3,h4,h5,h6{font-size:100%;font-weight:normal}q:before,q:after{content:''}abbr,acronym{border:0;font-variant:normal}sup{vertical-align:text-top}sub{vertical-align:text-bottom}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;*font-size:100%}legend{color:#000} .wrapper{ max-width: 768px; max-height: 768px; margin:0 auto; color:#999; } body { background-color: #000; font-family: verdana; } h1 { font-size: 22px; background: -webkit-linear-gradient(#ffffff, #ffffff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; } a { color: #0033ff; } a:hover { color: #006eff; } canvas { display:block; max-width: 768px; max-height: 768px; margin-left: auto; background: #000; } .mod-game .info{ padding: 10px 0; margin-bottom: 5px; line-height: 20px; text-align: center; color: #666; } .mod-game .info p{ line-height: 20px; font-size: 14px; color: #666; } .mod-game .intro{ padding: 10px 15px; background: #f8f8f8; border-radius: 5px; } .mod-game .intro p{ line-height: 22px; text-indent: 2em; font-size: 14px; color: #666; } .mod-button{ height: 32px; padding: 15px 0; text-align: center; } .mod-button span,.mod-button a{ vertical-align: middle; } .mod-button .btn{ display: inline-block; padding: 0 12px; line-height: 26px; color: #fff; border: 2px solid #00fdfd; margin-left: 5px; text-decoration: none; font-size: 15px; color: #fff; border-radius: 2px; } </style> </head> <body> <div class="wrapper"> <div class="mod-game"> <canvas id="canvas" width="100%" height="80%"></canvas> <div class="info"> <h1>Use Arrows to move - press[SPACE] to start/pause the game</h1> </div> </div> </div> <script>'use strict'; /*! Pac-Man BTC is a Ordinal version of the famous arcade game, entirely developed and working in a single HTML inscription. */ /* * */ // if (!Date.now) Date.now = function() { return new Date().getTime(); }; (function() { 'use strict'; var vendors = ['webkit', 'moz']; for (var i = 0; i < vendors.length && !window.requestAnimationFrame; ++i) { var vp = vendors[i]; window.requestAnimationFrame = window[vp+'RequestAnimationFrame']; window.cancelAnimationFrame = (window[vp+'CancelAnimationFrame'] || window[vp+'CancelRequestAnimationFrame']); } if (/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent) // IOS6 is bugged || !window.requestAnimationFrame || !window.cancelAnimationFrame) { var lastTime = 0; window.requestAnimationFrame = function(callback) { var now = Date.now(); var nextTime = Math.max(lastTime + 16, now); return setTimeout(function() { callback(lastTime = nextTime); }, nextTime - now); }; window.cancelAnimationFrame = clearTimeout; } }()); function Game(id,params){ var _ = this; var settings = { width:960, height:640 }; Object.assign(_,settings,params); var $canvas = document.getElementById(id); $canvas.width = _.width; $canvas.height = _.height; var _context = $canvas.getContext('2d'); var _stages = []; var _events = {}; var _index=0, _hander; var Item = function(params){ this._params = params||{}; this._id = 0; this._stage = null; this._settings = { x:0, y:0, width:20, height:20, type:0, color:'#F00', status:1, orientation:0, speed:0, location:null, coord:null, path:[], vector:null, frames:1, times:0, timeout:0, control:{}, update:function(){}, draw:function(){} }; Object.assign(this,this._settings,this._params); }; Item.prototype.bind = function(eventType,callback){ if(!_events[eventType]){ _events[eventType] = {}; $canvas.addEventListener(eventType,function(e){ var position = _.getPosition(e); _stages[_index].items.forEach(function(item){ if(item.x<=position.x&&position.x<=item.x+item.width&&item.y<=position.y&&position.y<=item.y+item.height){ var key = 's'+_index+'i'+item._id; if(_events[eventType][key]){ _events[eventType][key](e); } } }); e.preventDefault(); }); } _events[eventType]['s'+this._stage.index+'i'+this._id] = callback.bind(this); }; var Map = function(params){ this._params = params||{}; this._id = 0; this._stage = null; this._settings = { x:0, y:0, size:20, data:[], x_length:0, y_length:0, frames:1, times:0, cache:false, update:function(){}, draw:function(){}, }; Object.assign(this,this._settings,this._params); }; Map.prototype.get = function(x,y){ if(this.data[y]&&typeof this.data[y][x]!='undefined'){ return this.data[y][x]; } return -1; }; Map.prototype.set = function(x,y,value){ if(this.data[y]){ this.data[y][x] = value; } }; Map.prototype.coord2position = function(cx,cy){ return { x:this.x+cx*this.size+this.size/2, y:this.y+cy*this.size+this.size/2 }; }; Map.prototype.position2coord = function(x,y){ var fx = Math.abs(x-this.x)%this.size-this.size/2; var fy = Math.abs(y-this.y)%this.size-this.size/2; return { x:Math.floor((x-this.x)/this.size), y:Math.floor((y-this.y)/this.size), offset:Math.sqrt(fx*fx+fy*fy) }; }; Map.prototype.finder = function(params){ var defaults = { map:null, start:{}, end:{}, type:'path' }; var options = Object.assign({},defaults,params); if(options.map[options.start.y][options.start.x]||options.map[options.end.y][options.end.x]){ return []; } var finded = false; var result = []; var y_length = options.map.length; var x_length = options.map[0].length; var steps = Array(y_length).fill(0).map(()=>Array(x_length).fill(0)); var _getValue = function(x,y){ if(options.map[y]&&typeof options.map[y][x]!='undefined'){ return options.map[y][x]; } return -1; }; var _next = function(to){ var value = _getValue(to.x,to.y); if(value<1){ if(value==-1){ to.x = (to.x+x_length)%x_length; to.y = (to.y+y_length)%y_length; to.change = 1; } if(!steps[to.y][to.x]){ result.push(to); } } }; var _render = function(list){ var new_list = []; var next = function(from,to){ var value = _getValue(to.x,to.y); if(value<1){ if(value==-1){ to.x = (to.x+x_length)%x_length; to.y = (to.y+y_length)%y_length; to.change = 1; } if(to.x==options.end.x&&to.y==options.end.y){ steps[to.y][to.x] = from; finded = true; }else if(!steps[to.y][to.x]){ steps[to.y][to.x] = from; new_list.push(to); } } }; list.forEach(function(current){ next(current,{y:current.y+1,x:current.x}); next(current,{y:current.y,x:current.x+1}); next(current,{y:current.y-1,x:current.x}); next(current,{y:current.y,x:current.x-1}); }); if(!finded&&new_list.length){ _render(new_list); } }; _render([options.start]); if(finded){ var current=options.end; if(options.type=='path'){ while(current.x!=options.start.x||current.y!=options.start.y){ result.unshift(current); current=steps[current.y][current.x]; } }else if(options.type=='next'){ _next({x:current.x+1,y:current.y}); _next({x:current.x,y:current.y+1}); _next({x:current.x-1,y:current.y}); _next({x:current.x,y:current.y-1}); } } return result; }; var Stage = function(params){ this._params = params||{}; this._settings = { index:0, status:0, maps:[], audio:[], images:[], items:[], timeout:0, update:function(){} }; Object.assign(this,this._settings,this._params); }; Stage.prototype.createItem = function(options){ var item = new Item(options); if(item.location){ Object.assign(item,item.location.coord2position(item.coord.x,item.coord.y)); } item._stage = this; item._id = this.items.length; this.items.push(item); return item; }; Stage.prototype.resetItems = function(){ this.status = 1; this.items.forEach(function(item,index){ Object.assign(item,item._settings,item._params); if(item.location){ Object.assign(item,item.location.coord2position(item.coord.x,item.coord.y)); } }); }; Stage.prototype.getItemsByType = function(type){ return this.items.filter(function(item){ return item.type == type; }); }; Stage.prototype.createMap = function(options){ var map = new Map(options); map.data = JSON.parse(JSON.stringify(map._params.data)); map.y_length = map.data.length; map.x_length = map.data[0].length; map.imageData = null; map._stage = this; map._id = this.maps.length; this.maps.push(map); return map; }; Stage.prototype.resetMaps = function(){ this.status = 1; this.maps.forEach(function(map){ Object.assign(map,map._settings,map._params); map.data = JSON.parse(JSON.stringify(map._params.data)); map.y_length = map.data.length; map.x_length = map.data[0].length; map.imageData = null; }); }; Stage.prototype.reset = function(){ Object.assign(this,this._settings,this._params); this.resetItems(); this.resetMaps(); }; Stage.prototype.bind = function(eventType,callback){ if(!_events[eventType]){ _events[eventType] = {}; window.addEventListener(eventType,function(e){ var key = 's' + _index; if(_events[eventType][key]){ _events[eventType][key](e); } e.preventDefault(); }); } _events[eventType]['s'+this.index] = callback.bind(this); }; this.start = function() { var f = 0; var timestamp = (new Date()).getTime(); var fn = function(){ var now = (new Date()).getTime(); if(now-timestamp<16){ _hander = requestAnimationFrame(fn); return false; } timestamp = now; var stage = _stages[_index]; _context.clearRect(0,0,_.width,_.height); _context.fillStyle = '#000000'; _context.fillRect(0,0,_.width,_.height); f++; if(stage.timeout){ stage.timeout--; } if(stage.update()!=false){ stage.maps.forEach(function(map){ if(!(f%map.frames)){ map.times = f/map.frames; } if(map.cache){ if(!map.imageData){ _context.save(); map.draw(_context); map.imageData = _context.getImageData(0,0,_.width,_.height); _context.restore(); }else{ _context.putImageData(map.imageData,0,0); } }else{ map.update(); map.draw(_context); } }); stage.items.forEach(function(item){ if(!(f%item.frames)){ item.times = f/item.frames; } if(stage.status==1&&item.status!=2){ if(item.location){ item.coord = item.location.position2coord(item.x,item.y); } if(item.timeout){ item.timeout--; } item.update(); } item.draw(_context); }); } _hander = requestAnimationFrame(fn); }; _hander = requestAnimationFrame(fn); }; this.stop = function(){ _hander&&cancelAnimationFrame(_hander); }; this.getPosition = function(e){ var box = $canvas.getBoundingClientRect(); return { x:e.clientX-box.left*(_.width/box.width), y:e.clientY-box.top*(_.height/box.height) }; } this.createStage = function(options){ var stage = new Stage(options); stage.index = _stages.length; _stages.push(stage); return stage; }; this.setStage = function(index){ _stages[_index].status = 0; _index = index; _stages[_index].status = 1; _stages[_index].reset(); return _stages[_index]; }; this.nextStage = function(){ if(_index<_stages.length-1){ return this.setStage(++_index); }else{ throw new Error('unfound new stage.'); } }; this.getStages = function(){ return _stages; }; this.init = function(){ _index = 0; this.start(); }; } </script> <script>/*! * Pacman - HTML5 Game * Copyright (c) 2023-present, @DaemonPique * Released under the MIT License. * https://github.com/... */ (function(){ var _COIGIG = [ { 'map':[ [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1], [1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1], [1,0,1,1,1,1,0,1,1,1,1,1,0,1,1,0,1,1,1,1,1,0,1,1,1,1,0,1], [1,0,1,1,1,1,0,1,1,1,1,1,0,1,1,0,1,1,1,1,1,0,1,1,1,1,0,1], [1,0,1,1,1,1,0,1,1,1,1,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1,1,0,1], [1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1], [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1] ], 'wall_color':'#9966CC', 'goods':{ '1,4':1, '26,4':1, '1,27':1, '26,27':1 } } ]; _COLOR = ['#5300FF','#B700FF','#0CF','#FF00DE'], //NPC _COS = [1,0,-1,0], _SIN = [0,1,0,-1], _LIFE = 5, _SCORE = 0; var game = new Game('canvas'); (function(){ var stage = game.createStage(); //logo stage.createItem({ x:game.width/2, y:game.height*.45, width:100, height:100, frames:3, draw:function(context){ var t = Math.abs(5-this.times%10); context.fillStyle = '#ff9900'; context.beginPath(); context.arc(this.x,this.y,this.width/2,t*.04*Math.PI,(2-t*.04)*Math.PI,false); context.lineTo(this.x,this.y); context.closePath(); context.fill(); context.fillStyle = '#000'; context.beginPath(); context.arc(this.x+5,this.y-27,7,0,2*Math.PI,false); context.closePath(); context.fill(); } }); stage.createItem({ x:game.width/2, y:game.height*.6, draw:function(context){ context.font = 'bold 32px Verdana'; context.textAlign = 'center'; context.textBaseline = 'middle'; context.fillStyle = '#FFF'; context.fillText('Pac-Man - Press [SPACE] to start',this.x,this.y); } }); stage.createItem({ x:game.width-10, y:game.height-5, draw:function(context){ var text = 'BTC<3'; context.font = '16px/20px Verdana'; context.textAlign = 'left'; context.textBaseline = 'top'; context.fillStyle = '#ff9900'; this.width = context.measureText(text).width; this.x = game.width-this.width-10; this.y = game.height-20-5; context.fillText(text,this.x,this.y); } }).bind('click',function(){ window.open('#'); }); stage.bind('keydown',function(e){ switch(e.keyCode){ case 13: case 32: game.nextStage(); break; } }); })(); (function(){ _COIGIG.forEach(function(config,index){ var stage,map,beans,items,player; stage = game.createStage({ update:function(){ var stage = this; if(stage.status==1){ items.forEach(function(item){ if(map&&!map.get(item.coord.x,item.coord.y)&&!map.get(player.coord.x,player.coord.y)){ var dx = item.x-player.x; var dy = item.y-player.y; if(dx*dx+dy*dy<750&&item.status!=4){ if(item.status==3){ item.status = 4; _SCORE += 10; }else{ stage.status = 3; stage.timeout = 30; } } } }); if(JSON.stringify(beans.data).indexOf(0)<0){ game.nextStage(); } }else if(stage.status==3){ if(!stage.timeout){ _LIFE--; if(_LIFE){ stage.resetItems(); }else{ var stages = game.getStages(); game.setStage(stages.length-1); return false; } } } } }); map = stage.createMap({ x:60, y:10, data:config['map'], cache:true, draw:function(context){ context.lineWidth = 2; for(var j=0; j<this.y_length; j++){ for(var i=0; i<this.x_length; i++){ var value = this.get(i,j); if(value){ var code = [0,0,0,0]; if(this.get(i+1,j)&&!(this.get(i+1,j-1)&&this.get(i+1,j+1)&&this.get(i,j-1)&&this.get(i,j+1))){ code[0]=1; } if(this.get(i,j+1)&&!(this.get(i-1,j+1)&&this.get(i+1,j+1)&&this.get(i-1,j)&&this.get(i+1,j))){ code[1]=1; } if(this.get(i-1,j)&&!(this.get(i-1,j-1)&&this.get(i-1,j+1)&&this.get(i,j-1)&&this.get(i,j+1))){ code[2]=1; } if(this.get(i,j-1)&&!(this.get(i-1,j-1)&&this.get(i+1,j-1)&&this.get(i-1,j)&&this.get(i+1,j))){ code[3]=1; } if(code.indexOf(1)>-1){ context.strokeStyle=value==2?"#FFF":config['wall_color']; var pos = this.coord2position(i,j); switch(code.join('')){ case '1100': context.beginPath(); context.arc(pos.x+this.size/2,pos.y+this.size/2,this.size/2,Math.PI,1.5*Math.PI,false); context.stroke(); context.closePath(); break; case '0110': context.beginPath(); context.arc(pos.x-this.size/2,pos.y+this.size/2,this.size/2,1.5*Math.PI,2*Math.PI,false); context.stroke(); context.closePath(); break; case '0011': context.beginPath(); context.arc(pos.x-this.size/2,pos.y-this.size/2,this.size/2,0,.5*Math.PI,false); context.stroke(); context.closePath(); break; case '1001': context.beginPath(); context.arc(pos.x+this.size/2,pos.y-this.size/2,this.size/2,.5*Math.PI,1*Math.PI,false); context.stroke(); context.closePath(); break; default: var dist = this.size/2; code.forEach(function(v,index){ if(v){ context.beginPath(); context.moveTo(pos.x,pos.y); context.lineTo(pos.x-_COS[index]*dist,pos.y-_SIN[index]*dist); context.stroke(); context.closePath(); } }); } } } } } } }); beans = stage.createMap({ x:60, y:10, data:config['map'], frames:8, draw:function(context){ for(var j=0; j<this.y_length; j++){ for(var i=0; i<this.x_length; i++){ if(!this.get(i,j)){ var pos = this.coord2position(i,j); context.fillStyle = "#F5F5DC"; if(config['goods'][i+','+j]){ context.beginPath(); context.arc(pos.x,pos.y,3+this.times%2,0,2*Math.PI,true); context.fill(); context.closePath(); }else{ context.fillRect(pos.x-2,pos.y-2,4,4); } } } } } }); stage.createItem({ x:690, y:80, draw:function(context){ context.font = 'bold 24px Verdana'; context.textAlign = 'left'; context.textBaseline = 'bottom'; context.fillStyle = '#ff9933'; context.fillText('SCORE',this.x,this.y); context.font = '24px Verdana'; context.textAlign = 'left'; context.textBaseline = 'top'; context.fillStyle = '#FFF'; context.fillText(_SCORE,this.x+12,this.y); context.font = 'bold 24px Verdana'; context.textAlign = 'left'; context.textBaseline = 'bottom'; context.fillStyle = '#ff9933'; context.fillText('LEVEL',this.x,this.y+72); context.font = '26px Verdana'; context.textAlign = 'left'; context.textBaseline = 'top'; context.fillStyle = '#FFF'; context.fillText(index+1,this.x+12,this.y+72); } }); stage.createItem({ x:690, y:285, frames:25, draw:function(context){ if(stage.status==2&&this.times%2){ context.font = '24px Helvetica'; context.textAlign = 'left'; context.textBaseline = 'center'; context.fillStyle = '#FFF'; context.fillText('PAUSE',this.x,this.y); } } }); stage.createItem({ x:705, y:510, width:30, height:30, draw:function(context){ var max = Math.min(_LIFE-1,5); for(var i=0;i<max;i++){ var x=this.x+40*i,y=this.y; context.fillStyle = '#ff9900'; context.beginPath(); context.arc(x,y,this.width/2,.15*Math.PI,-.15*Math.PI,false); context.lineTo(x,y); context.closePath(); context.fill(); } context.font = '26px Helvetica'; context.textAlign = 'left'; context.textBaseline = 'center'; context.fillStyle = '#FFF'; context.fillText('X '+(_LIFE-1),this.x-15,this.y+30); } }); //NPC for(var i=0;i<4;i++){ stage.createItem({ width:30, height:30, orientation:3, color:_COLOR[i], location:map, coord:{x:12+i,y:14}, vector:{x:12+i,y:14}, type:2, frames:10, speed:1, timeout:Math.floor(Math.random()*120), update:function(){ var new_map; if(this.status==3&&!this.timeout){ this.status = 1; } if(!this.coord.offset){ if(this.status==1){ if(!this.timeout){ new_map = JSON.parse(JSON.stringify(map.data).replace(/2/g,0)); var id = this._id; items.forEach(function(item){ if(item._id!=id&&item.status==1){ //NPC new_map[item.coord.y][item.coord.x]=1; } }); this.path = map.finder({ map:new_map, start:this.coord, end:player.coord }); if(this.path.length){ this.vector = this.path[0]; } } }else if(this.status==3){ new_map = JSON.parse(JSON.stringify(map.data).replace(/2/g,0)); var id = this._id; items.forEach(function(item){ if(item._id!=id){ new_map[item.coord.y][item.coord.x]=1; } }); this.path = map.finder({ map:new_map, start:player.coord, end:this.coord, type:'next' }); if(this.path.length){ this.vector = this.path[Math.floor(Math.random()*this.path.length)]; } }else if(this.status==4){ new_map = JSON.parse(JSON.stringify(map.data).replace(/2/g,0)); this.path = map.finder({ map:new_map, start:this.coord, end:this._params.coord }); if(this.path.length){ this.vector = this.path[0]; }else{ this.status = 1; } } if(this.vector.change){ this.coord.x = this.vector.x; this.coord.y = this.vector.y; var pos = map.coord2position(this.coord.x,this.coord.y); this.x = pos.x; this.y = pos.y; } if(this.vector.x>this.coord.x){ this.orientation = 0; }else if(this.vector.x<this.coord.x){ this.orientation = 2; }else if(this.vector.y>this.coord.y){ this.orientation = 1; }else if(this.vector.y<this.coord.y){ this.orientation = 3; } } this.x += this.speed*_COS[this.orientation]; this.y += this.speed*_SIN[this.orientation]; }, draw:function(context){ var isSick = false; if(this.status==3){ isSick = this.timeout>80||this.times%2?true:false; } if(this.status!=4){ context.fillStyle = isSick?'#BABABA':this.color; context.beginPath(); context.arc(this.x,this.y,this.width*.5,0,Math.PI,true); switch(this.times%2){ case 0: context.lineTo(this.x-this.width*.5,this.y+this.height*.4); context.quadraticCurveTo(this.x-this.width*.4,this.y+this.height*.5,this.x-this.width*.2,this.y+this.height*.3); context.quadraticCurveTo(this.x,this.y+this.height*.5,this.x+this.width*.2,this.y+this.height*.3); context.quadraticCurveTo(this.x+this.width*.4,this.y+this.height*.5,this.x+this.width*.5,this.y+this.height*.4); break; case 1: context.lineTo(this.x-this.width*.5,this.y+this.height*.3); context.quadraticCurveTo(this.x-this.width*.25,this.y+this.height*.5,this.x,this.y+this.height*.3); context.quadraticCurveTo(this.x+this.width*.25,this.y+this.height*.5,this.x+this.width*.5,this.y+this.height*.3); break; } context.fill(); context.closePath(); } context.fillStyle = '#FFF'; if(isSick){ context.beginPath(); context.arc(this.x-this.width*.15,this.y-this.height*.21,this.width*.08,0,2*Math.PI,false); context.arc(this.x+this.width*.15,this.y-this.height*.21,this.width*.08,0,2*Math.PI,false); context.fill(); context.closePath(); }else{ context.beginPath(); context.arc(this.x-this.width*.15,this.y-this.height*.21,this.width*.12,0,2*Math.PI,false); context.arc(this.x+this.width*.15,this.y-this.height*.21,this.width*.12,0,2*Math.PI,false); context.fill(); context.closePath(); context.fillStyle = '#000'; context.beginPath(); context.arc(this.x-this.width*(.15-.04*_COS[this.orientation]),this.y-this.height*(.21-.04*_SIN[this.orientation]),this.width*.07,0,2*Math.PI,false); context.arc(this.x+this.width*(.15+.04*_COS[this.orientation]),this.y-this.height*(.21-.04*_SIN[this.orientation]),this.width*.07,0,2*Math.PI,false); context.fill(); context.closePath(); } } }); } items = stage.getItemsByType(2); player = stage.createItem({ width:30, height:30, type:1, location:map, coord:{x:13.5,y:23}, orientation:2, speed:2, frames:10, update:function(){ var coord = this.coord; if(!coord.offset){ if(typeof this.control.orientation != 'undefined'){ if(!map.get(coord.x+_COS[this.control.orientation],coord.y+_SIN[this.control.orientation])){ this.orientation = this.control.orientation; } } this.control = {}; var value = map.get(coord.x+_COS[this.orientation],coord.y+_SIN[this.orientation]); if(value==0){ this.x += this.speed*_COS[this.orientation]; this.y += this.speed*_SIN[this.orientation]; }else if(value<0){ this.x -= map.size*(map.x_length-1)*_COS[this.orientation]; this.y -= map.size*(map.y_length-1)*_SIN[this.orientation]; } }else{ if(!beans.get(this.coord.x,this.coord.y)){ _SCORE++; beans.set(this.coord.x,this.coord.y,1); if(config['goods'][this.coord.x+','+this.coord.y]){ items.forEach(function(item){ if(item.status==1||item.status==3){ //NPC item.timeout = 450; item.status = 3; } }); } } this.x += this.speed*_COS[this.orientation]; this.y += this.speed*_SIN[this.orientation]; } }, draw:function(context){ context.fillStyle = '#ff9900'; context.beginPath(); if(stage.status!=3){ if(this.times%2){ context.arc(this.x,this.y,this.width/2,(.5*this.orientation+.20)*Math.PI,(.5*this.orientation-.20)*Math.PI,false); }else{ context.arc(this.x,this.y,this.width/2,(.5*this.orientation+.01)*Math.PI,(.5*this.orientation-.01)*Math.PI,false); } }else{ if(stage.timeout) { context.arc(this.x,this.y,this.width/2,(.5*this.orientation+1-.02*stage.timeout)*Math.PI,(.5*this.orientation-1+.02*stage.timeout)*Math.PI,false); } } context.lineTo(this.x,this.y); context.closePath(); context.fill(); } }); stage.bind('keydown',function(e){ switch(e.keyCode){ case 13: case 32: this.status = this.status==2?1:2; break; case 39: player.control = {orientation:0}; break; case 40: player.control = {orientation:1}; break; case 37: player.control = {orientation:2}; break; case 38: player.control = {orientation:3}; break; } }); }); })(); (function(){ var stage = game.createStage(); stage.createItem({ x:game.width/2, y:game.height*.35, draw:function(context){ context.fillStyle = '#FFF'; context.font = 'bold 48px Verdana'; context.textAlign = 'center'; context.textBaseline = 'middle'; context.fillText(_LIFE?'YOU WIN!':'GAME OVER',this.x,this.y); } }); stage.createItem({ x:game.width/2, y:game.height*.5, draw:function(context){ context.fillStyle = '#FFF'; context.font = '20px Helvetica'; context.textAlign = 'center'; context.textBaseline = 'middle'; context.fillText('FINAL SCORE: '+(_SCORE+50*Math.max(_LIFE-1,0)),this.x,this.y); } }); stage.bind('keydown',function(e){ switch(e.keyCode){ case 13: case 32: _SCORE = 0; _LIFE = 5; game.setStage(1); break; } }); })(); game.init(); })(); </script> <script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?b86879c9cc57dd112fe1f7dd75206b82"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script> <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body> </html>#11,390,065texttransfer3,000.oxbt#11,354,097brc-20Inscription #11349381#11,349,381webptransfer2,000.oxbt#11,289,311brc-20transfer3,000.oxbt#10,646,850brc-20mint3,330.mcde#10,165,687brc-20transfer2,000.oxbt#9,278,272brc-20transfer1,500.oxbt#9,265,296brc-20