예제 #1
0
    /// <summary>
    ///  将所有数据添加进字典中
    /// </summary>
    private void addSoldierData(int soldierId, bool isMe)
    {
        SoldiersCollocationAgent soldiers = new SoldiersCollocationAgent();

        soldiers.setData(soldierId);

        // 对应的兵种ID
        int[] soldierIdArray = soldiers.getSoldies();

        for (int i = 0; i < soldierIdArray.Length; ++i)
        {
            if (soldierIdArray[i] != 0)
            {
                SoldierDataBase soldier = new SoldierDataBase();
                soldier.Sid = soldierIdArray[i];

                setSoldierData(soldier);

                SoldiersDict.Add(i, soldier);
            }
            else // 占位用
            {
                SoldiersDict.Add(i, null);
            }
        }
    }
예제 #2
0
    /// <summary>
    ///  将所有数据添加进字典中
    /// </summary>
    private void addSoldierData( int soldierId, bool isMe)
    {
        SoldiersCollocationAgent soldiers = new SoldiersCollocationAgent();

        soldiers.setData(soldierId);

        // 对应的兵种ID
        int[] soldierIdArray = soldiers.getSoldies();

        for (int i = 0; i < soldierIdArray.Length; ++i)
        {
            if (soldierIdArray[i] != 0)
            {
                SoldierDataBase soldier = new SoldierDataBase();
                soldier.Sid = soldierIdArray[i];

                setSoldierData(soldier);

                SoldiersDict.Add(i, soldier);
            }
            else // 占位用
            {
                SoldiersDict.Add(i, null);
            }
        }
    }