コード例 #1
0
 private void UpdateGamePhase(GamePhases.GameplayPhase newGamePhase)
 {
     if (newGamePhase == GamePhases.GameplayPhase.Evacuation || newGamePhase == GamePhases.GameplayPhase.DeEvacuation)
     {
         gamePhase = newGamePhase;
     }
 }
コード例 #2
0
ファイル: GameplayEvents.cs プロジェクト: PsichiX/ggj-2019
 public void CallEvent(GamePhases.GameplayPhase gamePhase, object param)
 {
     if (eventDict.ContainsKey(gamePhase))
     {
         eventDict[gamePhase]?.Invoke(param);
         GameplayPhaseChanged?.Invoke(gamePhase);
     }
 }
コード例 #3
0
ファイル: GameplayEvents.cs プロジェクト: PsichiX/ggj-2019
 public bool DetachFromEvent(GamePhases.GameplayPhase gamePhase, Action <object> action)
 {
     if (eventDict.ContainsKey(gamePhase))
     {
         eventDict[gamePhase] -= action;
         return(true);
     }
     return(false);
 }