Example #1
0
    /// <summary>
    /// 处理-游玩时间
    /// </summary>
    public void HandleForPlayTime()
    {
        GameStateEnum gameState = GameHandler.Instance.manager.GetGameState();

        if (gameState != GameStateEnum.Gaming)
        {
            return;
        }
        TimeBean timeData = manager.GetPlayTime();

        timeData.AddTimeForHMS(0, 0, 1);
    }
Example #2
0
    public void SetScore(RankTypeEnum rankType, int score)
    {
        Sprite spData  = null;
        string dataStr = "";

        switch (rankType)
        {
        case RankTypeEnum.GetMoneyS:
            dataStr = score + TextHandler.Instance.manager.GetTextById(18);
            spData  = IconDataHandler.Instance.manager.GetIconSpriteByName("ach_money_s_2");
            break;

        case RankTypeEnum.NumberOrderForFood:
            dataStr = score + TextHandler.Instance.manager.GetTextById(82);
            spData  = IconDataHandler.Instance.manager.GetIconSpriteByName("ach_ordernumber_1");
            break;

        case RankTypeEnum.NumberOrderForHotel:
            dataStr = score + TextHandler.Instance.manager.GetTextById(82);
            spData  = IconDataHandler.Instance.manager.GetIconSpriteByName("worker_waiter_bed_pro_2");
            break;

        case RankTypeEnum.NumberPraiseExcited:
            dataStr = score + "";
            spData  = IconDataHandler.Instance.manager.GetIconSpriteByName("ach_accost_1");
            break;

        case RankTypeEnum.NumberPraiseAnger:
            dataStr = score + "";
            spData  = IconDataHandler.Instance.manager.GetIconSpriteByName("ach_accost_2");
            break;

        case RankTypeEnum.TimePlay:
            TimeBean timeData = new TimeBean();
            timeData.AddTimeForHMS(0, 0, score);
            dataStr = timeData.hour + ":" + timeData.minute + ":" + timeData.second;
            spData  = IconDataHandler.Instance.manager.GetIconSpriteByName("time_wait_1_0");
            break;

        case RankTypeEnum.MaxDayGetMoneyForFoodS:
            dataStr = score + TextHandler.Instance.manager.GetTextById(18);
            spData  = IconDataHandler.Instance.manager.GetIconSpriteByName("ach_money_s_2");
            break;

        case RankTypeEnum.MaxDayGetMoneyForHotelS:
            dataStr = score + TextHandler.Instance.manager.GetTextById(18);
            spData  = IconDataHandler.Instance.manager.GetIconSpriteByName("ach_money_s_2");
            break;

        case RankTypeEnum.MaxDayCompleteOrderForFood:
            dataStr = score + "";
            spData  = IconDataHandler.Instance.manager.GetIconSpriteByName("ach_ordernumber_1");
            break;

        case RankTypeEnum.MaxDayCompleteOrderForHotel:
            dataStr = score + "";
            spData  = IconDataHandler.Instance.manager.GetIconSpriteByName("worker_waiter_bed_pro_2");
            break;

        case RankTypeEnum.NumberForGetElementary:
            dataStr = score + "";
            spData  = IconDataHandler.Instance.manager.GetIconSpriteByName("trophy_1_0");
            break;

        case RankTypeEnum.NumberForGetIntermediate:
            dataStr = score + "";
            spData  = IconDataHandler.Instance.manager.GetIconSpriteByName("trophy_1_1");
            break;

        case RankTypeEnum.NumberForGetAdvanced:
            dataStr = score + "";
            spData  = IconDataHandler.Instance.manager.GetIconSpriteByName("trophy_1_2");
            break;

        case RankTypeEnum.NumberForGetLegendary:
            dataStr = score + "";
            spData  = IconDataHandler.Instance.manager.GetIconSpriteByName("trophy_1_3");
            break;

        case RankTypeEnum.MaxLayer:
            dataStr = score + "";
            spData  = IconDataHandler.Instance.manager.GetIconSpriteByName("infinitetowers_1");
            break;
        }
        if (tvData != null)
        {
            tvData.text = dataStr;
        }
        if (ivData != null)
        {
            ivData.sprite = spData;
        }
    }