Beispiel #1
0
 void Handle(GoToMenuEvent e)
 {
     constraint.ForEachGameObject((egoComponent, transfor, playerComponent) => {
         egoComponent.gameObject.SetActive(true);
         playerComponent.timeElapsed = -1;
     });
 }
Beispiel #2
0
 void Handle(GoToMenuEvent e)
 {
     constraint.ForEachGameObject((egoComponent, healthComponent, player) => {
         //for (int i = 0; i < healthComponent.maxHealth; i++) {
         //	healthComponent.lifeIcons.SetValue (healthComponent.lifeIcon, i);
         healthComponent.health = healthComponent.maxHealth;
         //}
     });
 }
Beispiel #3
0
 void Handle(GoToMenuEvent e)
 {
     constraint.ForEachGameObject((egoComponent, mainMenuComponent) => {
         Time.timeScale = 0;
         mainMenuComponent.myMenuStatus = MainMenuComponent.MenuStatus.active;
         egoComponent.gameObject.SetActive(true);
         Debug.Log("menu done");
     });
 }
Beispiel #4
0
    public override void Update()
    {
        constraint.ForEachGameObject((egoComponent, gameStateComponent) => {
            if (egoComponent.gameObject.activeSelf && gameStateComponent.myGameState == GameStateComponent.GameState.GameOver)
            {
                if (KutiInput.Instance.GetButtonDown(EKutiButton.P1Left) || KutiInput.Instance.GetButtonDown(EKutiButton.P1Right) || KutiInput.Instance.GetButtonDown(EKutiButton.P1Up) ||
                    KutiInput.Instance.GetButtonDown(EKutiButton.P2Left) || KutiInput.Instance.GetButtonDown(EKutiButton.P2Up) || KutiInput.Instance.GetButtonDown(EKutiButton.P2Right) || Input.anyKeyDown)
                {
                    var e = new GoToMenuEvent();
                    EgoEvents <GoToMenuEvent> .AddEvent(e);
                    gameStateComponent.myGameState = GameStateComponent.GameState.Menu;
                }
            }

            if (KutiInput.Instance.GetButtonDown(EKutiButton.Menu) || Input.GetKeyDown(KeyCode.Escape))
            {
                Application.Quit();
            }
        });
    }
Beispiel #5
0
 void Handle(GoToMenuEvent e)
 {
     constraint.ForEachGameObject((egoComponent, healthUI, spriteRenderer) => {
         egoComponent.gameObject.SetActive(true);
     });
 }
Beispiel #6
0
 void onGoToMain(GoToMenuEvent e)
 {
     LoadScene(mainMenuScene);
 }
Beispiel #7
0
 void Handle(GoToMenuEvent e)
 {
     constraint.ForEachGameObject((egoComponent, gameStateComponent) => {
         gameStateComponent.myGameState = GameStateComponent.GameState.Menu;
     });
 }