using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Linq;

public class GameHUDScreen : UIScreen {

	public List<GameObject> WakeUp;

	public override void Awake() {
		base.Awake();
	}

	public override void OnEnable () {
		base.OnEnable();
	}
	
	// Update is called once per frame
	public override void OnDisable () {
		base.OnDisable();
	}


	public override void Show(bool additional = false) {

		base.Show(additional);

		foreach(GameObject g in WakeUp) {
			g.SetActive(true);
			if(g.GetComponent<Rigidbody>() != null) {
				g.GetComponent<Rigidbody>().isKinematic = false;
			}
		}

		PlayerShipController.instance.DisplayMobileScreens();

		
	}
	public override void Hide() {
		
		base.Hide();
		foreach(GameObject g in WakeUp) {
			if(g.GetComponent<Rigidbody>() != null) {
				g.GetComponent<Rigidbody>().isKinematic = true;
			} else {
				g.SetActive(false);
			}	
		}

	}

	void onPause(object sender, EventArgs<bool> e) {
		if(e.Value) {
			UIScreen.GetScreen<MainMenuScreen>().Show();
		}
	}

	
}
