diff --git a/MultiTheftAuto b/MultiTheftAuto index d710f1e..a6ae31b 160000 --- a/MultiTheftAuto +++ b/MultiTheftAuto @@ -1 +1 @@ -Subproject commit d710f1ef59317a4ad3659f30bfb36c2f6eb68d15 +Subproject commit a6ae31bce8e6af03e6d4f08f9dd648ac6d357b6a diff --git a/Test/Resource.cs b/Test/Resource.cs index 4d2f491..e7fcbb1 100644 --- a/Test/Resource.cs +++ b/Test/Resource.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using MultiTheftAuto; -using MultiTheftAuto.Native; namespace Test { @@ -9,13 +8,13 @@ namespace Test { public Resource() { - var vehicles = new List( 10 ); + var vehicles = new List( 10 ); 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 ); } @@ -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() ); } } }