From 0c327abcee3c4c4139e954f94508683aafd90e99 Mon Sep 17 00:00:00 2001 From: Kernell Date: Wed, 23 Dec 2015 23:27:08 +0300 Subject: [PATCH] Added ColCircle, ColCuboid, ColSphere, ColRectangle, ColPolygon and ColTube classes --- MultiTheftAuto/ColShape.cs | 56 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 3 deletions(-) diff --git a/MultiTheftAuto/ColShape.cs b/MultiTheftAuto/ColShape.cs index c2211cc..39048b4 100644 --- a/MultiTheftAuto/ColShape.cs +++ b/MultiTheftAuto/ColShape.cs @@ -8,14 +8,64 @@ namespace MultiTheftAuto { public class ColShape : Element { - #region Constructors - public ColShape( UInt32 userdata ) : base( userdata ) { } + } - #endregion + public class ColCircle : ColShape + { + public ColCircle( float x, float y, float radius ) + : base( Native.ColShape.CreateCircle( x, y, radius ) ) + { + + } + } + + public class ColCuboid : ColShape + { + public ColCuboid( float x, float y, float z, float width, float depth, float height ) + : base( Native.ColShape.CreateCuboid( x, y, z, width, depth, height ) ) + { + + } + } + + public class ColSphere : ColShape + { + public ColSphere( float x, float y, float z, float fadius ) + : base( Native.ColShape.CreateSphere( x, y, z, fadius ) ) + { + + } + } + + public class ColRectangle : ColShape + { + public ColRectangle( float x, float y, float width, float height ) + : base( Native.ColShape.CreateRectangle( x, y, width, height ) ) + { + + } + } + + public class ColPolygon : ColShape + { + public ColPolygon( float x, float y, float x1, float y1, float x2, float y2, float x3, float y3, params float[] args ) + : base( Native.ColShape.CreatePolygon( x, y, x1, y1, x2, y2, x3, y3, args ) ) + { + + } + } + + public class ColTube : ColShape + { + public ColTube( float x, float y, float z, float radius, float height ) + : base( Native.ColShape.CreateTube( x, y, z, radius, height ) ) + { + + } } }