예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }