mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-05 10:09:47 +03:00
Update some GDScript files for Godot 4.3 (#1129)
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
# https://github.com/godotengine/godot-proposals/issues/279
|
||||
|
||||
# Basis25D structure for performing 2.5D transform math.
|
||||
# Note: All code assumes that Y is UP in 3D, and DOWN in 2D.
|
||||
# NOTE: All code assumes that Y is UP in 3D, and DOWN in 2D.
|
||||
# Meaning, a top-down view has a Y axis component of (0, 0), with a Z axis component of (0, 1).
|
||||
# For a front side view, Y is (0, -1) and Z is (0, 0).
|
||||
# Remember that Godot's 2D mode has the Y axis pointing DOWN on the screen.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
@tool
|
||||
@icon("res://addons/node25d/icons/y_sort_25d_icon.png")
|
||||
class_name YSort25D
|
||||
extends Node # NOTE: NOT Node2D, Node25D, or Node2D
|
||||
extends Node # NOTE: NOT Node2D or Node25D.
|
||||
|
||||
|
||||
# Whether or not to automatically call sort() in _process().
|
||||
|
||||
@@ -88,7 +88,8 @@ func _sprite_basis() -> void:
|
||||
|
||||
# This method returns a bool but if true it also outputs to the direction variable.
|
||||
func _check_movement() -> bool:
|
||||
# Gather player input and store movement to these int variables. Note: These indeed have to be integers.
|
||||
# Gather player input and store movement to these int variables.
|
||||
# NOTE: These indeed have to be integers.
|
||||
var x := 0
|
||||
var z := 0
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ config/name="Joypads"
|
||||
config/description="A tool for testing joypad input."
|
||||
config/tags=PackedStringArray("demo", "gui", "input", "official")
|
||||
run/main_scene="res://joypads.tscn"
|
||||
config/features=PackedStringArray("4.2")
|
||||
config/features=PackedStringArray("4.3")
|
||||
run/low_processor_mode=true
|
||||
config/icon="res://icon.webp"
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ func _input(event: InputEvent) -> void:
|
||||
return
|
||||
|
||||
# Ignore events not related to gamepads.
|
||||
if not (event is InputEventJoypadButton or event is InputEventJoypadMotion):
|
||||
if event is not InputEventJoypadButton and event is not InputEventJoypadMotion:
|
||||
return
|
||||
|
||||
# Ignore devices other than the one being remapped. Handles accidental input and analog drift.
|
||||
|
||||
Reference in New Issue
Block a user