示例#1
0
    private void createChara(string _strName, int _iCost)
    {
        CharaControl charaControl = PrefabManager.Instance.AddGameObject <CharaControl>(m_goHomeMine);

        charaControl.gameObject.transform.parent = Root.transform;

        charaControl.Init(0, _strName, m_goHomeEnemy, m_goRootLifeGauge);
    }
示例#2
0
    private void createChara(string _strName, int _iCost)
    {
        CharaControl charaControl = PrefabManager.Instance.AddGameObject <CharaControl>(m_goHome);

        //string prefabName = string.Format("prefab/chara/{0}", _strName);
        charaControl.gameObject.transform.parent = m_goRoot.transform;
        charaControl.Init(1, _strName, m_goTarget, m_goRootLifeGauge);


        /*
         *
         * //Debug.LogError(string.Format("name:{0} const:{1}", _strName, _iCost));
         * string prefabName = string.Format("prefab/chara/{0}", _strName);
         * //Debug.Log(string.Format("prefabname:{0}", prefabName));
         *
         * CharaControl charaControl = PrefabManager.Instance.MakeScript<CharaControl>(prefabName, m_goHome);
         * //Debug.Log(charaControl);
         * charaControl.gameObject.transform.localPosition = Vector3.zero;
         * charaControl.gameObject.transform.localRotation = new Quaternion(0.0f, 0.0f, 0.0f, 0.0f);
         *
         * charaControl.gameObject.transform.parent = m_goRoot.transform;
         * charaControl.Init(_strName, m_goTarget);
         */
    }