Beispiel #1
0
 private void PopulateSliders(Critter critter)
 {
     statSliders[0].value = critter.GetOffense();
     statSliders[1].value = critter.GetDefense();
     statSliders[2].value = critter.GetSpeed();
     statSliders[3].value = critter.GetSense();
     statSliders[4].value = critter.GetSneak();
     subStatSliders[0].value = critter.GetSize();
     subStatSliders[1].value = critter.GetBreedRate();
     subStatSliders[2].value = critter.GetEfficiency();
     subStatSliders[3].value = critter.GetMetabolism();
 }
Beispiel #2
0
    //Determines if this critter is a threat
    public bool IsThreat(Critter critter)
    {
        bool isThreat;
        float score;
        float attackerThreat = GetThreatScore();

        score = (Mathf.Round(100*(critter.GetDefense() + critter.GetSpeed() + (critter.GetSneak()/2))));
        score = score / 100;

        if((score * 1.05) < attackerThreat){
            isThreat = true;
        }
        else{
            isThreat = false;
        }

        return isThreat;
    }