Examples of Train


Examples of TrackRider.Train

   
    this.generateMap();
    this.map.initializeStations();
    this.map.updateRails();

    train = new Train(map);
    train.setLocation(map.findFreeSpace(9));
   
    train.addCoach(Coach.COAL);
   
    train.addCoach(Coach.PASSENGER);
View Full Code Here

Examples of com.xvitcoder.angualrspringapp.beans.Train

        trainList.add(train);
    }

    @Override
    public void deleteTrainById(Long id) {
        Train foundTrain = findTrainById(id);
        if (foundTrain != null) {
            trainList.remove(foundTrain);
            id--;
        }
    }
View Full Code Here

Examples of com.xvitcoder.angualrspringapp.beans.Train

        id = 0L;
    }

    @Override
    public void updateTrain(Train train) {
        Train foundTrain = findTrainById(train.getId());
        if (foundTrain != null) {
            trainList.remove(foundTrain);
            trainList.add(train);
        }
    }
View Full Code Here

Examples of inheritance.Train

@SuppressWarnings("all")
public class TrainTest extends TestCase {
  private Train t;
 
  private Train _init_t() {
    Train _train = new Train();
    return _train;
  }
View Full Code Here

Examples of mods.railcraft.common.carts.Train

        EntityPlayer entiyPlayer = (EntityPlayer) player;
        if (entiyPlayer == null)
            return;
        if (!(entiyPlayer.ridingEntity instanceof EntityMinecart))
            return;
        Train train = LinkageManager.instance().getTrain((EntityMinecart) entiyPlayer.ridingEntity);
        if (binding == LOCOMOTIVE_INCREASE_SPEED) {
            for (EntityMinecart cart : train) {
                if (cart instanceof EntityLocomotive) {
                    EntityLocomotive loco = (EntityLocomotive) cart;
                    if (loco.canControl(entiyPlayer.getGameProfile()))
View Full Code Here

Examples of mods.railcraft.common.carts.Train

        return uuid;
    }

    protected void setCurrentCartAndTrain(EntityMinecart cart) {
        if (lockedCart != cart && lockedCart != null) {
            Train train = LinkageManager.instance().getTrain(lockedCart);
            train.removeLockingTrack(getUUID());
        }
        lockedCart = cart;
        if (cart == null)
            currentTrain = null;
        else
View Full Code Here

Examples of mods.railcraft.common.carts.Train

            currentTrain = LinkageManager.instance().getTrain(cart);
    }

    protected void lockCart(EntityMinecart cart) {
        if (cart != null) {
            Train train = LinkageManager.instance().getTrain(cart);
            train.addLockingTrack(getUUID());
            MinecraftForge.EVENT_BUS.post(new CartLockdownEvent.Lock(cart, getX(), getY(), getZ()));
            profileInstance.onLock(cart);
        }
    }
View Full Code Here

Examples of mods.railcraft.common.carts.Train

        }
    }

    protected void releaseCart(EntityMinecart cart) {
        if (cart != null) {
            Train train = LinkageManager.instance().getTrain(cart);
            train.removeLockingTrack(getUUID());
            MinecraftForge.EVENT_BUS.post(new CartLockdownEvent.Release(cart, getX(), getY(), getZ()));
            profileInstance.onRelease(cart);
        }
    }
View Full Code Here

Examples of mods.railcraft.common.carts.Train

        }
        conditions = stack;
    }

    private boolean canRouteCart(EntityMinecart cart) {
        Train train = LinkageManager.instance().getTrain(cart);
        if (train == null)
            return false;
        if (train.size() == 1)
            return true;
        if (train.isTrainEnd(cart)) {
            if (cart instanceof IRoutableCart)
                return true;
            if (cart instanceof IPaintedCart)
                return true;
            if (cart instanceof IRefuelableCart)
View Full Code Here

Examples of net.sf.mrailsim.trains.Train

    System.out.println(  );
//    Game.trackManager.printWayFrom( Game.trackManager.getTrack( 1 ), Game.nodeManager.getNode( 1 ), 7 );
    System.out.println(  );

    Train t1 = new Train( 1, 20 );
   
    Game.trainManager.add( t1 );
    Game.trainManager.putTrain( t1, 1, 59 );
   
    Train t2 = new Train( 2, 20 );
   
    Game.trainManager.add( t2 );
    Game.trainManager.putTrain( t2, 72, 351 );

    // TODO: This will only work with example config file #3
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.