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

public class Earthquake : Power
{
    [SerializeField]
    GameObject p_myPrefabEarthQuake;
    [SerializeField]
    AudioSource p_myAudioSource;

    public override void PowerEffect(Vector3 pos)
    {
        base.PowerEffect(pos);
        GameObject newItem = Instantiate(p_myPrefabEarthQuake, pos, Quaternion.identity) as GameObject;
        newItem.transform.parent = GameObject.FindGameObjectWithTag("Earth").transform;
        if (!p_myAudioSource.isPlaying)
        {
            p_myAudioSource.Play();
        }
    }
}