Package insects

Examples of insects.DeadInsect


      }
      else if(e.getSource() == DeadInsectButton)
      {
       
        for(int i=0;i<num;i++)
        sim.add(new DeadInsect(Math.random()*3200,
             Math.random()*1800, 5, 5));
      }
      else if(e.getSource() == AntQueenButton)
      {
        for(int i=0;i<num;i++)
View Full Code Here


  public boolean attack(double power){
    boolean result=super.attack(power);
   
    //If the attack killed the agent, replace it with a resource
    if(result)
      sim.add(new DeadInsect(xPos, yPos, startSize, 5));
   
    //If the Cannibal is currently consuming, it will break off of its
    //food source to escape
    if(mode==BehaviorState.CONSUME)
      mode=BehaviorState.SEARCH;
View Full Code Here

  public boolean attack(double power){
    boolean result=super.attack(power);
   
    //If the attack killed the agent, replace it with a resource
    if(result)
      sim.add(new DeadInsect(xPos, yPos, startSize, 5));
   
    //If the Cannibal is currently consuming, it will break off of its
    //food source to escape
    if(mode==BehaviorState.CONSUME)
      mode=BehaviorState.SEARCH;
View Full Code Here

TOP

Related Classes of insects.DeadInsect

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.