public void EnterLaserHandler(PlayerEnterColorLaser info) { if (info.Src.Color != colorHistory.Peek()) { interactable = info.Src; } }
private void Update() { if (!GameConstants.Current.Paused) { movement.x = Input.GetAxis("Horizontal"); if (Input.GetButtonDown("Jump")) { jump = true; } rewind = Input.GetButtonDown("Rewind"); interact = Input.GetButtonDown("Interact"); if (rewind) { popColor(); } //TODO: Replace this with a real way to reset the level if (Input.GetButtonDown("Reset")) { GameEventSystem.Current.FireEvent(new EndLevelInfo(this, SceneManager.GetActiveScene().buildIndex)); } characterController.InvertGravity = (ColorID == 4); } if (Input.GetButtonDown("Pause")) { if (pauseMenu.activeSelf) { pauseMenu.SetActive(false); GameConstants.Current.Paused = false; } else { pauseMenu.SetActive(true); GameConstants.Current.Paused = true; } } if (interactable != null) { interactionDialogue.alpha = 1; if (interact) { GameEventSystem.Current.FireEvent(new PlayerInteractWithColorLaser(this, interactable)); interactable = null; } } else { interactionDialogue.alpha = 0; } }
public PlayerInteractWithColorLaser(Player src, ColorLaserController target) { Src = src; Target = target; }
public PlayerExitColorLaser(Player target, ColorLaserController src) { }
public PlayerEnterColorLaser(Player target, ColorLaserController src) { Target = target; Src = src; }
public void ExitLaserHandler(PlayerExitColorLaser info) { interactable = null; }