Beispiel #1
0
        public BaseBall built(int val)
        {
            BaseBall ball = new BaseBall(color,Vector2.Zero,0,texture,val);
            ball.setColor(color);
            switch(impactType){
                case "SubImpact":
                    ball.setImpact(new SubImpact(ball));
                    break;
                default:
                    ball.setImpact(new ImpactInterface(ball));
                    break;

            }

            switch(roadType){

                case "Rush":
                    ball.setRoad(new Rush(ball));
                    break;

                case "RandomRoad":
                    ball.setRoad(new RandomRoad(ball));
                    break;

                case "LinerRoad":
                    ball.setRoad(new LinerRoad(ball));
                    break;

                default:
                    ball.setRoad(new RandomRoad(ball));
                    break;
            }

            return ball;
        }
Beispiel #2
0
        public BaseBall built(int val)
        {
            BaseBall ball = new BaseBall(color, Vector2.Zero, 0, texture, val);

            ball.setColor(color);
            switch (impactType)
            {
            case "SubImpact":
                ball.setImpact(new SubImpact(ball));
                break;

            default:
                ball.setImpact(new ImpactInterface(ball));
                break;
            }

            switch (roadType)
            {
            case "Rush":
                ball.setRoad(new Rush(ball));
                break;

            case "RandomRoad":
                ball.setRoad(new RandomRoad(ball));
                break;

            case "LinerRoad":
                ball.setRoad(new LinerRoad(ball));
                break;

            default:
                ball.setRoad(new RandomRoad(ball));
                break;
            }


            return(ball);
        }
Beispiel #3
0
 public SubImpact(BaseBall ball) : base(ball)
 {
     ball.setColor(Color.Red);
 }
Beispiel #4
0
 public SubImpact(BaseBall ball)
     : base(ball)
 {
     ball.setColor(Color.Red);
 }