public virtual Boolean impact(BaseBall otherBall) { if (ball.getVal() < otherBall.getVal()) { otherBall.addVal(ball.getVal() / 10); return(true); } else { return(false); } }
public virtual Boolean impact(BaseBall otherBall) { if (ball.getVal() < otherBall.getVal()) { otherBall.addVal(ball.getVal() / 10); ScoreBoard.getInstance().addScore(ball.getVal() / 10); return(true); } else { return(false); } }
public override bool impact(BaseBall otherBall) { if(player.getVal()<otherBall.getVal()){ //玩家被大球吃 player.dead(); }else if(player.getVal()==otherBall.getVal()){ //TODO:相等的时候处理,现在这个不太好 otherBall.addVal(-new Random().Next(otherBall.getVal()/2)); player.addVal(-new Random().Next(player.getVal() / 2)); } return true; }
public override bool impact(BaseBall otherBall) { if (player.getVal() < otherBall.getVal()) { //玩家被大球吃 player.dead(); } else if (player.getVal() == otherBall.getVal()) { //TODO:相等的时候处理,现在这个不太好 otherBall.addVal(-new Random().Next(otherBall.getVal() / 2)); player.addVal(-new Random().Next(player.getVal() / 2)); } return(true); }
public override bool impact(BaseBall otherBall) { if (ball.getVal() < otherBall.getVal()) { otherBall.addVal(-ball.getVal() / 10); return(true); } else { return(false); } }
public override bool impact(BaseBall otherBall) { if (ball.getVal() < otherBall.getVal()) { otherBall.addVal(-ball.getVal() / 10); ScoreBoard.getInstance().addScore(-ball.getVal() / 10); return(true); } else { return(false); } }
public override bool impact(BaseBall otherBall) { if (ball.getVal() < otherBall.getVal()) { otherBall.addVal(-ball.getVal() / 10); return true; } else { return false; } }
public override bool impact(BaseBall otherBall) { if (player.getVal() <= otherBall.getVal()) { //玩家被大球吃 if (detaTime <= 0) { player.dead(); } else { Resourse.getInstance().deadSound.Play(); player.addVal(-2); detaTime--; } } return(true); }