using Core.Utilities;
using UnityEngine;
namespace TowerDefense.Level
{
///
/// Basic implementation of intro: a delay
///
public class TimedLevelIntro : LevelIntro
{
///
/// The delay
///
public float time = 5f;
///
/// Timer object used to track the delayed
///
protected Timer m_Timer;
///
/// Set up the timer and make it fire the SafelyCallIntroCompleted event
///
protected void Awake()
{
m_Timer = new Timer(time, SafelyCallIntroCompleted);
}
///
/// Tick the timer and disable it on completion
///
protected void Update()
{
if (m_Timer != null)
{
if (m_Timer.Tick(Time.deltaTime))
{
m_Timer = null;
}
}
}
}
}