mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-22 23:48:11 +00:00
added the game
This commit is contained in:
9
Scripts/Parts/MinusWorldBlock.gd
Executable file
9
Scripts/Parts/MinusWorldBlock.gd
Executable file
@@ -0,0 +1,9 @@
|
||||
extends StaticBody2D
|
||||
|
||||
var valid := false
|
||||
|
||||
func _physics_process(_delta: float) -> void:
|
||||
var player = get_tree().get_first_node_in_group("Players")
|
||||
if player.is_on_floor() == false and not $Area2D.get_overlapping_areas().any(func(area: Area2D): return area.owner is Player):
|
||||
valid = (player.direction == -1 and player.crouching and player.power_state.hitbox_size == "Big")
|
||||
$CollisionShape2D.set_deferred("one_way_collision", valid)
|
Reference in New Issue
Block a user