private void Awake() { m_CharacterController2D = GetComponent <CharacterController2D>(); m_Collider = GetComponent <Collider2D>(); m_Animator = GetComponent <Animator>(); m_SpriteRenderer = GetComponent <SpriteRenderer>(); m_OriginalColor = m_SpriteRenderer.color; if (projectilePrefab != null) { m_BulletPool = BulletPool.GetObjectPool(projectilePrefab.gameObject, 8); } m_SpriteForward = spriteFaceLeft ? Vector2.left : Vector2.right; if (m_SpriteRenderer.flipX) { m_SpriteForward = -m_SpriteForward; } if (meleeDamager != null) { EndAttack(); } }