示例#1
0
文件: GUI.cs 项目: tiganov/CAT
        /// --------------- SETUP SCREEN METHODS ----------------



        private void PlayerInputBox_KeyDown(object sender, KeyEventArgs e)
        {
            // if the user presses Enter key in the PlayerInputBox, treat it like they
            // pressed the Add button, then focus back to the inputbox
            if ((e.Key == Key.Enter) && (PlayerInputBox.Text != ""))
            {
                AddButton_Click(this, new RoutedEventArgs());
                PlayerInputBox.Focus();
            }
        }
示例#2
0
 private void Awake()
 {
     gameMananger   = GameMananger.instance;
     rb             = GetComponent <Rigidbody2D>();
     playerInputBox = GetComponent <PlayerInputBox>();
 }