// Use this for initialization
    void Start()
    {
        m_pBezier.UseAsGame();
        Application.targetFrameRate = 60;

        GameObject[] cs = new GameObject[m_iMaxCount];
        for (int i = 0; i < m_iMaxCount; ++i)
        {
            float fX = 2.0f * (i / 32) - 31.0f;
            float fY = 2.0f * (i % 32) - 31.0f;

            if (0 == i)
            {
                cs[0] = m_pModel.gameObject;
                cs[i].GetComponent <ACharactor>().m_pModel.Randomize(true);
                cs[i].GetComponent <ACharactor>().m_pModel.SetCamp((ECharactorCamp)Random.Range(0, (int)ECharactorCamp.ECC_Max));
                cs[i].GetComponent <ACharactor>().m_pModel.SetVisible(Random.Range(0.0f, 1.0f) > 0.8f ? ECharactorVisible.ECV_InVisible : ECharactorVisible.ECV_Visible);
            }
            else if (i < m_iPrefabCount)
            {
                cs[i] = Instantiate(m_pModel.gameObject);
                cs[i].GetComponent <ACharactor>().m_pModel.Randomize(true);
                cs[i].GetComponent <ACharactor>().m_pModel.SetCamp((ECharactorCamp)Random.Range(0, (int)ECharactorCamp.ECC_Max));
                cs[i].GetComponent <ACharactor>().m_pModel.SetVisible(Random.Range(0.0f, 1.0f) > 0.8f ? ECharactorVisible.ECV_InVisible : ECharactorVisible.ECV_Visible);
            }
            else
            {
                cs[i] = Instantiate(cs[Random.Range(0, m_iPrefabCount)]);
            }
            cs[i].transform.position = new Vector3(fX, 0.0f, fY);
            cs[i].name = "Unit" + (i + 1);
        }
    }