using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;

public class GameEvents : MonoBehaviour {

    public UnityAction OnAppStarted;
    public UnityAction<bool> OnAppPaused;
    public UnityAction OnAppExit;

    public void CallOnAppStarted () {
        if (this.OnAppStarted != null) {
            this.OnAppStarted.Invoke();
        }
    }

    public void CallOnAppPaused (bool isPaused) {
        if (this.OnAppPaused != null) {
            this.OnAppPaused.Invoke(isPaused);
        }
    }

    public void CallOnAppExit () {
        if (this.OnAppExit != null) {
            this.OnAppExit.Invoke();
        }
    }


    public UnityAction<CurrentGameData> OnGameStarted;
    public UnityAction<CurrentGameData> OnGameFinished;

    public void CallOnGameStarted (CurrentGameData data) {
        if (this.OnGameStarted != null) {
            this.OnGameStarted.Invoke(data);
        }
    }

    public void CallOnGameFinished (CurrentGameData data) {
        if (this.OnGameFinished != null) {
            this.OnGameFinished.Invoke(data);
        }
    }


    public UnityAction OnPlayerDied;
    public UnityAction OnZombieDied;

    public void CallOnPlayerDied () {
        if (this.OnPlayerDied != null) {
            this.OnPlayerDied.Invoke();
        }
    }

    public void CallOnZombieDied () {
        if (this.OnZombieDied != null) {
            this.OnZombieDied.Invoke();
        }
    }


    public UnityAction OnGameWon;

    public void CallOnGameWon () {
        if (this.OnGameWon != null) {
            this.OnGameWon.Invoke();
        }
    }
}
