Beispiel #1
0
    public void UpdateLean(Llama player, Wolf dictator)
    {
        float dictatorResult = Ideals.CompareIdeals(this.Ideals, dictator.Ideals);
        float playerResult   = Ideals.CompareIdeals(this.Ideals, player.Ideals);

        _lean = playerResult - dictatorResult;
    }
Beispiel #2
0
    public static float CompareIdeals(Ideals sheep, Ideals other)
    {
        float result = 0;

        foreach (IdealType idealType in sheep.idealsDict.Keys)
        {
            if (sheep.idealsDict[idealType] > 0)
            {
                if (other.idealsDict[idealType] >= sheep.idealsDict[idealType])
                {
                    result++;
                }
            }
            else
            {
                if (other.idealsDict[idealType] <= sheep.idealsDict[idealType])
                {
                    result++;
                }
            }
        }

        return(result);
    }
Beispiel #3
0
 protected virtual void Awake()
 {
     _ideals = new Ideals();
 }