コード例 #1
0
ファイル: TankTurret.cs プロジェクト: MaciejZ95/TanksOnline
        public TankTurret(float radius, float length)
        {
            _rad   = radius;
            _len   = length;
            _cabin = new TankCabin(radius)
            {
                FillColor        = Color.Green,
                OutlineColor     = Color.Black,
                OutlineThickness = radius * 0.075f
            };

            _turret = new RectangleShape(new Vector2f(radius * 0.5f, length))
            {
                FillColor        = Color.Green,
                OutlineColor     = Color.Black,
                OutlineThickness = radius * 0.075f,
                Position         = new Vector2f(radius, radius),
                Origin           = new Vector2f(radius * 0.25f, 0f),
                Rotation         = 270f
            };
        }
コード例 #2
0
 public TankCabin(TankCabin copy) : base((Shape)copy)
 {
     this.Radius = copy.Radius;
     this.SetPointCount(copy.GetPointCount());
 }