Exemplo n.º 1
0
    void Create()
    {
        string     blockName = m_sushiType.ToString();
        GameObject block     = Instantiate(Resources.Load(blockName), transform.position, transform.rotation) as GameObject;

        block.transform.parent = this.gameObject.transform; //Hierarchy가 흩어지지 않도록.
    }
Exemplo n.º 2
0
    //애니메이션을 재생합니다.
    public void PlayAnimation(AnimationType anim)
    {
        m_current = anim;

        //초밥 종류에 따라서 애니메이션을 지정합니다.
        string animName = m_sushiType.ToString() + "_" + m_current.ToString();

        m_animation.Play(animName);
    }