protected static LCarPacket GetCarPacket(int carIdx) { LCarPacket result = null; MGIGameMaster mgigameMaster = MGIGameMaster.TryGlobal(); if (mgigameMaster != null && mgigameMaster.HasPhysicsStarted() && mgigameMaster.IsFocusCar(carIdx)) { int focusCar = MGIGameMaster.GetGlobal().GetFocusCar(carIdx); result = MGIProviderManager.GetGlobal().GetPhysXProvider().GetCarPacket(focusCar); } return(result); }
protected static Transform GetCarTransform(int carIdx) { Transform result = null; MGIGameMaster mgigameMaster = MGIGameMaster.TryGlobal(); MGIPhysXProvider physXProvider = MGIPhysXProvider.GetGlobal(); if (physXProvider != null && mgigameMaster != null && mgigameMaster.HasPhysicsStarted() && mgigameMaster.IsFocusCar(carIdx)) { int focusCar = MGIGameMaster.GetGlobal().GetFocusCar(carIdx); result = physXProvider.GetCarTransform(focusCar); } return(result); }
protected static Rigidbody GetCarBody(int carIdx) { Rigidbody result = null; MGIGameMaster mgigameMaster = MGIGameMaster.TryGlobal(); MGIPhysXProvider physXProvider = MGIPhysXProvider.GetGlobal(); if (physXProvider != null && mgigameMaster != null && mgigameMaster.HasPhysicsStarted() && mgigameMaster.IsFocusCar(carIdx)) { int focusCar = MGIGameMaster.GetGlobal().GetFocusCar(carIdx); result = physXProvider.GetRigidBody(focusCar); } return(result); }