private void Awake()
        {
            m_animatedSpriteRenderer = GetComponent <AnimatedSpriteRenderer>();

            foreach (var animKey in m_animationKeyList)
            {
                var anim = LoadAnimation(animKey);
                m_animatedSpriteRenderer.AddAnimation(animKey, anim);
            }
        }
Example #2
0
 private void Awake()
 {
     m_animator      = GetComponent <AnimatedSpriteRenderer>();
     m_body          = GetComponent <Rigidbody2D>();
     m_originalColor = GetComponent <SpriteRenderer>().color;
 }
 private void Awake()
 {
     m_animator = GetComponent <AnimatedSpriteRenderer>();
     m_body     = GetComponent <Rigidbody2D>();
 }