using UnityEngine;
using System.Collections;

// One thunder
public class ThunderStrike
{
    public int m_iNbSection;
	
	// two array: one of the general thunder path, and an other
    public Vector3[] m_vPathPointArray;
    public Vector3[] m_vOriginPathPointArray;
	
	public float	 m_fParticularThicknees = -1; // by default we take the global thikness
   
    public ThunderStrike( int iNbSection )
    {
        m_iNbSection = iNbSection;

        m_vPathPointArray 		= new Vector3[m_iNbSection];
        m_vOriginPathPointArray = new Vector3[m_iNbSection];
    }
}


// Thunder Generator base class
public abstract class ThunderGenerator : MonoBehaviour {
	
	protected static Perlin oPerlinNoise;
	
	protected Thunder 			oThunder 			= null;
	protected ThunderStrike[] 	oThunderStrikeArray = null;
	
	public ThunderGenerator()
	{
         oPerlinNoise = new Perlin();
	}

	// initi thunder path
	public abstract void InitThunders();
	
	// update thunder
	public abstract void UpdateThunders(); 
	
	public void SetThunder( Thunder oThunderAttached )
	{
		oThunder = oThunderAttached;
		oThunderStrikeArray = oThunderAttached.oThunderStrikeArray;
	}

}

