public void link_members(Environment_species sp) { sp.grid = FindName(sp.name + "_g") as Grid; sp.title = FindName(sp.name + "_n") as TextBlock; sp.chart = FindName(sp.name + "_Chart") as Chart; }
public int affect(ref Environment_species sp) { ////Formula Affecting Change; //sp.healthy = (((100-sp.healthy) - (percent_affect * effectiveness)) <= 0) ? (sp.healthy * (1 - percent_affect) * effectiveness) : ((sp.healthy - (percent_affect * effectiveness))); double change = (100 - sp.healthy) * (percent_affect * effectiveness); sp.healthy += change; return (int)(change * 1.5);//Formula for Adding XP; }