Ejemplo n.º 1
0
        public void FireTurret()
        {
            double  turretAngle  = playerTurret.Angle;
            Vector2 ballVelocity = Vector2.FromAngleAndLength(turretAngle, FIRE_SPEED);

            if (gameSettings.Mode == GameMode.Normal)
            {
                Ball myBall = new Ball(ballRadius, playerTurret.EndLocation, ballVelocity);
                ballManager.AddItem(myBall);
            }
            else if (gameSettings.Mode == GameMode.Lion)
            {
                bool     optimized = gameSettings.OptimizeGraphics;
                LionBall lionBall  = new LionBall(ballRadius, playerTurret.EndLocation, ballVelocity, optimized);
                ballManager.AddItem(lionBall);
            }
        }
Ejemplo n.º 2
0
        public void AddStickFigure(int x, int y)
        {
            StickFigure figure = new StickFigure(new Vector2(x, y), new Vector2(0, 0), 25, 50, 0.4);

            stickFigureManager.AddItem(figure);
        }