public void drawLine(Point3F a, Point3F b, ColorF color = null ){ if (color== null) {color = new ColorF(1.0f, 1.0f, 1.0f,1.0f);} pInvokes.m_ts.fnDebugDrawer_drawLine(_ID, a.AsString(), b.AsString(), color.AsString()); }
public override void onAdd(GameBase obj) { WheeledVehicle vehicle = obj._ID; base.onAdd(obj); WheeledVehicleTire CheetahCarTire = "CheetahCarTire"; WheeledVehicleTire CheetahCarTireRear = "CheetahCarTireRear"; WheeledVehicleSpring CheetahCarSpring = "CheetahCarSpring"; //int nsd = (nameSpaceDepth.AsInt() + 1); //console.ParentExecute(datablock, "onAdd", nsd, new string[] { datablock, vehicle.ID }); vehicle.setWheelTire(0, CheetahCarTire); vehicle.setWheelTire(1, CheetahCarTire); vehicle.setWheelTire(2, CheetahCarTireRear); vehicle.setWheelTire(3, CheetahCarTireRear); // Setup the car with some tires & springs for (int i = vehicle.getWheelCount() - 1; i >= 0; i--) { vehicle.setWheelPowered(i, true); vehicle.setWheelSpring(i, CheetahCarSpring); } // Steer with the front tires vehicle.setWheelSteering(0, 1); vehicle.setWheelSteering(1, 1); // Add tail lights ObjectCreator tc = new ObjectCreator("PointLight", ""); tc["radius"] = 1; tc["isEnabled"] = false; tc["color"] = new ColorF(1, 0, 0.141176f, 1); // , @"""1 0 0.141176 1"""); tc["brightness"] = 2; tc["castShadows"] = true; tc["priority"] = 1; tc["animate"] = false; tc["animationPeriod"] = 1; tc["animationPhase"] = 1; tc["flareScale"] = 1; tc["attenuationRatio"] = new Point3F(0, 1, 1); //, @"""0 1 1"""); tc["shadowType"] = "\"DualParaboloidSinglePass\""; tc["texSize"] = 512; tc["overDarkFactor"] = new Point4F(2000, 1000, 500, 100); //, @"""2000 1000 500 100"""); tc["shadowDistance"] = 400; // "400"); tc["shadowSoftness"] = 0.15; tc["numSplits"] = 1; //, "1"); tc["logWeight"] = 0.91; tc["fadeStartDistance"] = 0; //, "0"); tc["lastSplitTerrainOnly"] = false; tc["representedInLightmap"] = false; //, "0"); tc["shadowDarkenColor"] = new ColorF(0, 0, 0, -1); //, @"""0 0 0 -1"""); tc["includeLightmappedGeometryInShadow"] = false; //, "0"); tc["rotation"] = new AngAxisF(1, 0, 0, 0); //, @"""1 0 0 0 """); tc["canSave"] = true; //, "1"); tc["canSaveDynamicFields"] = true; //, "1"); tc["splitFadeDistances"] = "10 20 30 40"; vehicle["rightBrakeLight"] = ((PointLight) tc.Create()); vehicle["leftBrakeLight"] = ((PointLight) tc.Create()); vehicle["inv[BulletAmmo]"] = "1000"; // Mount a ShapeBaseImageData vehicle.mountImage("TurretImage", this["turretSlot"].AsInt(), true, string.Empty); // Mount the brake lights vehicle.mountObject(vehicle["rightBrakeLight"], this["rightBrakeSlot"].AsInt(), new TransformF()); vehicle.mountObject(vehicle["leftbrakelight"], this["leftBrakeSlot"].AsInt(), new TransformF()); }
public void setLightColor(ColorF color){ pInvokes.m_ts.fnGuiObjectView_setLightColor(_ID, color.AsString()); }
public void setLightColor(ColorF color){ pInvokes.m_ts.fnGuiMaterialPreview_setLightColor(_ID, color.AsString()); }
public void setItemColor(int index, ColorF color){ pInvokes.m_ts.fnGuiListBoxCtrl_setItemColor(_ID, index, color.AsString()); }
/// <summary> /// Return the integer character code value corresponding to the first character in the given string. /// ) /// /// </summary> public ColorF dnt_testcase_4(ColorF chr){ return new ColorF ( m_ts.fn_dnt_testcase_4(chr.AsString())); }
/// <summary> /// Draws a line primitive between two 3d points. ) /// </summary> public void drawLine(string debugdrawer, Point3F a, Point3F b, ColorF color = null ){ if (color== null) {color = new ColorF(1.0f, 1.0f, 1.0f,1.0f);} m_ts.fnDebugDrawer_drawLine(debugdrawer, a.AsString(), b.AsString(), color.AsString()); }
/// <summary> /// @brief Changes the color of the fog. /// @params new_color the new fog color (rgb 0.0 - 1.0, a is ignored.) /// /// </summary> public void SetFogColorF(string volumetricfog, ColorF new_color){ m_ts.fnVolumetricFog_SetFogColorF(volumetricfog, new_color.AsString()); }
/// <summary> /// @brief Set the light color on the sun object used to render the model. @param color Color of sunlight. @tsexample // Set the color value for the sun %color = \"1.0 0.4 0.5\"; // Inform the GuiObjectView object to change the sun color to the defined value %thisGuiObjectView.setLightColor(%color); @endtsexample @see GuiControl) /// </summary> public void setLightColor(string guiobjectview, ColorF color){ m_ts.fnGuiObjectView_setLightColor(guiobjectview, color.AsString()); }
/// <summary> /// Sets the color of the light in the scene.) /// </summary> public void setLightColor(string guimaterialpreview, ColorF color){ m_ts.fnGuiMaterialPreview_setLightColor(guimaterialpreview, color.AsString()); }
/// <summary> /// @brief Sets the color of a single list entry at the specified index id. @param index Index id to modify the color of in the list. @param color Color value to set the list entry to. @tsexample // Define the index id value %index = \"5\"; // Define the color value %color = \"1.0 0.0 0.0\"; // Inform the GuiListBoxCtrl object to change the color of the requested index %thisGuiListBoxCtrl.setItemColor(%index,%color); @endtsexample @see GuiControl) /// </summary> public void setItemColor(string guilistboxctrl, int index, ColorF color){ m_ts.fnGuiListBoxCtrl_setItemColor(guilistboxctrl, index, color.AsString()); }
public void SetFogColorF(ColorF new_color){ pInvokes.m_ts.fnVolumetricFog_SetFogColorF(_ID, new_color.AsString()); }