Example #1
0
 void OnDisable()
 {
     Instance = null;
     for (int i = 0; i < headList.Length; i++)
     {
         DestroyImmediate(headList[i].targetEntity);
     }
 }
Example #2
0
    void Awake()
    {
        if (Instance == null)
        {
            Instance = this;
        }

        //for(int i = 0; i < 6; i++)
        headList = GetComponentsInChildren <AltarInHead>();
    }
Example #3
0
    /*!  Init()
     *!   \details	初期化
     *!
     *!   \return	none
     */
    private void Init()
    {
        // インスタン所得
        GameObject[] humans   = GameObject.FindGameObjectsWithTag(TAG_HUMAN);
        GameObject   altarMgr = GameObject.Find(ALTAR_MGR);

        // インスタンス保存
        for (int i = 0; i < humans.Length; i++)
        {
            m_humanList.Add(humans[i].GetComponent <CHuman>());
        }
        m_altarMgr = altarMgr.GetComponent <AltarManager>();

        m_HumanNum = m_humanList.Count;

        // 取得ジェック
        // Debug.Log( "人の数:" + m_HumanNum );
        // Debug.Log( "祭壇:" + m_altarMgr );
        m_isInit = 0 < m_humanList.Count;
    }