コード例 #1
0
public virtual  void onEnterLiquid(Vehicle obj, float coverage, string type){}
コード例 #2
0
public virtual  void onLeaveLiquid(Vehicle obj, string type){}
コード例 #3
0
ファイル: Vehicle.cs プロジェクト: souxiaosou/OmniEngine.Net
 public virtual void mountPlayer(Vehicle vehicle, Player player)
 {
     if (!vehicle.isObject() || vehicle.getDamageState() == "Destroyed")
         return;
     player.startFade(1000, 0, true);
     this.schedule("1000", "setMountVehicle", vehicle, player);
     player.schedule("1500", "startFade", "1000", "0", "false");
 }
コード例 #4
0
ファイル: Vehicle.cs プロジェクト: souxiaosou/OmniEngine.Net
 public virtual void isMountable(Vehicle obj, bool val)
 {
     obj["mountable"] = val.AsString();
 }
コード例 #5
0
ファイル: Vehicle.cs プロジェクト: souxiaosou/OmniEngine.Net
 public virtual int switchSeats(Vehicle vehicle, Player player)
 {
     for (int i = 0; i < this["numMountPoints"].AsInt(); i++)
         {
         int node = vehicle.getMountNodeObject(i);
         if (node == player || node > 0)
             continue;
         if (node == 0)
             return i;
         }
     return -1;
 }
コード例 #6
0
ファイル: Vehicle.cs プロジェクト: souxiaosou/OmniEngine.Net
 public virtual int findEmptySeat(Vehicle vehicle, Player player)
 {
     for (int i = 0; i < this["numMountPoints"].AsInt(); i++)
         {
         int node = vehicle.getMountNodeObject(i);
         if (node != 0)
             return i;
         }
     return -1;
 }
コード例 #7
0
ファイル: Vehicle.cs プロジェクト: souxiaosou/OmniEngine.Net
        public virtual void setMountVehicle(Vehicle vehicle, Player player)
        {
            if (!vehicle.isObject() || vehicle.getDamageState() == "Destroyed")
                return;

            int node = findEmptySeat(vehicle, player);
            if (node == -1)
                return;
            vehicle.mountObject(player, node, new TransformF());
            player["mVehicle"] = vehicle;
        }