Fixed argument list for Shape::CreatePolygon internal method

This commit is contained in:
Kernell 2015-12-23 23:31:08 +03:00
parent 930b6a02b1
commit 1192a4d21c
2 changed files with 7 additions and 2 deletions

View File

@ -526,7 +526,7 @@ public:
static DWORD CreateCuboid ( MonoObject* pPosition, MonoObject* vecSize );
static DWORD CreateSphere ( MonoObject* pPosition, float fRadius );
static DWORD CreateRectangle ( MonoObject* pPosition, MonoObject* vecSize );
static DWORD CreatePolygon ( MonoArray* vecPointList );
static DWORD CreatePolygon ( float fX, float fY, float fX1, float fY1, float fX2, float fY2, float fX3, float fY3, MonoArray* vecPointList );
static DWORD CreateTube ( MonoObject* pPosition, float fRadius, float fHeight );
};

View File

@ -64,11 +64,16 @@ DWORD CMonoFunctions::Shape::CreateRectangle( MonoObject* pPosition, MonoObject*
return NULL;
}
DWORD CMonoFunctions::Shape::CreatePolygon( MonoArray* pPointList )
DWORD CMonoFunctions::Shape::CreatePolygon( float fX, float fY, float fX1, float fY1, float fX2, float fY2, float fX3, float fY3, MonoArray* pPointList )
{
if( RESOURCE )
{
vector< Vector2 > vecPointList;
vecPointList.push_back( Vector2( fX, fY ) );
vecPointList.push_back( Vector2( fX1, fY1 ) );
vecPointList.push_back( Vector2( fX2, fY2 ) );
vecPointList.push_back( Vector2( fX3, fY3 ) );
for( unsigned int i = 0; i < mono_array_length( pPointList ); i++ )
{