This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extends Spatial | |
| var speed = 100 | |
| func _physics_process(delta): | |
| if Input.is_action_pressed("ui_space"): | |
| translation += speed * (Vector3.RIGHT.rotated(Vector3(0, 1, 0), rotation.y)) * delta | |
| func _input(event: InputEvent) -> void: | |
| if event is InputEventMouseMotion: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func get_direction(pos : Vector2) -> String: | |
| var B := pos # next position | |
| var A := global_position # current position | |
| var direction := B - A | |
| direction = direction.normalized() | |
| var angle = direction.angle() | |
| var cos_angle = rad2deg(cos(angle)) | |
| var sin_angle = rad2deg(sin(angle)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extends Spatial | |
| signal tapped(card) | |
| signal released(card) | |
| var is_tapped = false setget set_is_tapped | |
| var should_process_touch = true | |
| func set_is_tapped(value): | |
| is_tapped = value |
NewerOlder