예제 #1
0
 public int affect(ref species sp)
 {
     double change = 0;
     if (available > 0)
     {
         ////Formula Affecting Change;
         change = (sp.sick * (percent_affect) * effectiveness);
         sp.healthy = sp.healthy + change;
         sp.sick = sp.sick - change;
         available--;
     }
     return (int)(change / 2);///Formula adding XP
 }
예제 #2
0
 //------------------------//
 
 public void link_members(species sp)
 {
     sp.grid = FindName(sp.name + "_g") as Grid;
     sp.image = FindName(sp.name + "_i") as Image;
     sp.sick_b = FindName(sp.name + "_s") as TextBlock;
     sp.healthy_b = FindName(sp.name + "_h") as TextBlock;
     sp.title = FindName(sp.name + "_n") as TextBox;
     sp.circle = FindName(sp.name + "_e") as Ellipse;
     sp.chart = FindName(sp.name + "_Chart") as Chart;
 }
예제 #3
0
 public int vaccinate(ref species sp , TimeSpan time)
 {
     if (available > 0)
     {
         ////Formula Affecting Change;
         sp.vaccinate(time);
         available--;
         return 100; ///formula affecting xp;
     }
     return 0;
 }