Beispiel #1
0
        private void DrawAttatchment(MyVector offset, AttatchementType attatchment)
        {
            MyVector worldAttatchment = _ship.Ball.Rotation.GetRotatedVector(offset, true);

            worldAttatchment.Add(_ship.Ball.Position);

            switch (attatchment)
            {
            case AttatchementType.Thruster:
                _picturebox.FillCircle(Color.Silver, worldAttatchment, 60d);
                _picturebox.DrawCircle(Color.Black, 1d, worldAttatchment, 60d);
                break;

            case AttatchementType.Tractor:
                _picturebox.FillCircle(Color.Olive, worldAttatchment, 40d);
                _picturebox.DrawCircle(Color.Black, 1d, worldAttatchment, 40d);
                break;

            case AttatchementType.Cannon:
                _picturebox.FillCircle(Color.Brown, worldAttatchment, 30d);
                _picturebox.DrawCircle(Color.Black, 1d, worldAttatchment, 30d);
                break;

            case AttatchementType.MachineGun:
                _picturebox.FillCircle(Color.Brown, worldAttatchment, 25d);
                _picturebox.DrawCircle(Color.Black, 1d, worldAttatchment, 25d);
                break;
            }
        }
        private void DrawAttatchment(MyVector offset, AttatchementType attatchment)
        {
            MyVector worldAttatchment = _ship.Ball.Rotation.GetRotatedVector(offset, true);
            worldAttatchment.Add(_ship.Ball.Position);

            switch (attatchment)
            {
                case AttatchementType.Thruster:
                    _picturebox.FillCircle(Color.Silver, worldAttatchment, 60d);
                    _picturebox.DrawCircle(Color.Black, 1d, worldAttatchment, 60d);
                    break;

                case AttatchementType.Tractor:
                    _picturebox.FillCircle(Color.Olive, worldAttatchment, 40d);
                    _picturebox.DrawCircle(Color.Black, 1d, worldAttatchment, 40d);
                    break;

                case AttatchementType.Cannon:
                    _picturebox.FillCircle(Color.Brown, worldAttatchment, 30d);
                    _picturebox.DrawCircle(Color.Black, 1d, worldAttatchment, 30d);
                    break;

                case AttatchementType.MachineGun:
                    _picturebox.FillCircle(Color.Brown, worldAttatchment, 25d);
                    _picturebox.DrawCircle(Color.Black, 1d, worldAttatchment, 25d);
                    break;
            }
        }