private void UpdateUI() { bool isOverUI = PlayfieldEvents.HasEvent(PlayfieldEvents.InputEvents.CursorMoveOverUI); if (isOverUI && !m_IsCursorOverUI) { m_PlayfieldComponent.RemoveHiglighting(); m_PlayfieldComponent.OverUI(); } m_IsCursorOverUI = isOverUI; }
private void EditorUpdateCell() { if (!PlayfieldEvents.HasEvent(PlayfieldEvents.InputEvents.Select)) { return; } if (IsValidCell(m_CurrentCell)) { m_PlayfieldComponent.SetCellProperties(m_CurrentCell.x, m_CurrentCell.y, m_EditorProperties); } }
private void UpdateActions() { if (!PlayfieldEvents.HasEvent(PlayfieldEvents.InputEvents.Select)) { return; } if (IsValidCell(m_CurrentCell)) { m_PlayfieldComponent.SelectCell(m_CurrentCell.x, m_CurrentCell.y); } else { m_PlayfieldComponent.RemoveSelection(); } }
private void UpdateLocomotion() { if (!PlayfieldEvents.HasEvent(PlayfieldEvents.InputEvents.CursorMove)) { return; } m_CurrentCell = (Vector2Int)PlayfieldEvents.GetEvent(PlayfieldEvents.InputEvents.CursorMove); if (IsValidCell(m_CurrentCell)) { m_PlayfieldComponent.HiglightCell(m_CurrentCell.x, m_CurrentCell.y); } else { m_PlayfieldComponent.RemoveHiglighting(); } }
private void EditorUpdateSelection() { if (!PlayfieldEvents.HasEvent(PlayfieldEvents.InputEvents.CursorMove)) { return; } m_CurrentCell = (Vector2Int)PlayfieldEvents.GetEvent(PlayfieldEvents.InputEvents.CursorMove); if (IsValidCell(m_CurrentCell)) { m_PlayfieldComponent.SetEditorSelection(m_CurrentCell.x, m_CurrentCell.y); } // Update cells if MB pressed if (PlayfieldEvents.HasEvent(PlayfieldEvents.InputEvents.LMBPressed)) { m_PlayfieldComponent.SetCellProperties(m_CurrentCell.x, m_CurrentCell.y, m_EditorProperties); } }