Package worldManager.gameEngine.species

Examples of worldManager.gameEngine.species.Animal


            }
        }
    }

    public Animal findPredator(Organism organism) {
        Animal predator = null;

        int species_id = organism.getSpeciesType().getID();
        double distance = -1;

        List<Animal> predatorList = getAnimals();
View Full Code Here


//            }
        }
    }   

    public void updateAnimalTarget(int animalID, int xTarg, int yTarg) {
        Animal animal = animals.get(animalID);

        if (animal != null) {
            animal.setTargetPos(xTarg, yTarg, 0);
        }
    }
View Full Code Here

            animal.setTargetPos(xTarg, yTarg, 0);
        }
    }

    public void updateAnimalCoors(int animalID, int xCoor, int yCoor) {
        Animal animal = animals.get(animalID);

        if (animal != null) {
            animal.setPos(xCoor, yCoor, 0);
        }
    }
View Full Code Here

        Organism organism = null;

        if (species_id / 1000 == 1) {
            organism = new Plant(organism_id);
        } else {
            organism = new Animal(organism_id);
        }

        organism.setSpeciesTypeID(species_id);
        organism.setBiomass(organism.getSpeciesType().getAvgBiomass());
        organism.setGroupSize(group_size);
View Full Code Here

                    Organism organism = organismList.get(numOrganisms - 1 - i);

                    int numDeaths = Math.min(organism.getGroupSize(), amount);
                    amount -= numDeaths;

                    Animal predator = zone.findPredator(organism);

                    if (predator != null) {
                        predator.setHungerLevel(1);
                    }

                    removeOrganismByResponse(organism, predator, zone_id, numDeaths, status);
                }
            }
View Full Code Here

TOP

Related Classes of worldManager.gameEngine.species.Animal

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.