using System.Collections; using System.Collections.Generic; using UnityEngine; using System; public class TechEvents : MonoBehaviour { public static Action OnTechResearchStarted; public static Action OnTechResearchCompleted; public static Action OnTechUnlocked; public static Action OnTurnPassed; // takes no parameter passed in public static void TechResearchStarted(Technology tech) { // note the use of the null check operator (?) below // this translates into: "if this object is not null, call this method on it" OnTechResearchStarted?.Invoke(tech); } public static void TechResearchCompleted(Technology tech) { // note the use of the null check operator (?) below // this translates into: "if this object is not null, call this method on it" OnTechResearchCompleted?.Invoke(tech); } public static void TechUnlocked(Technology tech) { // note the use of the null check operator (?) below // this translates into: "if this object is not null, call this method on it" OnTechUnlocked?.Invoke(tech); } public static void TurnPassed(Technology tech) { // note the use of the null check operator (?) below // this translates into: "if this object is not null, call this method on it" OnTurnPassed?.Invoke(); } }