liuzhiwei
2020-12-28 20d94d22bd80b0f3b748d2078916ebaa1d6ec856
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();
            }
        }
    }
}