mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-22 07:28:14 +00:00
Compare commits
2 Commits
65718342c6
...
50da5f62f3
Author | SHA1 | Date | |
---|---|---|---|
![]() |
50da5f62f3 | ||
![]() |
b87d6e6a7c |
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=41 format=3 uid="uid://duptcik2j0b04"]
|
||||
[gd_scene load_steps=40 format=3 uid="uid://duptcik2j0b04"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://d3sxabber73q6" path="res://Assets/Sprites/Enemies/Bowser.png" id="1_8mi7o"]
|
||||
[ext_resource type="Script" uid="uid://wtypg4d0l6j2" path="res://Scripts/Classes/Entities/Enemies/Bowser.gd" id="1_ma5fd"]
|
||||
@@ -11,7 +11,6 @@
|
||||
[ext_resource type="JSON" path="res://Assets/Sprites/Enemies/Bowser.json" id="6_nf6hu"]
|
||||
[ext_resource type="Script" uid="uid://cmvlgsjmsk0v5" path="res://Scripts/Classes/Resources/ThemedResource.gd" id="6_pvhfi"]
|
||||
[ext_resource type="Script" uid="uid://c3gg32ivrlq8n" path="res://Scripts/Classes/Components/GibSpawner.gd" id="6_va0n6"]
|
||||
[ext_resource type="JSON" path="res://Assets/Sprites/Enemies/Goomba.json" id="9_exf4b"]
|
||||
[ext_resource type="Script" uid="uid://5octqlf4ohel" path="res://Scripts/Classes/Components/ScoreNoteSpawner.gd" id="11_pvhfi"]
|
||||
[ext_resource type="Script" uid="uid://cqif1li7otvpl" path="res://Scripts/Parts/SpriteFramesToJsonConverter.gd" id="14_nf6hu"]
|
||||
[ext_resource type="Script" uid="uid://ctfbuoxtnnl0q" path="res://Scripts/Classes/Components/EditorPropertyExposer.gd" id="15_nf6hu"]
|
||||
@@ -300,7 +299,7 @@ metadata/_custom_type_script = "uid://caq1qiwmy0mox"
|
||||
script = ExtResource("5_17x2r")
|
||||
node_to_affect = NodePath("..")
|
||||
property_name = "sprite_frames"
|
||||
resource_json = ExtResource("9_exf4b")
|
||||
resource_json = ExtResource("6_nf6hu")
|
||||
use_cache = false
|
||||
metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
|
||||
|
||||
@@ -344,6 +343,7 @@ metadata/_custom_type_script = "uid://dri2d5jtu0fbq"
|
||||
[node name="GibSpawner" type="Node" parent="." node_paths=PackedStringArray("visuals")]
|
||||
script = ExtResource("6_va0n6")
|
||||
visuals = NodePath("../SpriteScaleJoint/DeathSprite")
|
||||
gib_type = 1
|
||||
metadata/_custom_type_script = "uid://c3gg32ivrlq8n"
|
||||
|
||||
[node name="ScoreNoteSpawner" type="Node" parent="."]
|
||||
@@ -403,13 +403,14 @@ hitbox = NodePath("../SpriteScaleJoint/Sprite/Hitbox")
|
||||
metadata/_custom_type_script = "uid://ba18grqjixded"
|
||||
|
||||
[connection signal="killed" from="." to="GibSpawner" method="summon_gib"]
|
||||
[connection signal="killed" from="." to="." method="show_smoke" unbinds=1]
|
||||
[connection signal="killed" from="." to="ScoreNoteSpawner" method="spawn_note" binds= [5000]]
|
||||
[connection signal="killed" from="." to="." method="show_smoke" unbinds=1]
|
||||
[connection signal="area_entered" from="SpriteScaleJoint/Sprite/Hitbox" to="." method="on_area_entered"]
|
||||
[connection signal="timeout" from="JumpTimer" to="." method="jump"]
|
||||
[connection signal="timeout" from="HammerTime" to="." method="throw_hammers"]
|
||||
[connection signal="timeout" from="FlameTimer" to="." method="breathe_fire"]
|
||||
[connection signal="fireball_hit" from="FireballDetection" to="." method="fireball_hit" unbinds=1]
|
||||
[connection signal="gib_about_to_spawn" from="GibSpawner" to="." method="on_gib_about_to_spawn"]
|
||||
[connection signal="screen_entered" from="VisibleOnScreenEnabler2D" to="." method="play_music" flags=6]
|
||||
[connection signal="attached" from="TrackJoint" to="MoveAnimation" method="play" binds= ["RESET"]]
|
||||
[connection signal="moving_shell_entered" from="ShellDetection" to="ShellDetection" method="destroy_shell"]
|
||||
|
@@ -11,3 +11,6 @@ resource_json = ExtResource("2_qcxx5")
|
||||
|
||||
[node name="ResourceSetterNew" parent="SpriteScaleJoint/DeathSprite" index="0"]
|
||||
resource_json = ExtResource("2_qcxx5")
|
||||
|
||||
[node name="GibSpawner" parent="." index="8" node_paths=PackedStringArray("visuals")]
|
||||
visuals = NodePath("../SpriteScaleJoint/DeathSprite")
|
||||
|
@@ -5,7 +5,7 @@
|
||||
|
||||
[node name="TrueBowser" instance=ExtResource("1_xtf8a")]
|
||||
can_hammer = true
|
||||
metadata/is_real = true
|
||||
is_real = true
|
||||
|
||||
[node name="ResourceSetterNew" parent="SpriteScaleJoint/DeathSprite" index="0"]
|
||||
resource_json = ExtResource("4_ryqkh")
|
||||
|
@@ -50,15 +50,12 @@ func get_target_y(player: Player) -> float:
|
||||
return player.global_position.y - 8
|
||||
|
||||
func show_smoke() -> void:
|
||||
# guzlad: ugly but it'll have to do until we move the metadata stuff to actual variables
|
||||
if (((Global.current_game_mode == Global.GameMode.CUSTOM_LEVEL) or (Global.current_game_mode == Global.GameMode.LEVEL_EDITOR)) and !is_real):
|
||||
var smoke = preload("res://Scenes/Prefabs/Particles/SmokeParticle.tscn").instantiate()
|
||||
smoke.scale = Vector2(2, 2)
|
||||
smoke.global_position =global_position
|
||||
AudioManager.play_sfx("magic", global_position)
|
||||
add_sibling(smoke)
|
||||
elif has_meta("is_real"):
|
||||
return
|
||||
if is_real: return
|
||||
var smoke = preload("res://Scenes/Prefabs/Particles/SmokeParticle.tscn").instantiate()
|
||||
smoke.scale = Vector2(2, 2)
|
||||
smoke.global_position =global_position
|
||||
AudioManager.play_sfx("magic", global_position)
|
||||
add_sibling(smoke)
|
||||
|
||||
func breathe_fire() -> void:
|
||||
if can_fire == false:
|
||||
@@ -133,7 +130,8 @@ func fireball_hit() -> void:
|
||||
func play_music() -> void:
|
||||
for i: EntityGenerator in get_tree().get_nodes_in_group("EntityGenerators"):
|
||||
if i.entity_scene != null:
|
||||
if i.entity_scene.resource_path == "res://Scenes/Prefabs/Entities/Enemies/BowserFlame.tscn":
|
||||
if i.entity_scene.resource_path == "res://Scenes/
|
||||
Prefabs/Entities/Enemies/BowserFlame.tscn":
|
||||
i.queue_free()
|
||||
if Settings.file.audio.extra_bgm == 0: return
|
||||
if Global.level_editor != null:
|
||||
@@ -141,6 +139,14 @@ func play_music() -> void:
|
||||
if music_enabled:
|
||||
AudioManager.set_music_override(AudioManager.MUSIC_OVERRIDES.BOWSER, 5, false)
|
||||
|
||||
|
||||
func on_timeout() -> void:
|
||||
move_dir = [-1, 1].pick_random()
|
||||
|
||||
func on_gib_about_to_spawn() -> void:
|
||||
if is_real:
|
||||
$FallSFX.play()
|
||||
$FallSFX.finished.connect($FallSFX.queue_free)
|
||||
$FallSFX.reparent(get_parent())
|
||||
# guzlad: ugly but it'll have to do until we move the metadata stuff to actual variables
|
||||
if ((Global.current_game_mode == Global.GameMode.CUSTOM_LEVEL) or (Global.current_game_mode == Global.GameMode.LEVEL_EDITOR)) and !is_real:
|
||||
$SpriteScaleJoint/DeathSprite/ResourceSetterNew.resource_json = load("res://Assets/Sprites/Enemies/Goomba.json")
|
||||
|
@@ -216,7 +216,9 @@ func _ready() -> void:
|
||||
character = CHARACTERS[int(Global.player_characters[player_id])]
|
||||
Global.can_time_tick = true
|
||||
if [Global.GameMode.BOO_RACE, Global.GameMode.MARATHON, Global.GameMode.MARATHON_PRACTICE].has(Global.current_game_mode) == false:
|
||||
apply_character_physics()
|
||||
apply_character_physics(true)
|
||||
else:
|
||||
apply_character_physics(false)
|
||||
apply_character_sfx_map()
|
||||
Global.level_theme_changed.connect(apply_character_sfx_map)
|
||||
Global.level_theme_changed.connect(apply_character_physics)
|
||||
@@ -232,22 +234,24 @@ func _ready() -> void:
|
||||
if Global.level_editor == null:
|
||||
recenter_camera()
|
||||
|
||||
func apply_character_physics() -> void:
|
||||
func apply_character_physics(apply: bool) -> void:
|
||||
var path = "res://Assets/Sprites/Players/" + character + "/CharacterInfo.json"
|
||||
if int(Global.player_characters[player_id]) > 3:
|
||||
path = path.replace("res://Assets/Sprites/Players", Global.config_path.path_join("custom_characters/"))
|
||||
path = ResourceSetter.get_pure_resource_path(path)
|
||||
var json = JSON.parse_string(FileAccess.open(path, FileAccess.READ).get_as_text())
|
||||
for i in json.physics:
|
||||
set(i, json.physics[i])
|
||||
|
||||
if apply:
|
||||
for i in json.physics:
|
||||
set(i, json.physics[i])
|
||||
|
||||
for i in get_tree().get_nodes_in_group("SmallCollisions"):
|
||||
var hitbox_scale = json.get("small_hitbox_scale", [1, 1])
|
||||
i.hitbox = Vector3(hitbox_scale[0], hitbox_scale[1] if i.get_meta("scalable", true) else 1, json.get("small_crouch_scale", 0.75))
|
||||
var hitbox_scale = json.get("small_hitbox_scale", [1, 1]) if apply else [1, 1]
|
||||
i.hitbox = Vector3(hitbox_scale[0], hitbox_scale[1] if i.get_meta("scalable", true) else 1, json.get("small_crouch_scale", 0.75) if apply else 0.5)
|
||||
i._physics_process(0)
|
||||
for i in get_tree().get_nodes_in_group("BigCollisions"):
|
||||
var hitbox_scale = json.get("big_hitbox_scale", [1, 1])
|
||||
i.hitbox = Vector3(hitbox_scale[0], hitbox_scale[1] if i.get_meta("scalable", true) else 1, json.get("big_crouch_scale", 0.5))
|
||||
var hitbox_scale = json.get("big_hitbox_scale", [1, 1]) if apply else [1, 1]
|
||||
i.hitbox = Vector3(hitbox_scale[0], hitbox_scale[1] if i.get_meta("scalable", true) else 1, json.get("big_crouch_scale", 0.5) if apply else 0.5)
|
||||
i._physics_process(0)
|
||||
|
||||
func apply_classic_physics() -> void:
|
||||
|
Reference in New Issue
Block a user