本文整理汇总了C#中Point3F类的典型用法代码示例。如果您正苦于以下问题:C# Point3F类的具体用法?C# Point3F怎么用?C# Point3F使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Point3F类属于命名空间,在下文中一共展示了Point3F类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: damage
public virtual void damage(GameBase sourceobject, Point3F position, float damage, string damagetype)
{
if (!isObject())
return;
ShapeBaseData datablock = getDataBlock();
datablock.damage(this, position, sourceobject, damage, damagetype);
}
开发者ID:souxiaosou,项目名称:OmniEngine.Net,代码行数:7,代码来源:ShapeBase.cs
示例2: onExplode
public override void onExplode(Projectile proj, Point3F pos, float fade)
{
// Damage objects within the projectiles damage radius
float radius = this["damageRadius"].AsFloat();
if (radius <= 0)
return;
string damageType = this["damageType"];
float areaImpulse = this["areaImpulse"].AsFloat();
float radiusDamage = this["radiusDamage"].AsFloat();
CustomObjects.Utilities.radiusDamage.RadiusDamage(proj, pos, radius, radiusDamage, damageType, areaImpulse);
}
开发者ID:souxiaosou,项目名称:OmniEngine.Net,代码行数:11,代码来源:ProjectileData.cs
示例3: onCollision
public override void onCollision(Projectile proj, SceneObject col, float fade, Point3F pos, Point3F normal)
{
// Apply damage to the object all shape base objects
if (this["directDamage"].AsFloat() > 0)
{
if ((console.getTypeMask(col) & (uint) SceneObjectTypesAsUint.ShapeBaseObjectType) == (uint) SceneObjectTypesAsUint.ShapeBaseObjectType)
{
ShapeBase shapebase = col._ID;
shapebase.damage(proj, pos, this["directDamage"].AsFloat(), this["damageType"]);
}
}
}
开发者ID:souxiaosou,项目名称:OmniEngine.Net,代码行数:12,代码来源:ProjectileData.cs
示例4: onCollision
public override void onCollision(ShapeBase obj, SceneObject collObj, Point3F vec, float len)
{
if (!((collObj.GetType() == typeof (Player)) || (collObj.GetType() == typeof (AIPlayer))))
return;
Player player = (Player) collObj;
if (player.getDamageLevel() <= 0.00 || player.getState() == "Dead")
return;
player.applyRepair(this["repairAmount"].AsFloat());
player.setEnergyLevel(1);
obj.schedule((100).AsString(), "startFade", "1000", "0", "true");
obj.schedule((1200).AsString(), "delete");
Audio.AudioServerPlay3D("HealthUseSound", player.getTransform());
}
开发者ID:souxiaosou,项目名称:OmniEngine.Net,代码行数:16,代码来源:HealthPatch.cs
示例5: undo
public override void undo()
{
DecalEditorGui DecalEditorGui = "DecalEditorGui";
int count = Util.getWordCount(this["oldTransformData"]);
if (this["instanceId"] != "" && count == 7)
{
string[] data = this["newTransformData"].Split(' ');
Point3F pos = new Point3F(data[0].AsFloat(), data[1].AsFloat(), data[2].AsFloat());
Point3F tan = new Point3F(data[3].AsFloat(), data[4].AsFloat(), data[5].AsFloat());
float size = data[6].AsFloat();
DecalEditorGui.editDecalDetails(this["instanceId"].AsUint(), pos, tan, size);
DecalEditorGui.syncNodeDetails();
DecalEditorGui.selectDecal(this["instanceId"].AsUint());
}
}
开发者ID:souxiaosou,项目名称:OmniEngine.Net,代码行数:17,代码来源:DecalEditorActions.cs
示例6: RadiusDamage
public static void RadiusDamage(GameBase sourceobject, Point3F position, float radius, float damage, string damageType, float impulse)
{
// Use the container system to iterate through all the objects
// within our explosion radius. We'll apply damage to all ShapeBase
// objects.
Dictionary<uint, float> r = tst.console.initContainerRadiusSearch(position, radius, (uint) SceneObjectTypesAsUint.ShapeBaseObjectType);
float halfRadius = radius/(float) 2.0;
foreach (ShapeBase targetObject in r.Keys)
{
// Calculate how much exposure the current object has to
// the explosive force. The object types listed are objects
// that will block an explosion. If the object is totally blocked,
// then no damage is applied.
UInt32 mask = (uint) SceneObjectTypesAsUint.TerrainObjectType | (uint) SceneObjectTypesAsUint.StaticShapeObjectType | (uint) SceneObjectTypesAsUint.VehicleObjectType;
float coverage = tst.Util.calcExplosionCoverage(new Point3F(position), targetObject, mask);
if (!coverage.AsBool())
continue;
float dist = r[targetObject];
// Calculate a distance scale for the damage and the impulse.
// Full damage is applied to anything less than half the radius away,
// linear scale from there.
float distScale = (float) ((dist < halfRadius) ? 1.0 : 1 - ((dist - halfRadius)/halfRadius));
// Apply the damage
targetObject.damage(sourceobject, position, (((damage)*coverage*distScale)), damageType);
// Apply the impulse
if (!impulse.AsBool())
continue;
TransformF impulseVec = new TransformF(targetObject.getWorldBoxCenter()) - new TransformF(position);
impulseVec = impulseVec.normalizeSafe();
impulseVec = impulseVec.vectorScale(impulse*distScale);
targetObject.applyImpulse(new Point3F(position), impulseVec.GetPosition());
}
}
开发者ID:souxiaosou,项目名称:OmniEngine.Net,代码行数:37,代码来源:RadiusDamage.cs
示例7: damage
public override void damage(ShapeBase obj, Point3F position, GameBase source, float damage, string damagetype)
{
// Explode if any damage is applied to the mine
int r = 50 + (new Random().Next(0, 50));
schedule(r.AsString(), "explode");
}
开发者ID:souxiaosou,项目名称:OmniEngine.Net,代码行数:6,代码来源:ProximityMineData.cs
示例8: onExplode
public override void onExplode(ProximityMine obj, Point3F pos)
{
if (this["damageRadius"].AsFloat() > 0)
radiusDamage.RadiusDamage(obj, pos, this["damageRadius"].AsFloat(), this["radiusDamage"].AsFloat(), this["damageType"], this["areaImpulse"].AsFloat());
}
开发者ID:souxiaosou,项目名称:OmniEngine.Net,代码行数:5,代码来源:ProximityMineData.cs
示例9: clientCmdPlayTeleportEffect
public static void clientCmdPlayTeleportEffect(Point3F position, SimDataBlock effectDataBlock)
{
if (!effectDataBlock.isObject())
return;
ObjectCreator tch = new ObjectCreator("Explosion");
tch["position"] = position.AsString();
tch["datablock"] = effectDataBlock;
tch.Create();
}
开发者ID:souxiaosou,项目名称:OmniEngine.Net,代码行数:9,代码来源:clientCmd.cs
示例10: unproject
public Point3F unproject(Point3F screenPosition){
return new Point3F ( pInvokes.m_ts.fnGuiTSCtrl_unproject(_ID, screenPosition.AsString()));
}
开发者ID:souxiaosou,项目名称:OmniEngine.Net,代码行数:4,代码来源:GuiTSCtrl_Base.cs
示例11: setLightDirection
public void setLightDirection(Point3F direction){
pInvokes.m_ts.fnGuiObjectView_setLightDirection(_ID, direction.AsString());
}
开发者ID:souxiaosou,项目名称:OmniEngine.Net,代码行数:4,代码来源:GuiObjectView_Base.cs
示例12: onAdd
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());
}
开发者ID:souxiaosou,项目名称:OmniEngine.Net,代码行数:67,代码来源:CheetahCar.cs
示例13: damage
public override void damage(ShapeBase obj, Point3F position, GameBase source, float damage, string damagetype)
{
if (obj.getDamageState() == "Dead")
return;
obj.applyDamage(damage);
for (int i = 0; i < this["numMountPoints"].AsInt(); i++)
{
Player player = obj.getMountNodeObject(i);
if (player != 0)
player.damage(source, position, 10000.0f, "");
}
}
开发者ID:souxiaosou,项目名称:OmniEngine.Net,代码行数:14,代码来源:TurretShapeData.cs
示例14: onCollision
public virtual void onCollision(Projectile proj, SceneObject col, float fade, Point3F pos, Point3F normal){}
开发者ID:souxiaosou,项目名称:OmniEngine.Net,代码行数:1,代码来源:ProjectileData_Base.cs
示例15: onExplode
public virtual void onExplode(Projectile proj, Point3F pos, float fade){}
开发者ID:souxiaosou,项目名称:OmniEngine.Net,代码行数:1,代码来源:ProjectileData_Base.cs
示例16: getLink
public int getLink(Point3F pos){
return pInvokes.m_ts.fnNavMesh_getLink(_ID, pos.AsString());
}
开发者ID:souxiaosou,项目名称:OmniEngine.Net,代码行数:4,代码来源:NavMesh_Base.cs
示例17: addLink
public int addLink(Point3F from, Point3F to, uint flags = 0){
return pInvokes.m_ts.fnNavMesh_addLink(_ID, from.AsString(), to.AsString(), flags);
}
开发者ID:souxiaosou,项目名称:OmniEngine.Net,代码行数:4,代码来源:NavMesh_Base.cs
示例18: damage
public virtual void damage(ShapeBase obj, Point3F position, GameBase source, float damage, string damagetype)
{
// Ignore damage by default. This empty method is here to
// avoid console warnings.
}
开发者ID:souxiaosou,项目名称:OmniEngine.Net,代码行数:5,代码来源:ShapeBaseData.cs
示例19: project
public Point3F project(Point3F worldPosition){
return new Point3F ( pInvokes.m_ts.fnGuiTSCtrl_project(_ID, worldPosition.AsString()));
}
开发者ID:souxiaosou,项目名称:OmniEngine.Net,代码行数:4,代码来源:GuiTSCtrl_Base.cs
示例20: damage
public override void damage(GameBase sourceobject, Point3F position, float damage, string damagetype)
{
((TurretShapeData) (getDataBlock())).damage(this, position, sourceobject, damage, damagetype);
}
开发者ID:souxiaosou,项目名称:OmniEngine.Net,代码行数:4,代码来源:TurretShape.cs
注:本文中的Point3F类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论