wangguan
2020-12-04 9f2d1de6643eefe5467cac9c9f540a79d50b1ba7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using System;
using UnityEngine;
 
namespace TowerDefense.Level
{
    /// <summary>
    /// Abstract base class representing a level intro
    /// </summary>
    public abstract class LevelIntro : MonoBehaviour
    {
        /// <summary>
        /// Called when the Intro is completed
        /// </summary>
        public event Action introCompleted;
 
        /// <summary>
        /// Should be fired by the derived classes to mark that the intro is completed
        /// </summary>
        protected void SafelyCallIntroCompleted()
        {
            if (introCompleted != null)
            {
                introCompleted();
            }
        }
    }
}