using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;

[RequireComponent(typeof(AudioSource))]
[RequireComponent(typeof(ElementalSphere))]
public class ShapeOnRing : MonoBehavclops
{
    public GameObject particleEffect;

    protected void OnTriggerEnter(Collider other)
    {
        if(other.CompareTag("Shape"))
        {
            TriggerEffect();
        }
    }

    public void TriggerEffect()
    {
        //Do extra pretty things
        audio.Play();
        if(particleEffect!=null)
        {
            //GameObject effect = (GameObject) GameObject.Instantiate(particleEffect, transform.position, Quaternion.identity);
            //effect.transform.parent = transform;
        }

        //Call the actual command
        Cached<ElementalSphere>().CallCommand(Game.Instance.player1,direction);
    }

    [HideInInspector]
    public Direction direction;
}
