public Bug(int x, int y, Bug.TeamEnum team, Bug.SexEnum sex, int health, int strength, int appetite) { PosX = x; PosY = y; Team = team; Sex = sex; Health = health; Strength = strength; Appetite = appetite; IsAtWar = false; IsEating = false; IsPairing = false; Direction = Bug.GetRandomDirection(); }
private Bug CreateBug(int x, int y, Bug.TeamEnum team, Bug.SexEnum sex) { if (team == Bug.TeamEnum.Blue) { return(new Bug(x, y, team, sex, conf.BugHealthBlue, conf.BugStrengthBlue, conf.BugAppetiteBlue)); } else if (team == Bug.TeamEnum.Red) { return(new Bug(x, y, team, sex, conf.BugHealthRed, conf.BugStrengthRed, conf.BugAppetiteRed)); } else { return(null); } }