示例#1
0
 public virtual Boolean impact(BaseBall otherBall)
 {
     if (ball.getVal() < otherBall.getVal())
     {
         otherBall.addVal(ball.getVal() / 10);
         return(true);
     }
     else
     {
         return(false);
     }
 }
示例#2
0
 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);
     }
 }
示例#3
0
        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;
        }
示例#4
0
        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);
        }
示例#5
0
 public override bool impact(BaseBall otherBall)
 {
     if (ball.getVal() < otherBall.getVal())
     {
         otherBall.addVal(-ball.getVal() / 10);
         return(true);
     }
     else
     {
         return(false);
     }
 }
示例#6
0
 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);
     }
 }
示例#7
0
        public override bool impact(BaseBall otherBall)
        {
            if (ball.getVal() < otherBall.getVal())
            {
                otherBall.addVal(-ball.getVal() / 10);
                return true;
            }
            else
            {

                return false;
            }
        }
示例#8
0
        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);
        }