Beispiel #1
0
    // Use this for initialization
    void Start()
    {
        if (main == null)
        {
            main = this;
        }

//		Player player1 = new Player ("Jogador 1", Color.yellow, PlayerType.HUMAN_LOCAL, PlayerDificulty.HUMAN);
//		main.players.Add (player1);
//		Player player2 = new Player ("Jogador 2", Color.red, PlayerType.HUMAN_LOCAL, PlayerDificulty.HUMAN);
//		main.players.Add (player2);

        foreach (Player player in players)
        {
            PlayerCounter pc = Instantiate(playerCounterPrefab);
            pc.player = player;

            pc.transform.SetParent(playersPanel);
            pc.transform.localPosition = Vector3.zero;
            pc.transform.localScale    = Vector3.one;
        }

        //Mark[] allMarks = FindObjectsOfType<Mark>();
        //foreach (var mark in allMarks) {
        //	remainingMarks.Add (mark);
        //}
        remainingMarks = board.allMarks;
    }
Beispiel #2
0
 /// <summary>
 /// OnClose event handler
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private static void WebSocket_OnClose(object sender, CloseEventArgs e)
 {
     ConnectStatus.SetText("Disconnected");
     ServerConsole.Disable();
     PlayerCounter.Reset();
     Update.StopThreads();
 }
Beispiel #3
0
    private PlayerCounter getPlayerCounter()
    {
        if (playerCounter == null)
            playerCounter = (PlayerCounter)FindObjectOfType (typeof(PlayerCounter));

        return playerCounter;
    }
Beispiel #4
0
 public TutorialGUI(PlayerCounter playerCounter, bool isEnabled)
 {
     viroidTipGui = new SimpleTextGUI ("Stop red viroids from spreading!");
     this.isEnabled = isEnabled;
     tutorialPhase = TutorialPhases.wasd;
     this.playerCounter = playerCounter;
     setTutorialGraphics ();
 }
Beispiel #5
0
 public GameHUD(PlayerCounter playerCounter,bool useTutorial)
 {
     sandboxText=new SimpleTextGUI("Press and hold \"G\" for sandbox options.");
     normalStyle = MenuTemplate.getLabelStyle (30, TextAnchor.MiddleCenter, Color.white);
     isFadingToBlack = false;
     fadeTimeMax = 5;
     fadeTexture = Resources.Load ("Textures/FadeToBlack") as Texture;
     tutorialGUI=new TutorialGUI(playerCounter,useTutorial);
 }
Beispiel #6
0
    void Start()
    {
        // EnemyGenerator を取得しておき、まずは敵の生成をしない。
        m_enemyGenerator = GetComponent <EnemyGenerator>();
        m_enemyGenerator.StopGeneration();

        m_playerCounter = GetComponent <PlayerCounter>();
        AddScore(0);
    }
Beispiel #7
0
	void Awake () {
		
		if (instance == null) {
			instance = this;
		} else {
			Destroy (this);
		}
		DontDestroyOnLoad(transform.gameObject);

	
	}
Beispiel #8
0
 void OnTriggerEnter(Collider col)
 {
     //Checks if the player hits the trigger and sends a randomise function
     //to randomise its location as well as increase the points by 10
     if (col.gameObject.tag == "Player")
     {
         Debug.Log("Player Entered");
         counter = col.gameObject.GetComponent <PlayerCounter> ();
         RandomisePosition();
         //
     }
 }
        private static void ResetHeroStatistic(InBattleRuntimeInfo fightInfo)
        {
            if (fightInfo.unitCounters != null)
            {
                foreach (KeyValuePair <int, PlayerCounter> current in fightInfo.unitCounters)
                {
                    PvpStatisticMgr.HeroData heroData = Singleton <PvpManager> .Instance.StatisticMgr.GetHeroData(-current.Key);

                    if (heroData != null)
                    {
                        PlayerCounter value = current.Value;
                        heroData.HeroKill    = value.killHoreCount;
                        heroData.MonsterKill = value.killMonsterCount;
                        heroData.Assist      = value.helpKillHoreCount;
                        heroData.FirstKill   = value.isFirstBlood;
                        heroData.Death       = value.deadCount;
                    }
                    else
                    {
                        Debug.LogError("can't get hero with id: " + current.Key);
                    }
                }
            }
            if (fightInfo.teamInfos != null && fightInfo.teamInfos.Length >= 2)
            {
                for (int i = 0; i < Mathf.Min(fightInfo.teamInfos.Length, 3); i++)
                {
                    GroupTeamInfo groupTeamInfo = fightInfo.teamInfos[i];
                    int           teamType      = i;
                    if (i == 2)
                    {
                        teamType = 3;
                    }
                    PvpStatisticMgr.GroupData groupData = Singleton <PvpManager> .Instance.StatisticMgr.GetGroupData(teamType);

                    groupData.TeamKill            = groupTeamInfo.teamKill;
                    groupData.TeamLv              = groupTeamInfo.Level;
                    groupData.TeamCurExp          = groupTeamInfo.exp;
                    groupData.TeamTowerDestroy    = groupTeamInfo.killTowerCount;
                    groupData.TeamEpicMonsterKill = groupTeamInfo.killSpeMonsterCount;
                    groupData.TeamDeath           = groupTeamInfo.deadCount;
                }
                if (fightInfo.teamInfos.Length > 3)
                {
                    ClientLogger.Error("cannot handle it any more, too many teams");
                }
            }
            Singleton <TriggerManager> .Instance.SendGameStateEvent(GameEvent.UpdateView);
        }
Beispiel #10
0
    void Start()
    {
        // ゲームオーバーの表示を消す
        if (m_gameoverText)
        {
            m_gameoverText.enabled = false;
        }

        // EnemyGenerator を取得しておき、まずは敵の生成を止めておく
        m_enemyGenerator = GetComponent <EnemyWaveGenerator>();
        m_enemyGenerator.StopGeneration();

        m_playerCounter = GetComponent <PlayerCounter>();
        AddScore(0);    // 得点を初期化する
    }
Beispiel #11
0
    public static float getMultiplier(PlayerCounter pc)
    {
        float multiplier = 1;

        if (!pc.usedFly)
            multiplier += 1;
        if (!pc.usedJump)
            multiplier += 3;
        if (!pc.usedLaser)
            multiplier += 2;
        if (!pc.hasFallen)
            multiplier += 0.5f;

        return multiplier;
    }
        public async Task ReadListOfGamesAsync()
        {
            // Arrange

            RestClient    client  = new RestClient();
            PlayerCounter counter = new PlayerCounter();

            var controller = new LudoController(client, counter);


            // Act

            IActionResult result = await controller.ListGames();

            // Assert

            Assert.NotNull(result);
            Assert.IsType <ViewResult>(result);
        }
Beispiel #13
0
    public static void setScoreDialogue(DialogueMenu dm, PlayerCounter pc, int voxelCount)
    {
        dm.setMainText ("Score: " + getScore (pc, voxelCount).ToString());

        dm.addItem ("Blocks saved:", voxelCount);

        dm.addItem ("", "");
        dm.addItem ("Score Penalty:", getPenalties (pc));

        dm.addItem ("Broken block penalty:", pc.breakCount);
        if (pc.corruptBreakCount > 0)
            dm.addItem ("Broken infected block penalty:", pc.corruptBreakCount);

        dm.addItem ("", "");
        dm.addItem ("Score multiplier from bonuses:", getMultiplier (pc));
        dm.addItem ("Awards:", "");
        dm.addItem ("Clark Kent", !pc.usedFly);
        dm.addItem ("Sammy Lightfoot", !pc.hasFallen);
        dm.addItem ("Kangaroo Hater", !pc.usedJump);
        dm.addItem ("Photophobic", !pc.usedLaser);
    }
        private void SetDescribe()
        {
            string name = this.mCenterOnChild.centeredObject.name;
            SysSummonersAchievementVo dataById = BaseDataMgr.instance.GetDataById <SysSummonersAchievementVo>(name);
            int num = 0;

            this.mMedalName.text = LanguageManager.Instance.GetStringById(dataById.name);
            PvpTeamInfo   pvpTeamInfo   = ModelManager.Instance.Get_Settle_PvpTeamInfo();
            string        userId        = ModelManager.Instance.Get_userData_X().UserId;
            PlayerCounter playerCounter = null;

            pvpTeamInfo.unitCounters.TryGetValue(userId, out playerCounter);
            int id = dataById.id;

            switch (id)
            {
            case 3001:
                this.mShine.mainTexture = ResourceManager.Load <Texture>("Light_default", true, true, null, 0, false);
                if (this.homeKdaData != null)
                {
                    num  = ((playerCounter == null) ? 1 : playerCounter.extKillCount[2]);
                    num += this.homeKdaData.doublekill;
                }
                break;

            case 3002:
                this.mShine.mainTexture = ResourceManager.Load <Texture>("Light_purple", true, true, null, 0, false);
                if (this.homeKdaData != null)
                {
                    num  = ((playerCounter == null) ? 1 : playerCounter.extKillCount[3]);
                    num += this.homeKdaData.triplekill;
                }
                break;

            case 3003:
                this.mShine.mainTexture = ResourceManager.Load <Texture>("Light_gold", true, true, null, 0, false);
                if (this.homeKdaData != null)
                {
                    num  = ((playerCounter == null) ? 1 : playerCounter.extKillCount[4]);
                    num += this.homeKdaData.quadrakill;
                }
                break;

            case 3004:
                this.mShine.mainTexture = ResourceManager.Load <Texture>("Light_gold", true, true, null, 0, false);
                if (this.homeKdaData != null)
                {
                    num  = ((playerCounter == null) ? 1 : playerCounter.extKillCount[5]);
                    num += this.homeKdaData.pentakill;
                }
                break;

            default:
                if (id != 1001)
                {
                    if (id != 2001)
                    {
                        this.mShine.mainTexture = ResourceManager.Load <Texture>("Light_default", true, true, null, 0, false);
                    }
                    else
                    {
                        this.mShine.mainTexture = ResourceManager.Load <Texture>("Light_purple", true, true, null, 0, false);
                        if (this.homeKdaData != null)
                        {
                            num  = ((playerCounter == null) ? 1 : playerCounter.extKillCount[104]);
                            num += this.homeKdaData.godlike;
                        }
                    }
                }
                else
                {
                    this.mShine.mainTexture = ResourceManager.Load <Texture>("Light_red", true, true, null, 0, false);
                    if (this.homeKdaData != null)
                    {
                        num = 1 + this.homeKdaData.mvp;
                    }
                }
                break;
            }
            this.mMedalDesc.text = ((num > 0) ? LanguageManager.Instance.GetStringById(dataById.describe).Replace("*", num.ToString()) : LanguageManager.Instance.GetStringById(dataById.describe));
        }
    public void Achieve(heroRecordInfo recordInfo, PlayerCounter playercounter, bool isMain)
    {
        if (!isMain)
        {
            return;
        }
        while (this.achive.childCount > 0)
        {
            UnityEngine.Object.DestroyImmediate(this.achive.GetChild(0).gameObject);
        }
        bool flag = false;
        Dictionary <int, int> dictionary = new Dictionary <int, int>();

        dictionary = playercounter.extKillCount;
        if (dictionary == null)
        {
            return;
        }
        List <KeyValuePair <int, int> > list = new List <KeyValuePair <int, int> >(dictionary);

        if (dictionary.Count > 0)
        {
            list.Sort((KeyValuePair <int, int> s1, KeyValuePair <int, int> s2) => s2.Key.CompareTo(s1.Key));
        }
        for (int i = 0; i < list.Count; i++)
        {
            int num = list[i].Key;
            switch (num)
            {
            case 3:
                if (!flag)
                {
                    if (this.achive.childCount < i + 1)
                    {
                        NGUITools.AddChild(this.achive.gameObject, this.AchiSprite);
                    }
                    this.achive.GetChild(this.achive.childCount - 1).GetComponent <UISprite>().spriteName = "Data_statistics_images_3";
                    UIWidget arg_3B4_0 = this.achive.GetChild(this.achive.childCount - 1).GetComponent <UISprite>();
                    int      num2      = 36;
                    this.achive.GetChild(this.achive.childCount - 1).GetComponent <UISprite>().height = num2;
                    arg_3B4_0.width = num2;
                    this.achive.GetChild(this.achive.childCount - 1).gameObject.SetActive(true);
                }
                break;

            case 4:
                if (!flag)
                {
                    if (this.achive.childCount < i + 1)
                    {
                        NGUITools.AddChild(this.achive.gameObject, this.AchiSprite);
                    }
                    this.achive.GetChild(this.achive.childCount - 1).GetComponent <UISprite>().spriteName = "Data_statistics_images_4";
                    UIWidget arg_2E7_0 = this.achive.GetChild(this.achive.childCount - 1).GetComponent <UISprite>();
                    int      num2      = 36;
                    this.achive.GetChild(this.achive.childCount - 1).GetComponent <UISprite>().height = num2;
                    arg_2E7_0.width = num2;
                    this.achive.GetChild(this.achive.childCount - 1).gameObject.SetActive(true);
                    flag = true;
                }
                break;

            case 5:
            {
                if (this.achive.childCount < i + 1)
                {
                    NGUITools.AddChild(this.achive.gameObject, this.AchiSprite);
                }
                this.achive.GetChild(this.achive.childCount - 1).GetComponent <UISprite>().spriteName = "Data_statistics_images_5";
                UIWidget arg_21A_0 = this.achive.GetChild(this.achive.childCount - 1).GetComponent <UISprite>();
                int      num2      = 36;
                this.achive.GetChild(this.achive.childCount - 1).GetComponent <UISprite>().height = num2;
                arg_21A_0.width = num2;
                this.achive.GetChild(this.achive.childCount - 1).gameObject.SetActive(true);
                flag = true;
                break;
            }

            default:
                if (num == 104)
                {
                    if (this.achive.childCount < i + 1)
                    {
                        NGUITools.AddChild(this.achive.gameObject, this.AchiSprite);
                    }
                    this.achive.GetChild(this.achive.childCount - 1).GetComponent <UISprite>().spriteName = "Data_statistics_images_shen";
                    UIWidget arg_155_0 = this.achive.GetChild(this.achive.childCount - 1).GetComponent <UISprite>();
                    int      num2      = 36;
                    this.achive.GetChild(this.achive.childCount - 1).GetComponent <UISprite>().height = num2;
                    arg_155_0.width = num2;
                    this.achive.GetChild(this.achive.childCount - 1).gameObject.SetActive(true);
                }
                break;
            }
        }
        if (playercounter.isMostMoney)
        {
            GameObject gameObject = NGUITools.AddChild(this.achive.gameObject, this.AchiSprite);
            gameObject.transform.GetComponent <UISprite>().spriteName = "Data_statistics_images_money";
            UIWidget arg_476_0 = this.achive.GetChild(this.achive.childCount - 1).GetComponent <UISprite>();
            int      num       = 36;
            this.achive.GetChild(this.achive.childCount - 1).GetComponent <UISprite>().height = num;
            arg_476_0.width = num;
            gameObject.gameObject.SetActive(true);
        }
        if (recordInfo.isTeamFight)
        {
            this.Friend.SetActive(true);
        }
        else
        {
            this.Friend.SetActive(false);
        }
        this.achive.GetComponent <UIGrid>().Reposition();
    }
Beispiel #16
0
    public void Achieve(PlayerCounter playercounter)
    {
        while (this.Grid.childCount > 0)
        {
            UnityEngine.Object.DestroyImmediate(this.Grid.GetChild(0).gameObject);
        }
        bool flag = false;
        Dictionary <int, int> dictionary = new Dictionary <int, int>();

        dictionary = playercounter.extKillCount;
        if (dictionary != null)
        {
            List <KeyValuePair <int, int> > list = new List <KeyValuePair <int, int> >(dictionary);
            if (dictionary.Count > 0)
            {
                list.Sort((KeyValuePair <int, int> s1, KeyValuePair <int, int> s2) => s2.Key.CompareTo(s1.Key));
            }
            for (int i = 0; i < list.Count; i++)
            {
                int key = list[i].Key;
                switch (key)
                {
                case 3:
                    if (!flag)
                    {
                        if (this.Grid.childCount < i + 1)
                        {
                            NGUITools.AddChild(this.Grid.gameObject, this.AchiSprite);
                        }
                        this.Grid.GetChild(this.Grid.childCount - 1).GetComponent <UISprite>().spriteName = "Data_statistics_images_3";
                        this.Grid.GetChild(this.Grid.childCount - 1).gameObject.SetActive(true);
                    }
                    break;

                case 4:
                    if (!flag)
                    {
                        if (this.Grid.childCount < i + 1)
                        {
                            NGUITools.AddChild(this.Grid.gameObject, this.AchiSprite);
                        }
                        this.Grid.GetChild(this.Grid.childCount - 1).GetComponent <UISprite>().spriteName = "Data_statistics_images_4";
                        this.Grid.GetChild(this.Grid.childCount - 1).gameObject.SetActive(true);
                        flag = true;
                    }
                    break;

                case 5:
                    if (this.Grid.childCount < i + 1)
                    {
                        NGUITools.AddChild(this.Grid.gameObject, this.AchiSprite);
                    }
                    this.Grid.GetChild(this.Grid.childCount - 1).GetComponent <UISprite>().spriteName = "Data_statistics_images_5";
                    this.Grid.GetChild(this.Grid.childCount - 1).gameObject.SetActive(true);
                    flag = true;
                    break;

                default:
                    if (key == 104)
                    {
                        if (this.Grid.childCount < i + 1)
                        {
                            NGUITools.AddChild(this.Grid.gameObject, this.AchiSprite);
                        }
                        this.Grid.GetChild(this.Grid.childCount - 1).GetComponent <UISprite>().spriteName = "Data_statistics_images_shen";
                        this.Grid.GetChild(this.Grid.childCount - 1).gameObject.SetActive(true);
                    }
                    break;
                }
            }
        }
        List <KeyValuePair <int, int> > list2 = new List <KeyValuePair <int, int> >(this.achi);

        if (this.achi.Count > 0)
        {
            list2.Sort((KeyValuePair <int, int> s1, KeyValuePair <int, int> s2) => s1.Key.CompareTo(s2.Key));
        }
        for (int j = 0; j < this.achi.Count; j++)
        {
            switch (list2[j].Key)
            {
            case 7:
                if (this.Grid.childCount < this.Grid.childCount + j + 1)
                {
                    NGUITools.AddChild(this.Grid.gameObject, this.AchiSprite);
                }
                this.Grid.GetChild(this.Grid.childCount - 1).GetComponent <UISprite>().spriteName = "Data_statistics_icons_kills";
                this.Grid.GetChild(this.Grid.childCount - 1).gameObject.SetActive(true);
                break;

            case 8:
                if (this.Grid.childCount < this.Grid.childCount + j + 1)
                {
                    NGUITools.AddChild(this.Grid.gameObject, this.AchiSprite);
                }
                this.Grid.GetChild(this.Grid.childCount - 1).GetComponent <UISprite>().spriteName = "Data_statistics_icons_fist";
                this.Grid.GetChild(this.Grid.childCount - 1).gameObject.SetActive(true);
                break;

            case 9:
                if (this.Grid.childCount < this.Grid.childCount + j + 1)
                {
                    NGUITools.AddChild(this.Grid.gameObject, this.AchiSprite);
                }
                this.Grid.GetChild(this.Grid.childCount - 1).GetComponent <UISprite>().spriteName = "Data_statistics_images_money";
                this.Grid.GetChild(this.Grid.childCount - 1).gameObject.SetActive(true);
                break;

            case 10:
                if (this.Grid.childCount < this.Grid.childCount + j + 1)
                {
                    NGUITools.AddChild(this.Grid.gameObject, this.AchiSprite);
                }
                this.Grid.GetChild(this.Grid.childCount - 1).GetComponent <UISprite>().spriteName = "Data_statistics_icons_batman";
                this.Grid.GetChild(this.Grid.childCount - 1).gameObject.SetActive(true);
                break;

            case 11:
                if (this.Grid.childCount < this.Grid.childCount + j + 1)
                {
                    NGUITools.AddChild(this.Grid.gameObject, this.AchiSprite);
                }
                this.Grid.GetChild(this.Grid.childCount - 1).GetComponent <UISprite>().spriteName = "Data_statistics_icons_tower";
                this.Grid.GetChild(this.Grid.childCount - 1).gameObject.SetActive(true);
                break;

            case 12:
                if (this.Grid.childCount < this.Grid.childCount + j + 1)
                {
                    NGUITools.AddChild(this.Grid.gameObject, this.AchiSprite);
                }
                this.Grid.GetChild(this.Grid.childCount - 1).GetComponent <UISprite>().spriteName = "Data_statistics_icons_tank";
                this.Grid.GetChild(this.Grid.childCount - 1).gameObject.SetActive(true);
                break;

            case 13:
                if (this.Grid.childCount < this.Grid.childCount + j + 1)
                {
                    NGUITools.AddChild(this.Grid.gameObject, this.AchiSprite);
                }
                this.Grid.GetChild(this.Grid.childCount - 1).GetComponent <UISprite>().spriteName = "Data_statistics_icons_injure";
                this.Grid.GetChild(this.Grid.childCount - 1).gameObject.SetActive(true);
                break;
            }
        }
        this.Grid.GetComponent <UIGrid>().repositionNow = true;
        this.achi.Clear();
    }
Beispiel #17
0
 /// <summary>
 /// Update everything related to players
 /// </summary>
 /// <param name="list"></param>
 public static void UpdatePlayers(string list)
 {
     CurrentPlayers = JsonConvert.DeserializeObject <List <Player> >(list);
     PlayerCounter.SetText(CurrentPlayers.Count);
     PlayerDataTable.Update(CurrentPlayers);
 }
Beispiel #18
0
 public static int getPenalties(PlayerCounter pc)
 {
     return pc.breakCount *3 + pc.corruptBreakCount * 10;
 }
Beispiel #19
0
 public static int getScore(PlayerCounter pc, int voxelCount)
 {
     int score=(int)(voxelCount*getMultiplier(pc));
     score-=getPenalties(pc);
     return score>0?score:0;
 }
Beispiel #20
0
        public static void Set_Settle_Proficiency(this ModelManager mmng)
        {
            SettlementModelData settlementModelData = mmng.Get_SettlementModelData();

            if (settlementModelData == null)
            {
                ClientLogger.Error("Settlement: Get Self Null");
                return;
            }
            PvpTeamInfo pvp_teamInfo = settlementModelData.pvp_teamInfo;

            if (pvp_teamInfo == null)
            {
                ClientLogger.Error("Settlement: Get PvpTeamInfo Null");
                settlementModelData.proficiencyExpRecord_curExp = 0;
                settlementModelData.proficiencyExpRecord_Delta  = 0;
                settlementModelData.levelScore = 5;
                return;
            }
            Units player = PlayerControlMgr.Instance.GetPlayer();

            if (mmng.Get_GetMyAchievementData_X() == null)
            {
                ClientLogger.Error("Settlement: Get Achievement Data Null");
                settlementModelData.proficiencyExpRecord_curExp = 0;
                settlementModelData.proficiencyExpRecord_Delta  = 0;
                settlementModelData.levelScore = 5;
                return;
            }
            List <KdaMyHeroData> myHero = ModelManager.Instance.Get_GetMyAchievementData_X().myHero;

            if (myHero == null)
            {
                settlementModelData.proficiencyExpRecord_curExp = 0;
            }
            else
            {
                foreach (KdaMyHeroData current in myHero)
                {
                    if (player != null && current.herouseddata.heroid == player.npc_id)
                    {
                        settlementModelData.proficiencyExpRecord_curExp = current.herouseddata.useinfo;
                    }
                }
            }
            string        userId        = mmng.Get_userData_X().UserId;
            PlayerCounter playerCounter = null;

            if (!pvp_teamInfo.unitCounters.TryGetValue(userId, out playerCounter))
            {
                return;
            }
            int num = playerCounter.deadCount;

            num = ((num != 0) ? num : 1);
            float                      num2       = (float)(playerCounter.killHoreCount + playerCounter.helpKillHoreCount) / (float)num * 3f;
            string                     curLevelId = LevelManager.CurLevelId;
            SysBattleSceneVo           dataById   = BaseDataMgr.instance.GetDataById <SysBattleSceneVo>(curLevelId);
            SysHeroProficiencyPointsVo sysHeroProficiencyPointsVo = mmng.Get_ProficiencyLevel(num2, curLevelId);

            if (sysHeroProficiencyPointsVo == null || dataById == null)
            {
                settlementModelData.proficiencyExpRecord_Delta = 0;
                ClientLogger.Error(string.Concat(new object[]
                {
                    "Settlement: Can't find Proficiency Item. KDA:",
                    num2,
                    " BattleId:",
                    curLevelId
                }));
                return;
            }
            SysBattleSceneVo dataById2 = BaseDataMgr.instance.GetDataById <SysBattleSceneVo>(LevelManager.CurBattleId);
            bool             flag      = LevelManager.m_CurLevel.IsFightWithRobot() || LevelManager.m_CurLevel.IsBattleNewbieGuide() || mmng.Get_Settle_IsSelfDefine();

            if (dataById.hero_proficiency_points == 1 && sysHeroProficiencyPointsVo.type.ToString() == curLevelId && GameManager.IsVictory.HasValue && !flag)
            {
                settlementModelData.proficiencyExpRecord_Delta = ((!GameManager.IsVictory.Value) ? sysHeroProficiencyPointsVo.failure_bonus_point : sysHeroProficiencyPointsVo.victory_bonus_point);
            }
            else
            {
                settlementModelData.proficiencyExpRecord_Delta = 0;
            }
            string evaluate = sysHeroProficiencyPointsVo.evaluate;

            switch (evaluate)
            {
            case "D":
                settlementModelData.levelScore = 1;
                return;

            case "C":
                settlementModelData.levelScore = 2;
                return;

            case "B":
                settlementModelData.levelScore = 3;
                return;

            case "A":
                settlementModelData.levelScore = 4;
                return;

            case "S":
                settlementModelData.levelScore = 5;
                return;
            }
            settlementModelData.levelScore = 0;
        }