Implementing weather changes that affect animals
Revision as of 12:19, 14 March 2017 by Westy-Chan (talk | contribs)
Check for which season you are in
if (menuOption == 1)
{
TimePeriod++;
Season = TimePeriod % 4;
ShowDetail = true;
AdvanceTimePeriod();
}
if (menuOption == 2)
{
TimePeriod++;
Season = TimePeriod % 4;
ShowDetail = false;
AdvanceTimePeriod();
}
Winter Effects
private double DistanceBetween(int x1, int y1, int x2, int y2)
{
if (Season==0)
{
return (Math.Sqrt(Math.Pow(x1 - x2, 2) + Math.Pow(y1 - y2, 2))+3);
}
else
return Math.Sqrt(Math.Pow(x1 - x2, 2) + Math.Pow(y1 - y2, 2));
}