mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-26 17:30:54 +00:00
couple improvements
This commit is contained in:
@@ -3,11 +3,6 @@ extends Block
|
||||
|
||||
var ticking_down := false
|
||||
|
||||
func _ready() -> void:
|
||||
if item == null: return
|
||||
if item_amount == 10 and item.resource_path == "res://Scenes/Prefabs/Entities/Items/SpinningCoin.tscn" and is_instance_valid(Global.level_editor) == false:
|
||||
Global.log_warning("Coin Brick Block is wrong! please report!: " + name)
|
||||
|
||||
func check_brick_empty() -> void:
|
||||
$PSwitcher.enabled = item == null
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class_name CustomLevel
|
||||
extends Level
|
||||
|
||||
var sublevel_id := 0
|
||||
@export var sublevel_id := 0
|
||||
|
||||
@@ -24,7 +24,8 @@ func explode() -> void:
|
||||
|
||||
func kick(object: Node2D) -> void:
|
||||
AudioManager.play_sfx("kick", global_position)
|
||||
object.kick_anim()
|
||||
if object is Player:
|
||||
object.kick_anim()
|
||||
var kick_dir = sign(global_position.x - object.global_position.x)
|
||||
velocity.x = 150 * kick_dir
|
||||
direction = kick_dir
|
||||
|
||||
@@ -235,6 +235,8 @@ func _ready() -> void:
|
||||
handle_invincible_palette()
|
||||
if [Global.GameMode.LEVEL_EDITOR, Global.GameMode.CUSTOM_LEVEL].has(Global.current_game_mode):
|
||||
recenter_camera()
|
||||
if Global.current_game_mode == Global.GameMode.CUSTOM_LEVEL:
|
||||
editor_level_start()
|
||||
|
||||
func apply_character_physics(apply: bool) -> void:
|
||||
var path = "res://Assets/Sprites/Players/" + character + "/CharacterInfo.json"
|
||||
|
||||
Reference in New Issue
Block a user