public Predator(int origen, int size, Point p) { this.id = ++index; this.size = size; this.prey = null; euforia = 0; img = 0; this.posInit = this.destino = this.origen = origen; path = new List <Point>(); path.Add(p); }
public void getRoads(List <List <Vertex> > roads, List <float> pesos) //da error { Prey.to_roads(roads, pesos); foreach (Prey sprite in preys) { if (sprite.changeToRoad()) { //cambiar ruta sprite.returnRoad(); } } }
private void collisionCherry(Prey prey) { foreach (Entity cherry in cherrys) { if (prey.collision(cherry, 40) && prey.inEdge(cherry)) { //comio la cereza prey.invisible = true; prey.survivor_speed = 4; dead_cherry = cherry; break; } } cherrys.Remove(dead_cherry); }
public bool gameOver() { return(preys.Count <= Prey.Deads || (goal = win()) != null); }
public void newPrey(Prey p) { prey = p; }