svn与git

打飞机

css
*{margin:0; padding:0;}
html,body{width:100%; height:100%; overflow: hidden;}
.main{
margin: auto;
height: 100%;
background: url(images/bg.jpg) repeat-y;
background-position-y: 0px;
width: 480px;
}
.options{
position: absolute;
list-style: none;
margin: auto;
left: 0; right: 0; top: 100px;
width: 200px;
height: 300px; }
.options li{
border-radius: 5px;
box-shadow: 0 0 2px 1px black;
float: left;
width: 200px;
height: 75px;
text-align: center;
line-height: 75px;
margin-bottom: 20px;
background: #f40;
color: white;
font: "微软雅黑";
font-size: 28px;
cursor: pointer;
}
.logo{
position: absolute;
left: 0; right: 0; top: 25%;
margin: auto;
width: 428px; height: 104px;
background: url(images/logo.png) no-repeat;
}
.loading{
position: absolute;
left: 0; right: 0; top: 60%;
margin: auto;
width: 192px; height: 41px;
background: url(images/loading1.png) no-repeat;
}
.my-warplain{
position: absolute;
width: 98px; height: 122px;
background: url(images/me.png) no-repeat;
cursor: none;
}
.bullet{
position: absolute;
width: 7px; height: 18px;
background: url(images/bullet.png) no-repeat;
}
.bullet_die{
position: absolute;
width: 41px; height: 39px;
background: url(images/die1.png) no-repeat;
margin-left: -18px;
}
.enemy-small{
position: absolute;
z-index: 1;
width: 59px; height: 36px;
background: url(images/plane1.png) no-repeat;
}
.enemy-middle{
position: absolute;
width: 70px; height: 92px;
background: url(images/plane2.png) no-repeat;
}
.enemy-large{
position: absolute;
width:165px; height: 256px;
background: url(images/plane3.png) no-repeat;
}
一.ES5:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" href="dahuiji.css" />
<script type="text/javascript">
window.onload = function(){
new Engine();
}
//引擎
function Engine(){
//属性
this.ele = document.getElementById("body_main");//获取引擎
//获取li
this.oUllis = this.ele.children[0].children;
//记录this
var that = this;
//遍历li,添加事件
for(var i = 0,len = this.oUllis.length;i < len;i ++){
//记录下标
this.oUllis[i].index = i;
//添加点击事件
this.oUllis[i].onclick = function(){
//删除ul选项
this.parentNode.remove();
//调用加载页面的方法
that.loadPage();
that.frequency = this.index;
}
}
}
//原型方法
Engine.prototype.loadPage = function(){
//创建logo
var logo = $create('div','logo');
//加到页面
$addBody(logo);
//创建loading
var loading = $create('div','loading');
//加到页面
$addBody(loading);
//设置loading动画
var index = 1;
var timer = setInterval(function(){
loading.style.background = 'url(images/loading' + (index ++ % 3 + 1) + '.png) no-repeat';
},500);
//设置背景动画
var that = this;
var positionY = 1;
setInterval(function(){
that.ele.style.backgroundPositionY = ++ positionY + 'px';
},30)
//3秒到达战场
setTimeout(function(){
//清场
//删除logo
logo.remove();
//删除loading
loading.remove();
//停止loading动画
clearInterval(timer);
//开始游戏
that.gameStart();
},3000)
}
Engine.prototype.gameStart = function(){
//我方飞机入场
Plane.init();
//我方飞机开火
Plane.fire(this.frequency);
//创建敌机
this.createEnemy();
}
Engine.prototype.createEnemy = function(){
//设置敌机的类型和产生的概率
//敌小机
setInterval(function(){
Math.random() > 0.5 ? new Enemy(0) : "";
},500)
//敌中机
setInterval(function(){
Math.random() > 0.5 ? new Enemy(1) : "";
},1000)
//敌大机
setInterval(function(){
Math.random() > 0.2 ? new Enemy(2) : "";
},8000)
}
//我方飞机
var Plane = {
//创建我方飞机
ele : $create('div','my-warplain'),
//初始化我方飞机
init : function(){
//放到页面
$addBody(this.ele);
//我方飞机定位
this.ele.style.left = document.documentElement.clientWidth / 2 - this.ele.offsetWidth / 2 + 'px';
this.ele.style.top = document.documentElement.clientHeight - this.ele.offsetHeight + 'px';
//调用我方飞机运动
this.fly();
},
fly : function(){
var that = this;
//获取引擎div
var bodyMain = document.getElementById("body_main");
//鼠标跟随
document.onmousemove = function(evt){
var e = evt || window.event;
//设置边界
var left = e.pageX - that.ele.offsetWidth / 2;
var top = e.pageY - that.ele.offsetHeight / 2;
if(left <= bodyMain.offsetLeft){
left = bodyMain.offsetLeft;
}
if(left >= bodyMain.offsetLeft + bodyMain.offsetWidth - that.ele.offsetWidth){
left = bodyMain.offsetLeft + bodyMain.offsetWidth - that.ele.offsetWidth;
}
that.ele.style.left = left + 'px';
that.ele.style.top = top + 'px';
}
},
fire : function(frequency){
var frequencyMe = 200; //默认的开火频率
switch(frequency){
case 0 : frequencyMe = 500;break;
case 1 : frequencyMe = 400;break;
case 2 : frequencyMe = 200;break;
case 3 : frequencyMe = 50;break;
} //设置子弹ID
var bulletId = 0;
var that = this;
setInterval(function(){
that.bullet.push(new Bullet(bulletId));
bulletId ++;
console.log(that.bullet);
},frequencyMe)
},
bullet : []
} //子弹
function Bullet(id){
this.id = id;
//创建子弹
this.ele = $create('div','bullet');
//初始化
this.init();
}
Bullet.prototype.init = function(){
//加到页面
$addBody(this.ele);
//给子弹添加id
this.ele.id = this.id;
//定位子弹
this.ele.style.left = Plane.ele.offsetLeft + Plane.ele.offsetWidth / 2 - this.ele.offsetWidth / 2 + 'px';
this.ele.style.top = Plane.ele.offsetTop - this.ele.offsetHeight + 'px';
//让子弹飞
this.fly();
}
Bullet.prototype.fly = function(){
var that = this;
this.timer = setInterval(function(){
that.ele.style.top = that.ele.offsetTop - 15 + 'px';
if(that.ele.offsetTop <= 10){
that.boom(); //子弹爆炸
}
},30)
}
Bullet.prototype.boom = function(){
this.ele.className = 'bullet_die';
clearInterval(this.timer);
var that = this;
setTimeout(function(){
that.ele.remove();
for(var i = 0,len = Plane.bullet.length;i < len;i ++){
if(that.ele.id == Plane.bullet[i].id){
Plane.bullet.splice(i,1);
}
}
},100)
} //敌机
function Enemy(type){
this.type = type;
this.init();
}
Enemy.prototype.init = function(){
switch(this.type){
case 0 : this.ele = $create('div','enemy-small');this.hp = 1;this.speed = 10;break;
case 1 : this.ele = $create('div','enemy-middle');this.hp = 5;this.speed = 8;break;
case 2 : this.ele = $create('div','enemy-large');this.hp = 50;this.speed = 2;break;
}
//加到页面
$addBody(this.ele);
//定位敌机
this.position();
}
Enemy.prototype.position = function(){
var bodyMain = document.getElementById("body_main");
this.ele.style.left = $random(bodyMain.offsetLeft,bodyMain.offsetLeft + bodyMain.offsetWidth - this.ele.offsetWidth) + 'px';
this.ele.style.top = - this.ele.offsetHeight + 'px';
//敌机起飞
this.fly();
}
Enemy.prototype.fly = function(){
var that = this;
this.timer = setInterval(function(){
that.ele.style.top = that.ele.offsetTop + that.speed + 'px';
//碰撞检测
that.collision();
if(that.ele.offsetTop >= document.documentElement.clientHeight){
that.ele.remove();
clearInterval(that.timer);
}
},30)
}
Enemy.prototype.collision = function(){
for(var i = 0;i < Plane.bullet.length;i ++){
if(!(this.ele.offsetTop + this.ele.offsetHeight < Plane.bullet[i].ele.offsetTop || Plane.bullet[i].ele.offsetTop + Plane.bullet[i].ele.offsetHeight < this.ele.offsetTop)){
if(!(Plane.bullet[i].ele.offsetLeft + Plane.bullet[i].ele.offsetWidth < this.ele.offsetLeft || this.ele.offsetLeft + this.ele.offsetWidth < Plane.bullet[i].ele.offsetLeft)){
Plane.bullet[i].boom();
this.hp --;
if(this.hp == 0){
this.ele.remove();
clearInterval(this.timer);
}
} }
}
}
//工具箱
//删除元素
Element.prototype.remove = function(){
this.parentNode.removeChild(this);
}
//创建对象并添加类名
function $create(tagName,className){
var ele = document.createElement(tagName);
ele.className = className;
return ele;
}
//将元素对象添加到页面中
function $addBody(obj){
document.body.appendChild(obj);
}
//随机整数
function $random(min,max){
return Math.floor(Math.random() * (max - min + 1) + min);
}
</script>
</head>
<body>
<div id="body_main" class="main">
<ul id="options" class="options">
<li value="1">超级困难</li>
<li value="2">非常困难</li>
<li value="3">比较困难</li>
<li value="4">就选我吧</li>
</ul>
</div>
</body>
</html>
二.ES5原型对象:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" href="dahuiji.css" />
<script type="text/javascript">
window.onload = function(){
new Engine();
}
//引擎
function Engine(){
//属性
this.ele = document.getElementById("body_main");//获取引擎
//获取li
this.oUllis = this.ele.children[0].children;
//记录this
var that = this;
//遍历li,添加事件
for(var i = 0,len = this.oUllis.length;i < len;i ++){
//记录下标
this.oUllis[i].index = i;
//添加点击事件
this.oUllis[i].onclick = function(){
//删除ul选项
this.parentNode.remove();
//调用加载页面的方法
that.loadPage();
that.frequency = this.index;
}
}
}
//原型方法
Engine.prototype = {
loadPage : function(){
//创建logo
var logo = $create('div','logo');
//加到页面
$addBody(logo);
//创建loading
var loading = $create('div','loading');
//加到页面
$addBody(loading);
//设置loading动画
var index = 1;
var timer = setInterval(function(){
loading.style.background = 'url(images/loading' + (index ++ % 3 + 1) + '.png) no-repeat';
},500);
//设置背景动画
var that = this;
var positionY = 1;
setInterval(function(){
that.ele.style.backgroundPositionY = ++ positionY + 'px';
},30)
//3秒到达战场
setTimeout(function(){
//清场
//删除logo
logo.remove();
//删除loading
loading.remove();
//停止loading动画
clearInterval(timer);
//开始游戏
that.gameStart();
},3000)
},
gameStart : function(){
//我方飞机入场
Plane.init();
//我方飞机开火
Plane.fire(this.frequency);
//创建敌机
this.createEnemy();
},
createEnemy : function(){
//设置敌机的类型和产生的概率
//敌小机
setInterval(function(){
Math.random() > 0.5 ? new Enemy(0) : "";
},500)
//敌中机
setInterval(function(){
Math.random() > 0.5 ? new Enemy(1) : "";
},1000)
//敌大机
setInterval(function(){
Math.random() > 0.2 ? new Enemy(2) : "";
},8000)
}
};
//我方飞机
var Plane = {
//创建我方飞机
ele : $create('div','my-warplain'),
//初始化我方飞机
init : function(){
//放到页面
$addBody(this.ele);
//我方飞机定位
this.ele.style.left = document.documentElement.clientWidth / 2 - this.ele.offsetWidth / 2 + 'px';
this.ele.style.top = document.documentElement.clientHeight - this.ele.offsetHeight + 'px';
//调用我方飞机运动
this.fly();
},
fly : function(){
var that = this;
//获取引擎div
var bodyMain = document.getElementById("body_main");
//鼠标跟随
document.onmousemove = function(evt){
var e = evt || window.event;
//设置边界
var left = e.pageX - that.ele.offsetWidth / 2;
var top = e.pageY - that.ele.offsetHeight / 2;
if(left <= bodyMain.offsetLeft){
left = bodyMain.offsetLeft;
}
if(left >= bodyMain.offsetLeft + bodyMain.offsetWidth - that.ele.offsetWidth){
left = bodyMain.offsetLeft + bodyMain.offsetWidth - that.ele.offsetWidth;
}
that.ele.style.left = left + 'px';
that.ele.style.top = top + 'px';
}
},
fire : function(frequency){
var frequencyMe = 200; //默认的开火频率
switch(frequency){
case 0 : frequencyMe = 500;break;
case 1 : frequencyMe = 400;break;
case 2 : frequencyMe = 200;break;
case 3 : frequencyMe = 50;break;
} //设置子弹ID
var bulletId = 0;
var that = this;
setInterval(function(){
that.bullet.push(new Bullet(bulletId));
bulletId ++;
console.log(that.bullet);
},frequencyMe)
},
bullet : []
} //子弹
function Bullet(id){
this.id = id;
//创建子弹
this.ele = $create('div','bullet');
//初始化
this.init();
}
Bullet.prototype = {
init : function(){
//加到页面
$addBody(this.ele);
//给子弹添加id
this.ele.id = this.id;
//定位子弹
this.ele.style.left = Plane.ele.offsetLeft + Plane.ele.offsetWidth / 2 - this.ele.offsetWidth / 2 + 'px';
this.ele.style.top = Plane.ele.offsetTop - this.ele.offsetHeight + 'px';
//让子弹飞
this.fly();
},
fly : function(){
var that = this;
this.timer = setInterval(function(){
that.ele.style.top = that.ele.offsetTop - 15 + 'px';
if(that.ele.offsetTop <= 10){
that.boom(); //子弹爆炸
}
},30)
},
boom : function(){
this.ele.className = 'bullet_die';
clearInterval(this.timer);
var that = this;
setTimeout(function(){
that.ele.remove();
for(var i = 0,len = Plane.bullet.length;i < len;i ++){
if(that.ele.id == Plane.bullet[i].id){
Plane.bullet.splice(i,1);
}
}
},100)
}
}; //敌机
function Enemy(type){
this.type = type;
this.init();
}
Enemy.prototype = {
init : function(){
switch(this.type){
case 0 : this.ele = $create('div','enemy-small');this.hp = 1;this.speed = 10;break;
case 1 : this.ele = $create('div','enemy-middle');this.hp = 5;this.speed = 8;break;
case 2 : this.ele = $create('div','enemy-large');this.hp = 50;this.speed = 2;break;
}
//加到页面
$addBody(this.ele);
//定位敌机
this.position();
},
position : function(){
var bodyMain = document.getElementById("body_main");
this.ele.style.left = $random(bodyMain.offsetLeft,bodyMain.offsetLeft + bodyMain.offsetWidth - this.ele.offsetWidth) + 'px';
this.ele.style.top = - this.ele.offsetHeight + 'px';
//敌机起飞
this.fly();
},
fly : function(){
var that = this;
this.timer = setInterval(function(){
that.ele.style.top = that.ele.offsetTop + that.speed + 'px';
//碰撞检测
that.collision();
if(that.ele.offsetTop >= document.documentElement.clientHeight){
that.ele.remove();
clearInterval(that.timer);
}
},30)
},
collision : function(){
for(var i = 0;i < Plane.bullet.length;i ++){
if(!(this.ele.offsetTop + this.ele.offsetHeight < Plane.bullet[i].ele.offsetTop || Plane.bullet[i].ele.offsetTop + Plane.bullet[i].ele.offsetHeight < this.ele.offsetTop)){
if(!(Plane.bullet[i].ele.offsetLeft + Plane.bullet[i].ele.offsetWidth < this.ele.offsetLeft || this.ele.offsetLeft + this.ele.offsetWidth < Plane.bullet[i].ele.offsetLeft)){
Plane.bullet[i].boom();
this.hp --;
if(this.hp == 0){
this.ele.remove();
clearInterval(this.timer);
}
} }
}
}
}
//工具箱
//删除元素
Element.prototype.remove = function(){
this.parentNode.removeChild(this);
}
//创建对象并添加类名
function $create(tagName,className){
var ele = document.createElement(tagName);
ele.className = className;
return ele;
}
//将元素对象添加到页面中
function $addBody(obj){
document.body.appendChild(obj);
}
//随机整数
function $random(min,max){
return Math.floor(Math.random() * (max - min + 1) + min);
}
</script>
</head>
<body>
<div id="body_main" class="main">
<ul id="options" class="options">
<li value="1">超级困难</li>
<li value="2">非常困难</li>
<li value="3">比较困难</li>
<li value="4">就选我吧</li>
</ul>
</div>
</body>
</html>
三.ES6:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" href="dahuiji.css" />
<script type="text/javascript">
window.onload = function(){
new Engine();
}
//引擎
class Engine{
constructor(){
//属性
this.ele = document.getElementById("body_main");//获取引擎
//获取li
this.oUllis = this.ele.children[0].children;
//记录this
let that = this;
//遍历li,添加事件
for(let i = 0,len = this.oUllis.length;i < len;i ++){
//添加点击事件
this.oUllis[i].onclick = function(){
//删除ul选项
this.parentNode.remove();
//调用加载页面的方法
that.loadPage();
that.frequency = i;
}
}
}
//原型方法
loadPage(){
//创建logo
let logo = $create('div','logo');
//加到页面
$addBody(logo);
//创建loading
let loading = $create('div','loading');
//加到页面
$addBody(loading);
//设置loading动画
let index = 1;
let timer = setInterval(()=>{
loading.style.background = 'url(images/loading' + (index ++ % 3 + 1) + '.png) no-repeat';
},500);
//设置背景动画
let positionY = 1;
setInterval(()=>{
this.ele.style.backgroundPositionY = ++ positionY + 'px';
},30)
//3秒到达战场
setTimeout(()=>{
//清场
//删除logo
logo.remove();
//删除loading
loading.remove();
//停止loading动画
clearInterval(timer);
//开始游戏
this.gameStart();
},3000)
}
gameStart(){
//我方飞机入场
Plane.init();
//我方飞机开火
Plane.fire(this.frequency);
//创建敌机
this.createEnemy();
}
createEnemy (){
//设置敌机的类型和产生的概率
//敌小机
setInterval(function(){
Math.random() > 0.5 ? new Enemy(0) : "";
},500)
//敌中机
setInterval(function(){
Math.random() > 0.5 ? new Enemy(1) : "";
},1000)
//敌大机
setInterval(function(){
Math.random() > 0.2 ? new Enemy(2) : "";
},8000)
}
};
//我方飞机
var Plane = {
//创建我方飞机
ele : $create('div','my-warplain'),
//初始化我方飞机
init : function(){
//放到页面
$addBody(this.ele);
//我方飞机定位
this.ele.style.left = document.documentElement.clientWidth / 2 - this.ele.offsetWidth / 2 + 'px';
this.ele.style.top = document.documentElement.clientHeight - this.ele.offsetHeight + 'px';
//调用我方飞机运动
this.fly();
},
fly : function(){ //获取引擎div
let bodyMain = document.getElementById("body_main");
//鼠标跟随
document.onmousemove = (evt)=>{
var e = evt || window.event;
//设置边界
var left = e.pageX - this.ele.offsetWidth / 2;
var top = e.pageY - this.ele.offsetHeight / 2;
if(left <= bodyMain.offsetLeft){
left = bodyMain.offsetLeft;
}
if(left >= bodyMain.offsetLeft + bodyMain.offsetWidth - this.ele.offsetWidth){
left = bodyMain.offsetLeft + bodyMain.offsetWidth - this.ele.offsetWidth;
}
this.ele.style.left = left + 'px';
this.ele.style.top = top + 'px';
}
},
fire : function(frequency){
let frequencyMe = 200; //默认的开火频率
switch(frequency){
case 0 : frequencyMe = 500;break;
case 1 : frequencyMe = 400;break;
case 2 : frequencyMe = 200;break;
case 3 : frequencyMe = 50;break;
} //设置子弹ID
let bulletId = 0; setInterval(()=>{
this.bullet.push(new Bullet(bulletId));
bulletId ++;
},frequencyMe)
},
bullet : []
} //子弹
class Bullet{
constructor(id){
this.id = id;
//创建子弹
this.ele = $create('div','bullet');
//初始化
this.init();
}
init(){
//加到页面
$addBody(this.ele);
//给子弹添加id
this.ele.id = this.id;
//定位子弹
this.ele.style.left = Plane.ele.offsetLeft + Plane.ele.offsetWidth / 2 - this.ele.offsetWidth / 2 + 'px';
this.ele.style.top = Plane.ele.offsetTop - this.ele.offsetHeight + 'px';
//让子弹飞
this.fly();
}
fly(){ this.timer = setInterval(()=>{
this.ele.style.top = this.ele.offsetTop - 15 + 'px';
if(this.ele.offsetTop <= 10){
this.boom(); //子弹爆炸
}
},30)
}
boom(){
this.ele.className = 'bullet_die';
clearInterval(this.timer); setTimeout(()=>{
this.ele.remove();
for(var i = 0,len = Plane.bullet.length;i < len;i ++){
if(this.ele.id == Plane.bullet[i].id){
Plane.bullet.splice(i,1);
}
}
},100)
}
}; //敌机
class Enemy{
constructor(type){
this.type = type;
this.init();
}
init (){
switch(this.type){
case 0 : this.ele = $create('div','enemy-small');this.hp = 1;this.speed = 10;break;
case 1 : this.ele = $create('div','enemy-middle');this.hp = 5;this.speed = 8;break;
case 2 : this.ele = $create('div','enemy-large');this.hp = 50;this.speed = 2;break;
}
//加到页面
$addBody(this.ele);
//定位敌机
this.position();
}
position(){
let bodyMain = document.getElementById("body_main");
this.ele.style.left = $random(bodyMain.offsetLeft,bodyMain.offsetLeft + bodyMain.offsetWidth - this.ele.offsetWidth) + 'px';
this.ele.style.top = - this.ele.offsetHeight + 'px';
//敌机起飞
this.fly();
}
fly (){ this.timer = setInterval(()=>{
this.ele.style.top = this.ele.offsetTop + this.speed + 'px';
//碰撞检测
this.collision();
if(this.ele.offsetTop >= document.documentElement.clientHeight){
this.ele.remove();
clearInterval(this.timer);
}
},30)
}
collision(){
for(let i = 0;i < Plane.bullet.length;i ++){
if(!(this.ele.offsetTop + this.ele.offsetHeight < Plane.bullet[i].ele.offsetTop || Plane.bullet[i].ele.offsetTop + Plane.bullet[i].ele.offsetHeight < this.ele.offsetTop)){
if(!(Plane.bullet[i].ele.offsetLeft + Plane.bullet[i].ele.offsetWidth < this.ele.offsetLeft || this.ele.offsetLeft + this.ele.offsetWidth < Plane.bullet[i].ele.offsetLeft)){
Plane.bullet[i].boom();
this.hp --;
if(this.hp == 0){
this.ele.remove();
clearInterval(this.timer);
}
} }
}
}
}
//工具箱
//删除元素
Element.prototype.remove = function(){
this.parentNode.removeChild(this);
}
//创建对象并添加类名
function $create(tagName,className){
var ele = document.createElement(tagName);
ele.className = className;
return ele;
}
//将元素对象添加到页面中
function $addBody(obj){
document.body.appendChild(obj);
}
//随机整数
function $random(min,max){
return Math.floor(Math.random() * (max - min + 1) + min);
}
</script>
</head>
<body>
<div id="body_main" class="main">
<ul id="options" class="options">
<li value="1">超级困难</li>
<li value="2">非常困难</li>
<li value="3">比较困难</li>
<li value="4">就选我吧</li>
</ul>
</div>
</body>
</html>

23、svn与打飞机的更多相关文章

  1. 【吐血整理】svn命令行,Subversion的正确使用姿势~

    一.写在前面 前面一直博主一直用svn的桌面版本,但看项目经理一直都用的命令行方式,不为性能,还能直接装逼呀!在这里先感谢赵哥,也把它分享给感兴趣的你们~ 二.直接上干货 1. svn checkou ...

  2. 【吐血整理】SVN命令行,Subversion的正确使用姿势,让版本控制更简单~

    一.写在前面 前面一直博主一直用svn的桌面版本,但看项目经理一直都用的命令行方式,不为性能,还能直接装逼呀!在这里先感谢赵哥,也把它分享给感兴趣的你们~ 二.直接上干货 1. svn checkou ...

  3. LostRoutes项目日志——玩家飞机精灵Fighter解析

    Fighter类的定义在Fighter.js中,Fighter类继承与PhysicsSprite. 原版的Fighter.js: var Fighter = cc.PhysicsSprite.exte ...

  4. [.net 面向对象程序设计进阶] (23) 团队开发利器(二)优秀的版本控制工具SVN(上)

    [.net 面向对象程序设计进阶] (23) 团队开发利器(二)优秀的版本控制工具SVN(上) 本篇导读: 上篇介绍了常用的代码管理工具VSS,看了一下评论,很多同学深恶痛绝,有的甚至因为公司使用VS ...

  5. 2015第23周一SVN插件安装

    之前想把eclipse(3.7)的SVN插件版本从1.8.x降到1.6.x,上午折腾了好久没弄好,先是尝试在线安装,按网上说的1.6.x的url安装不成功(可能是网络问题,下载不到资源),然后尝试下载 ...

  6. svn 提交报错post-commit hook failed (exit code 23) with output

    svn 提交文件,hook同步更新报权限错误 排查后可能原因是被同步的服务器 selinux 已开启. 查看状态命令:/usr/sbin/sestatus -v  #如果SELinux status参 ...

  7. 23飞机大战__pygame 快速入门

      1. 使用 pygame 创建图形窗口 小节目标 游戏的初始化和退出 理解游戏中的坐标系 创建游戏主窗口 简单的游戏循环 可以将图片素材 绘制 到 游戏的窗口 上, 开发游戏之前需要先知道 如何建 ...

  8. SVN 基本的工作循环

    基本的工作循环 Subversion有许多特性.选项和华而不实的高级功能,但日常的工作中你只使用其中的一小部分,在这一节里,我们会介绍许多你在日常工作中常用的命令. 典型的工作周期是这样的: 更新你的 ...

  9. 【转】SVN与Git比较

    摘要Svn是目前得到大多数人认可,使用得最多的版本控制管理工具,而Git的优势在于易于本地增加分支和分布式的特性,可离线提交,解决了异地团队协同开发等svn不能解决的问题.本文就这两种版本控制工具的异 ...

随机推荐

  1. golang gob 有什么优势? gob/protobuf/json/xml 效率对比,benchmark 压力测试

    TODO 待研究: https://blog.csdn.net/love_se/article/details/7941876 https://blog.csdn.net/wangshubo1989/ ...

  2. Javascript 面向对象的编程思想

    面向对象,首先得有类的概念,没有类造不出来对象,,Javascript把函数名看成类. 其次分为不同结构层,如三层架构.MVC.MVVM. 本文根据实际项目演练,分为几个适用的结构层,如果项目不大一般 ...

  3. 运行Keras版本的Faster R-CNN(1)

    Keras版本的Faster R-CNN源码下载地址:https://github.com/yhenon/keras-frcnn下载以后,用PyCharm打开(前提是已经安装了Tensorflow-g ...

  4. mysqlpump 和 mysql_config_editor测试

    The mysql_config_editor utility enables you to store authentication credentials in an obfuscated log ...

  5. dagger2 重点笔记

    官方架构例子,里面有个dagger2的结合的例子 https://github.com/googlesamples/android-architecture https://google.github ...

  6. Linux如何统计进程的CPU利用率[转]

    0. 为什么写这篇博客 Linux的top或者ps都可以查看进程的cpu利用率,那为什么还需要了解这个细节呢.编写这篇文章呢有如下三个原因: * 希望在脚本中,能够以过”非阻塞”的方式获取进程cpu利 ...

  7. PHP会员找回密码功能实现实例介绍

    设置思路 1.用户注册时需要提供一个E-MAIL邮箱,目的就是用该邮箱找回密码. 2.当用户忘记密码或用户名时,点击登录页面的“找回密码”超链接,打开表单,并输入注册用的E-MAIL邮箱,提交. 3. ...

  8. LNMP环境的搭建(yum)方法(精)

    第一 先安装nginx nginx在官方CentOS社区yum里面没有,需要在nginx的官方网站去下载yum的配置文件 官方:https://www.nginx.com/resources/wiki ...

  9. 解决Warning Couldn't flush user prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.

    系统:Ubuntu 16.04 LTS 环境:vscode+java extension pack打开了一个gradle的java项目:另外,用一个terminal启动了groovysh 报错: gr ...

  10. 软件工程---gjb438b 质量规范体系

    GJB438B 软件设计说明模板 https://mp.weixin.qq.com/s?__biz=MjM5Mzc2NjczMQ%3D%3D&idx=3&mid=2651866777& ...