public void EnableTouchDamage() { if (touchDamage != null) { touchDamage.EnableDamage(); } }
private void Awake() { spriteRenderer = GetComponent <SpriteRenderer>(); spriteForward = spriteFacingLeft ? Vector2.left : Vector2.right; if (spriteRenderer.flipX) { spriteForward = -spriteForward; } // boxCollider2D = GetComponent<BoxCollider2D>(); animator = GetComponent <Animator>(); // playerController2D = GetComponent<PlayerController2D>(); touchDamage.EnableDamage(); DisableMeleeDamage1(); DisableMeleeDamage2(); }