Example #1
0
    /**
     * Sends in point bonus vars, parses them and sends them down the pipeline
     */
    public void AddPointBonus(PointBonus pb_, bool temporary)
    {
        List <PointBonus> temp;

        if (PointBonus.CheckReactive(pb_.GetActionType()))
        {
            if (temporary)
            {
                temp = reactive_temp;
            }
            else
            {
                temp = reactive_perm;
            };
            AddBonus(pb_, temp);
        }
        else
        {
            if (temporary)
            {
                temp = accumulative_temp;
            }
            else
            {
                temp = accumulative_perm;
            };
            AddBonus(pb_, temp);
        }
    }
Example #2
0
    /**
     * If a bonus exists in the list then just increase the amount of points recieved. Otherwise create a new entry.
     */
    void AddBonus(PointBonus pb_, List <PointBonus> list)
    {
        PointBonus temp = ContainsBonus(list, pb_.GetActionType());

        if (temp != null)
        {
            temp.AddPointBonus(pb_.pointBonus);
        }
        else
        {
            list.Add(pb_);
        }
    }