public void SetHandComputed()
    {
        Toolbox globalVars = Toolbox.Instance;
        int     w20        = CharacterEngine.ComputeHandWurf(globalVars.mCharacter);

        inHandWurf.text = w20.ToString();

        Hand hand = CharacterEngine.GetHandfromWurf(w20);

        switch (hand)
        {
        case Hand.links:
            inHandText.text = "links";
            break;

        case Hand.rechts:
            inHandText.text = "rechts";
            break;

        case Hand.beide:
            inHandText.text = "beidhändig";
            break;

        default:
            break;
        }
    }
Ejemplo n.º 2
0
    public void TestHandAll()
    {
        mCharacter.Spezies = Races.Mensch;
        int  w20        = CharacterEngine.ComputeHandWurf(this.mCharacter);
        Hand resultHand = CharacterEngine.GetHandfromWurf(w20);
        var  hands      = Enum.GetValues(typeof(Hand));

        Assert.Contains(resultHand, hands);
    }
    public void SetHandCharacter()
    {
        Toolbox globalVars = Toolbox.Instance;

        if (inHandText.text != "")
        {
            int w20 = Convert.ToInt32(inHandWurf.text);
            globalVars.mCharacter.hand = CharacterEngine.GetHandfromWurf(w20);
            Debug.Log(globalVars.mCharacter.ToString());
        }
    }
Ejemplo n.º 4
0
    public void TestHandGnom()
    {
        int zuFall = UnityEngine.Random.Range(1, 3);

        if (zuFall == 1)
        {
            mCharacter.Spezies = Races.Waldgnom;
        }
        else
        {
            mCharacter.Spezies = Races.Berggnom;
        }

        int  w20        = CharacterEngine.ComputeHandWurf(this.mCharacter);
        Hand resultHand = CharacterEngine.GetHandfromWurf(w20);

        Assert.AreEqual(resultHand, Hand.beide);
    }