Exemplo n.º 1
0
        public override void Initialize()
        {
            graphicsDevice = Services.GetServiceAs <IGraphicsDeviceService>().GraphicsDevice;

            triggerMaterial   = PhysicsDebugShapeMaterial.Create(graphicsDevice, Color.AdjustSaturation(Color.Purple, 0.77f), 1);
            staticMaterial    = PhysicsDebugShapeMaterial.Create(graphicsDevice, Color.AdjustSaturation(Color.Red, 0.77f), 1);
            dynamicMaterial   = PhysicsDebugShapeMaterial.Create(graphicsDevice, Color.AdjustSaturation(Color.Green, 0.77f), 1);
            kinematicMaterial = PhysicsDebugShapeMaterial.Create(graphicsDevice, Color.AdjustSaturation(Color.Blue, 0.77f), 1);
            characterMaterial = PhysicsDebugShapeMaterial.Create(graphicsDevice, Color.AdjustSaturation(Color.LightPink, 0.77f), 1);
        }
Exemplo n.º 2
0
        public override void Initialize()
        {
            graphicsDevice = Services.GetSafeServiceAs <IGraphicsDeviceService>().GraphicsDevice;

            foreach (var typeObject in Enum.GetValues(typeof(ComponentType)))
            {
                var type = (ComponentType)typeObject;
                componentTypeDefaultMaterial[type]     = PhysicsDebugShapeMaterial.CreateDefault(graphicsDevice, Color.AdjustSaturation(componentTypeColor[type], 0.77f), 1);
                componentTypeStaticPlaneMaterial[type] = componentTypeDefaultMaterial[type];
                // TODO enable this once material is implemented.
                // ComponentTypeStaticPlaneMaterial[type] = PhysicsDebugShapeMaterial.CreateStaticPlane(graphicsDevice, Color.AdjustSaturation(ComponentTypeColor[type], 0.77f), 1);
            }
        }