Exemplo n.º 1
0
    public void onGetPowerCalculation(object sender, object args)
    {
        ValueCalculationException exc = (ValueCalculationException)args;

        AddValueModifier modifier = new AddValueModifier(0, powerBonus);

        exc.addModifier(modifier);
    }
Exemplo n.º 2
0
    void OnGetPower(object sender, object args)
    {
        var info = args as Info<Unit, Unit, List<ValueModifier>>;
        if (info.arg0 != GetComponentInParent<Unit> ())
            return;

        AddValueModifier mod = new AddValueModifier (0, GetPower ());
        info.arg2.Add (mod);
    }
Exemplo n.º 3
0
    void OnGetBaseAttack(object sender, object args)
    {
        var info = args as Info <Unit, Unit, List <ValueModifier> >;

        if (info.arg0 != GetComponentInParent <Unit>())
        {
            return;
        }
        AddValueModifier mod = new AddValueModifier(0, GetBaseAttack());

        info.arg2.Add(mod);
    }
Exemplo n.º 4
0
    void OnGetPower(object sender, object args)
    {
        var info = (Info <Unit, Unit, List <ValueModifier> >)args;

        if (info.arg0 != GetComponentInParent <Unit>())
        {
            return;
        }

        AddValueModifier mod = new AddValueModifier(0, -GetDistance(info.arg0.tile, info.arg1.tile) * 20);

        info.arg2.Add(mod);
    }
    void OnGetBaseDefense(object sender, object args)
    {
        var info = (Info <Unit, Unit, List <ValueModifier> >)args;

        if (info.arg0 != GetComponentInParent <Unit>())
        {
            return;
        }

        AddValueModifier mod = new AddValueModifier(0, GetBaseDefense(info.arg1));

        info.arg2.Add(mod);
    }