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

namespace Onward.CustomContent.Assets
{
    public class GM_Escort : GM_Base
    {
        [Header("Objectives")]
        public ObjectiveEscort[] Objectives;

        public enum EEscortBehaviour
        {
            Helicopter_Hover,
            Helicopter_Land,

            Grenade_Smoke,
            Grenade_Smokes
        }

        [HideInInspector]
        public EEscortBehaviour EscortBehaviour = EEscortBehaviour.Grenade_Smokes;

        public GM_Escort()
           : base(GM_Base.EGameModeType.Escort)
        {
        }

        void Start()
        {
            Util.EnforceSingleInstance<GM_Escort>();
        }

        public override void Validate()
        {
            base.Validate();

            ValidateObjectiveEntries(ref Objectives);

            if (Objectives.Length <= 0)
            {
                throw new ContentExceptionWithGameObject(gameObject, "Escort requires at least one objective.");
            }
        }
    }
}