public static BasePlayerData GetPlayerData(int playerID)
    {
        BasePlayerData data = null;

        switch (playerID)
        {
        case 0:
            data = new PlayerData_00();
            break;

        case 1:
            data = new PlayerData_01();
            break;

        case 2:
            data = new PlayerData_02();
            break;

        case 3:
            data = new PlayerData_03();
            break;

        default:
            Debug.Log("SOMETHING WENT WRONG HERE: playerID: " + playerID);
            break;
        }
        return(data);
    }
示例#2
0
    public static void LoadPlayerDataInToManager(int playerID)
    {
        BasePlayerData data = null;

        switch (playerID)
        {
        case 0:
            data = new PlayerData_00();
            break;

        case 1:
            data = new PlayerData_01();
            break;

        case 2:
            data = new PlayerData_02();
            break;

        case 3:
            data = new PlayerData_03();
            break;

        default:
            Debug.Log("SOMETHING WENT WRONG HERE: playerID: " + playerID);
            break;
        }
        PlayerData = data;
    }