コード例 #1
0
    public void RankUP()
    {
        //条件を元にギルドランクをアップ
        var rankData = guildRankUpDataBase.GuildRankUpList.FirstOrDefault(x => x.Rank == rank);

        if (clearIronNumber >= rankData.ClearIronNumber &&
            clearBronzeNumber >= rankData.ClearBronzeNumber &&
            clearCopperNumber >= rankData.ClearCopperNumber)
        {
            rank      = rankData.NextRank;
            _isRankUp = true;
        }
    }
コード例 #2
0
    //TODO スタート画面で初めから選択時に使用
    public void LoadFirstStatus()
    {
        var firstStatus = playerStatusDataBase.playerStatusDataList.Find(x => x.level == 1);

        level             = firstStatus.level;
        hitPoint          = firstStatus.hitPoint;
        attack            = firstStatus.attack;
        defence           = firstStatus.defence;
        needExp           = firstStatus.needExp;
        currentExp        = 0;
        rank              = GuildRequest.RankEnum.Iron;
        clearIronNumber   = 0;
        clearBronzeNumber = 0;
        clearCopperNumber = 0;
    }
コード例 #3
0
    public void AddClearGuildRequest(GuildRequest.RankEnum rank)
    {
        switch (rank)
        {
        case GuildRequest.RankEnum.Iron:
            clearIronNumber++;
            break;

        case GuildRequest.RankEnum.Bronze:
            clearBronzeNumber++;
            break;

        case GuildRequest.RankEnum.Copper:
            clearCopperNumber++;
            break;
        }
        RankUP();
        Save();
    }