这是第一个 Unity 开放项目的repo,是 Unity 和社区合作创建的一个小型开源游戏演示,第一款游戏是一款名为 Chop Chop 的动作冒险游戏。
您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
uChema be536522 Merge with main and fix Selection bug 3 年前
..
MenuController.cs Fix Subscribe/unsubscribe issue in UI. Implement Pause Menu with all its functions 3 年前
MenuController.cs.meta debug 4 年前
MenuSelectionHandler.cs Merge with main and fix Selection bug 3 年前
MenuSelectionHandler.cs.meta menu input 4 年前
MultiInputButton.cs Merge with main and fix Selection bug 3 年前
MultiInputButton.cs.meta was able to fix edge case #1 4 年前
MultiInputSelectableElement.cs Renaming and refactoring on UI 4 年前
MultiInputSelectableElement.cs.meta menu input 4 年前
README.md updated readme 4 年前
README.md.meta doc 4 年前

README.md

#Overview Menu Controller class consumes input from inputreader

  • opens / closes menu

MenuSelectionHandler class acts as manager UI selection logic

  • it consumes events provided by the InputReader class
  • adds custom selection and component caching behaviour
  • must be present on the same transform as the SelectableUI or CC_Button components it controls

SelectableUIELement send messages to the MenuSelectionHandler when a mouse is over them or selection has been moved onto them

  • they have events for mouse enter and exit
  • they have events for on selection
  • they find the MenuSelectionHandler component by checking the root transform for children with the MenuSelectionHandler class (can be refactored later)
  • does not handle submit events (must use CC_Button if you'd like submit behaviour)

CC_Button (chop chop button) implements the same methods as SelectableUIElement, however it also inherits from UnityEngine.UI.Button implements an OnSubmitMethod which queries whether it should call base.OnSubmit() or stop the interaction early. Used for our custom menu input handling to prevent an edgecase where mouse clicks can call submit on the wrong UI element.

Setup

  • add MenuSystem prefab to scene if not already present
    • assign references if they are not assigned
  • hit escape to open and close menu