using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class MineBlackHoleForce : BlackHoleForce
{
    // Gravity force offset % is used so we can either slow down or increase the default pull from the black hole.
    public float gravityForceOffsetPercent;    

    public override void ApplyBlackHoleForce(float appliedForce)
    {
        // Check if we're blackhole immune before trying to pull the core in.
        if (!blackHolePullImmunue)
        {
            _objectRigidBody.AddForce((-_objectRigidBody.transform.up * appliedForce) * gravityForceOffsetPercent);
        }
    }

    public override void HitBlackHole()
    {    
        // Destroy the Core.
        Destroy(gameObject);
        base.HitBlackHole();
    }
}
