コード例 #1
0
    void applyWelfareInfoOnString(TextMeshProUGUI target, IWelfareableSupport welfareable)
    {
        var text = welfareable.GetTypeOfSupport().ToString().Substring(0, 1) + welfareable.GetTypeOfSupport().ToString().Substring(1).ToLower();

        target.text = text + "\n" + welfareable.CalculatedSupport() + " euroa per kuukausi.\n"
                      + "Tuki myönnetty ajalle " + DateTimeSystem.returnDayYearMonth(welfareable.getStartAndEndDate().Item1) + "-" +
                      DateTimeSystem.returnDayYearMonth(welfareable.getStartAndEndDate().Item2);
        if (welfareable.GetTypeOfSupport() == typeOfSupport.Opintolaina)
        {
            target.text += "\nTämä on vain lainan valtiontakaus, laina ei tule automaattisesti kuukausittain, hae laina pankilta sopivissa erissä, tai kokonaisena";
        }
    }
コード例 #2
0
    public bool checkValidityOfSupport()
    {
        int result = System.DateTime.Compare(dateofWelfareEnds, DateTimeSystem.getCurrentDate());

        if (result > 0)
        {
            return(true);
        }
        else
        {
            return(false);
        }
    }
コード例 #3
0
    public bool checkPreRequisites()
    {
        bool check = false;

        if (DateTimeSystem.GameStartDate.AddDays(7 * fireWeeks) > DateTimeSystem.getCurrentDate())
        {
            return(false);
        }
        if (prerequisites.Length < 1)
        {
            return(true);
        }
        else
        {
            for (int i = 0; i < prerequisites.Length; i++)
            {
                check = (prerequisites[i].CheckPreRequisites() == true) ? true : false;
            }
        }
        return(check);
    }