コード例 #1
0
ファイル: Critter.cs プロジェクト: Paulgherve1/Critters
    public void CloneStats(Critter critter)
    {
        offense = critter.GetOffense();
        defense = critter.GetDefense();
        baseSpeed = critter.GetBaseSpeed();
        sense = critter.GetSense();
        sneak = critter.GetSneak();
        size = critter.GetSize();
        breedRate = critter.GetBreedRate();
        metabolism = critter.GetMetabolism();

        biomePref = critter.GetBiomePrefs();
        climateFocus = critter.GetClimateFocus();
        climatePref = critter.GetClimatePref();
        climateRange = critter.GetClimateRange();
        geoPref = critter.GetGeoPrefs();
        tempFocus = critter.GetTempFocus();
        tempPref = critter.GetTempPref();
        tempRange = critter.GetTempRange();

        evoMod = critter.GetEvoMod();
        migrateMod = critter.GetMigrateMod();
    }
コード例 #2
0
ファイル: CitterDetails.cs プロジェクト: Paulgherve1/Critters
 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();
 }
コード例 #3
0
ファイル: Critter.cs プロジェクト: Paulgherve1/Critters
    //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;
    }