Explorar o código

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

Feniks %!s(int64=4) %!d(string=hai) anos
pai
achega
f830197075
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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)
             {