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

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

        public GM_Assault()
            : base(GM_Base.EGameModeType.Assault)
        {
        }

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

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

            ValidateObjectiveEntries(ref Objectives);

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