void Awake()
    {
        m_KeyInput    = GetComponent <C_KeyInput>();
        m_Rigidbody2D = GetComponent <Rigidbody2D>();
        m_Animator    = GetComponentInChildren <Animator>();
        m_OffsetGrp   = transform.Find("Offset_Grp");

        m_HitSplash      = Resources.Load("VFX_HitSplash") as GameObject;
        m_spriteRenderer = GetComponentInChildren <SpriteRenderer>();
        m_AudioSource    = GetComponent <AudioSource> ();
    }
Beispiel #2
0
    void Awake()
    {
        m_KeyInput         = GetComponent <C_KeyInput>();
        m_AudioSource      = GetComponent <AudioSource>();
        m_AudioSource.clip = m_ButtonSoundClip;
        //transform.Find("Offset_Grp").Find("BGM_Grp").GetComponent<AudioSource>().clip = m_BGMClip;
        //transform.Find("Offset_Grp").Find("BGM_Grp").GetComponent<AudioSource>().Play();
        //transform.Find("BGM_Grp").GetComponent<AudioSource>().clip = m_BGMClip;
        //transform.Find("BGM_Grp").GetComponent<AudioSource>().Play();

        ChangeButtonColor();
    }