Raul Posted October 18, 2010 Share Posted October 18, 2010 When I was learning Leadwerks and C++ I have started a little project (a FPS) In my player class I have a void: void cPlayer::CreatePlayer() { //controller PlayerController=CreateController(1.8,0.45,0.3,46); EntityType(PlayerController,1); SetBodyMass(PlayerController,100); . . . } Now I am trying to translate this one in C#: I used: class cPlayer { Controller playerController = new Controller(1.8f, 0.45f, 0.3f, 46f); public void createPlayer() { //controller } } Now I should call the EntityType and SetBodyMass functions. But if I call Core.EntityType I receive the IntPtr error. How should I manage this one? Quote i5 2.7Ghz, GTS 450, 8GB Ram, Win7 x64; Win8 x64 rvlgames.com - my games RVL Games Facebook Page, YouTube Channel Blitzmax Link to comment Share on other sites More sharing options...
L B Posted October 19, 2010 Share Posted October 19, 2010 Stop using Core! I'm making it Internal in the LE3 release. Gosh. Use the following: if (playerController.LeadwerksType == EntityType.Model) { playerController.Mass = 2; } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.