mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-22 15:38:14 +00:00
added the game
This commit is contained in:
16
Scripts/Parts/MoonGravity.gd
Normal file
16
Scripts/Parts/MoonGravity.gd
Normal file
@@ -0,0 +1,16 @@
|
||||
class_name MoonGravity
|
||||
extends Node
|
||||
|
||||
|
||||
@export var new_gravity := 5
|
||||
const OLD_GRAVITY := 10
|
||||
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
Global.entity_gravity = new_gravity
|
||||
for i: Player in get_tree().get_nodes_in_group("Players"):
|
||||
i.low_gravity = true
|
||||
|
||||
func _exit_tree() -> void:
|
||||
Global.entity_gravity = OLD_GRAVITY
|
Reference in New Issue
Block a user