コード例 #1
0
        public override void onRemove(GameBase obj)
        {
            for (int i = 0; i < this["numMountPoints"].AsInt(); i++)
            {
                if (obj.getMountNodeObject(i) == 0)
                {
                    continue;
                }

                Player passenger = obj.getMountNodeObject(i).AsString();

                //change to csharp
                ((TurretShapeData)passenger.getDataBlock()).call("doDismount", true.AsString());
            }
        }
コード例 #2
0
ファイル: Vehicle.cs プロジェクト: souxiaosou/OmniEngine.Net
 public override void onRemove(GameBase obj)
 {
     // if there are passengers/driver, kick them out
     for (int i = 0; i < ((VehicleData) obj.getDataBlock())["numMountPoints"].AsInt(); i++)
         {
         if (!((SimObject) obj.getMountNodeObject(i)).isMemberOfClass("Player"))
             continue;
         Player passenger = obj.getMountNodeObject(i);
         if (passenger != "0")
             {
             PlayerData passengerdatablock = passenger.getDataBlock();
             passengerdatablock.doDismount(passenger);
             }
         }
 }
コード例 #3
0
 public override void onRemove(GameBase obj)
 {
     // if there are passengers/driver, kick them out
     for (int i = 0; i < ((VehicleData)obj.getDataBlock())["numMountPoints"].AsInt(); i++)
     {
         if (!((SimObject)obj.getMountNodeObject(i)).isMemberOfClass("Player"))
         {
             continue;
         }
         Player passenger = obj.getMountNodeObject(i);
         if (passenger != "0")
         {
             PlayerData passengerdatablock = passenger.getDataBlock();
             passengerdatablock.doDismount(passenger);
         }
     }
 }
コード例 #4
0
        public override void onRemove(GameBase obj)
        {
            for (int i = 0; i < this["numMountPoints"].AsInt(); i++)
                {
                if (obj.getMountNodeObject(i) == 0)
                    continue;

                Player passenger = obj.getMountNodeObject(i).AsString();

                //change to csharp
                ((TurretShapeData) passenger.getDataBlock()).call("doDismount", true.AsString());
                }
        }