Difference between revisions of "Implementing weather changes that affect animals"

From TRCCompSci - AQA Computer Science
Jump to: navigation, search
(public)
Line 6: Line 6:
 
stormradius float
 
stormradius float
  
==public==
+
<syntaxhighlight lang="csharp">
storm
+
if (menuOption == 1)
{
+
                {
}
+
                    TimePeriod++;
 +
                    Season = TimePeriod % 4;
 +
                    ShowDetail = true;
 +
                    AdvanceTimePeriod();
 +
                }
 +
                if (menuOption == 2)
 +
                {
 +
                    TimePeriod++;
 +
                    Season = TimePeriod % 4;
 +
                    ShowDetail = false;
 +
                    AdvanceTimePeriod();
 +
                }
  
rain
 
{
 
}
 
  
sun
 
{
 
}
 
  
neutral
+
 
{
+
</syntaxhighlight>
  keep same
 
}
 

Revision as of 13:15, 14 March 2017

Will lead into Storms and fires Weather chance to be certain things (storm, rain, sun, neutral,) class weather

private

variability float stormradius float

 
if (menuOption == 1)
                {
                    TimePeriod++;
                    Season = TimePeriod % 4;
                    ShowDetail = true;
                    AdvanceTimePeriod();
                }
                if (menuOption == 2)
                {
                    TimePeriod++;
                    Season = TimePeriod % 4;
                    ShowDetail = false;
                    AdvanceTimePeriod();
                }