Package de.nordakademie.lejos.statemachine

Examples of de.nordakademie.lejos.statemachine.AbstractTransition


  public CatChaser(Statemachine parent) {
    super(parent);

    setUpSonic.setImplicitTransitions(new ITransition[]{

    new AbstractTransition(setUpSonic) {
      public int getDelay() {
        return 200;
      }
    }

    });

    welcomeDance.setImplicitTransitions(new ITransition[]{

    new AbstractTransition(fullScanForCat) {

    }

    });

    fullScanForCat.setImplicitTransitions(new ITransition[]{

    new AbstractTransition(endState) {
      public boolean guard() {
        return min >= farAway;
      }

    }, new AbstractTransition(headToCat) {

    }

    });

    headToCat.setImplicitTransitions(new ITransition[]{

    new AbstractTransition(jumpAttack) {
      public boolean guard() {
        return dist < nearBy + 5;
      }
      public int getDelay() {
        return 2500;
      }
    }, new AbstractTransition(endState) {
      public boolean guard() {
        return dist >= farAway;
      }

    }, new AbstractTransition(sneakApproach) {

    }

    });

    sneakApproach.setTransitions(new ITransition[]{catDisappeared,
        catNearBy});

    closeScanForCat.setImplicitTransitions(new ITransition[]{

    new AbstractTransition(headToCat) {

    }

    });

    jumpAttack.setImplicitTransitions(new ITransition[]{

    new AbstractTransition(closeScanForCat) {

    }

    });

    jumpAttack.setTransitions(new ITransition[]{catDestroyed});

    haHaHaHaHa.setImplicitTransitions(new ITransition[]{

    new AbstractTransition(fullScanForCat) {
      public int getDelay() {
        return 1000;
      }
    }
View Full Code Here


  public CatChaser(Statemachine parent) {
    super(parent);

    setUpSonic.setImplicitTransitions(new ITransition[]{

    new AbstractTransition(setUpSonic) {
      public int getDelay() {
        return 200;
      }
    }

    });

    welcomeDance.setImplicitTransitions(new ITransition[]{

    new AbstractTransition(fullScanForCat) {

    }

    });

    fullScanForCat.setImplicitTransitions(new ITransition[]{

    new AbstractTransition(endState) {
      public boolean guard() {
        return min >= farAway;
      }

    }, new AbstractTransition(headToCat) {

    }

    });

    headToCat.setImplicitTransitions(new ITransition[]{

    new AbstractTransition(jumpAttack) {
      public boolean guard() {
        return dist < nearBy + 5;
      }
      public int getDelay() {
        return 2500;
      }
    }, new AbstractTransition(endState) {
      public boolean guard() {
        return dist >= farAway;
      }

    }, new AbstractTransition(sneakApproach) {

    }

    });

    sneakApproach.setTransitions(new ITransition[]{catDisappeared,
        catNearBy});

    closeScanForCat.setImplicitTransitions(new ITransition[]{

    new AbstractTransition(headToCat) {

    }

    });

    jumpAttack.setImplicitTransitions(new ITransition[]{

    new AbstractTransition(closeScanForCat) {

    }

    });

    jumpAttack.setTransitions(new ITransition[]{catDestroyed});

    haHaHaHaHa.setImplicitTransitions(new ITransition[]{

    new AbstractTransition(fullScanForCat) {
      public int getDelay() {
        return 1000;
      }
    }
View Full Code Here

  public CatChaserModified(Statemachine parent) {
    super(parent);
   
    setUpSonic.setImplicitTransitions(new ITransition[]{

    new AbstractTransition(setUpSonic) {
      public int getDelay() {
        return 200;
      }
    }

    });

    welcomeDance.setImplicitTransitions(new ITransition[]{

    new AbstractTransition(fullScanForCat) {

    }

    });

    fullScanForCat.setImplicitTransitions(new ITransition[]{

    new AbstractTransition(endState) {
      public boolean guard() {
        return min >= farAway;
      }

    }, new AbstractTransition(headToCat) {

    }

    });

    headToCat.setImplicitTransitions(new ITransition[]{

    new AbstractTransition(jumpAttack) {
      public boolean guard() {
        return dist < nearBy + 5;
      }
      public int getDelay() {
        return 2500;
      }
    }, new AbstractTransition(endState) {
      public boolean guard() {
        return dist >= farAway;
      }

    }, new AbstractTransition(sneakApproach) {

    }

    });

    sneakApproach.setTransitions(new ITransition[]{catDisappeared,
        catNearBy});

    closeScanForCat.setImplicitTransitions(new ITransition[]{

    new AbstractTransition(headToCat) {

    }

    });

    jumpAttack.setImplicitTransitions(new ITransition[]{

    new AbstractTransition(closeScanForCat) {

    }

    });

    jumpAttack.setTransitions(new ITransition[]{catDestroyed});

    haHaHaHaHa.setImplicitTransitions(new ITransition[]{

    new AbstractTransition(fullScanForCat) {
      public int getDelay() {
        return 1000;
      }
    }
View Full Code Here

  public CatChaser(Statemachine parent) {
    super(parent);

    setUpSonic.setImplicitTransitions(new ITransition[]{

    new AbstractTransition(setUpSonic) {
      public int getDelay() {
        return 200;
      }
    }

    });

    welcomeDance.setImplicitTransitions(new ITransition[]{

    new AbstractTransition(fullScanForCat) {

    }

    });

    fullScanForCat.setImplicitTransitions(new ITransition[]{

    new AbstractTransition(endState) {
      public boolean guard() {
        return min >= farAway;
      }

    }, new AbstractTransition(headToCat) {

    }

    });

    headToCat.setImplicitTransitions(new ITransition[]{

    new AbstractTransition(jumpAttack) {
      public boolean guard() {
        return dist < nearBy + 5;
      }
      public int getDelay() {
        return 2500;
      }
    }, new AbstractTransition(endState) {
      public boolean guard() {
        return dist >= farAway;
      }

    }, new AbstractTransition(sneakApproach) {

    }

    });

    sneakApproach.setTransitions(new ITransition[]{catDisappeared,
        catNearBy});

    closeScanForCat.setImplicitTransitions(new ITransition[]{

    new AbstractTransition(headToCat) {

    }

    });

    jumpAttack.setImplicitTransitions(new ITransition[]{

    new AbstractTransition(closeScanForCat) {

    }

    });

    jumpAttack.setTransitions(new ITransition[]{catDestroyed});

    haHaHaHaHa.setImplicitTransitions(new ITransition[]{

    new AbstractTransition(fullScanForCat) {
      public int getDelay() {
        return 1000;
      }
    }
View Full Code Here

TOP

Related Classes of de.nordakademie.lejos.statemachine.AbstractTransition

Copyright © 2018 www.massapicom. 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.