Пример #1
0
 public void EnableTouchDamage()
 {
     if (touchDamage != null)
     {
         touchDamage.EnableDamage();
     }
 }
Пример #2
0
    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();
    }