Test updated

This commit is contained in:
Dmitry Korolev 2014-10-17 12:34:42 +04:00
parent 9de5c26385
commit 7276f74774
2 changed files with 6 additions and 7 deletions

@ -1 +1 @@
Subproject commit d710f1ef59317a4ad3659f30bfb36c2f6eb68d15 Subproject commit a6ae31bce8e6af03e6d4f08f9dd648ac6d357b6a

View File

@ -1,7 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using MultiTheftAuto; using MultiTheftAuto;
using MultiTheftAuto.Native;
namespace Test namespace Test
{ {
@ -9,13 +8,13 @@ namespace Test
{ {
public Resource() public Resource()
{ {
var vehicles = new List<UInt32>( 10 ); var vehicles = new List<Vehicle>( 10 );
for( int i = 0; i < vehicles.Capacity; i++ ) for( int i = 0; i < vehicles.Capacity; i++ )
{ {
UInt32 vehicle = Vehicle.Create( 562, new Vector3( 192.0f, 168.0f, 10.0f ) * i, new Vector3( 0.0f, 0.0f, 0.0f ) ); Vehicle vehicle = new Vehicle( 562, new Vector3( 192.0f, 168.0f, 10.0f ) * i, new Vector3( 0.0f, 0.0f, 0.0f ) );
if( vehicle != 0 ) if( vehicle.IsValid() )
{ {
vehicles.Add( vehicle ); vehicles.Add( vehicle );
} }
@ -25,9 +24,9 @@ namespace Test
} }
} }
foreach( UInt32 vehicle in vehicles ) foreach( Vehicle vehicle in vehicles )
{ {
Debug.Log( "{0} {1}", vehicle, Element.GetPosition( vehicle ) ); Debug.Log( "{0} {1}", vehicle, vehicle.GetPosition() );
} }
} }
} }