예제 #1
0
    /// <summary>
    ///  //随机获取一个要去的地方
    /// </summary>
    public void SetRandomBuildingToGo()
    {
        TownBuildingEnum buildingToGo = RandomUtil.GetRandomEnum <TownBuildingEnum>();

        if (buildingToGo == TownBuildingEnum.Town)
        {
            SetIntent(PasserIntentEnum.StayInTown);
        }
        else
        {
            SetIntent(PasserIntentEnum.GoToBuilding, buildingToGo);
        }
    }
예제 #2
0
    /// <summary>
    /// 抽卡
    /// </summary>
    public void DrawCard()
    {
        if (miniGameData.listUserCard.Count >= 5)
        {
            return;
        }
        List <ItemMiniGameDebateCardCpt.DebateCardTypeEnun> listUserDebate  = new List <ItemMiniGameDebateCardCpt.DebateCardTypeEnun>();
        List <ItemMiniGameDebateCardCpt.DebateCardTypeEnun> listEnemyDebate = new List <ItemMiniGameDebateCardCpt.DebateCardTypeEnun>();

        for (int i = 0; i < 5 - miniGameData.listUserCard.Count; i++)
        {
            listUserDebate.Add(RandomUtil.GetRandomEnum <ItemMiniGameDebateCardCpt.DebateCardTypeEnun>());
        }
        for (int i = 0; i < 5 - miniGameData.listUserCard.Count; i++)
        {
            listEnemyDebate.Add(RandomUtil.GetRandomEnum <ItemMiniGameDebateCardCpt.DebateCardTypeEnun>());
        }
        uiMiniGameDebate.CreateCardItemList(listUserDebate, listEnemyDebate);
    }