소스 검색

Fix C# condition being `as` instead of `is` in Input examples (#4362)

Feniks 4 년 전
부모
커밋
f830197075
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      tutorials/inputs/input_examples.rst

+ 1 - 1
tutorials/inputs/input_examples.rst

@@ -282,7 +282,7 @@ also counts as a button - two buttons, to be precise, with both
 
     public override void _Input(InputEvent inputEvent)
     {
-        if (inputEvent as InputEventMouseButton mouseEvent && mouseEvent.Pressed)
+        if (inputEvent is InputEventMouseButton mouseEvent && mouseEvent.Pressed)
         {
             switch ((ButtonList)mouseEvent.ButtonIndex)
             {