Beispiel #1
0
/// <summary>
/// @brief .)
/// </summary>
public  void setFrustumOffset(Point4F offset){


m_ts.fn_setFrustumOffset(offset.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());
        }
Beispiel #3
0
/// <summary>
/// Return the integer character code value corresponding to the first character in the given string.
/// )
/// 
/// </summary>
public  Point4F dnt_testcase_10(Point4F chr){


return new Point4F ( m_ts.fn_dnt_testcase_10(chr.AsString()));
}