Esempio n. 1
0
    void    Awake()
    {
        // 사용할 Object를 캐시.
        m_grid_move = GetComponent <GridMove>();
        m_gameCtrl  = FindObjectOfType(typeof(GameCtrl)) as GameCtrl;
        m_weapon    = GetComponent <Weapon>();
        m_map       = FindObjectOfType(typeof(Map)) as Map;

        m_gameCtrl.AddObjectToList(gameObject);

        m_audio_channels = FindObjectOfType(typeof(AudioChannels)) as AudioChannels;
    }
Esempio n. 2
0
    // Use this for initialization
    void    Awake()
    {
        m_grid_move = GetComponent <GridMove>();
        m_gameCtrl  = FindObjectOfType(typeof(GameCtrl)) as GameCtrl;
        m_gameCtrl.AddObjectToList(gameObject);
        m_audio = FindObjectOfType(typeof(AudioChannels)) as AudioChannels;

        m_animator = GetComponent <Animator>();

        if (m_animator == null)
        {
            Debug.LogError("Can't find Animator component.");
        }
    }