From 1cf3e46e164bfd64aef1afa13b90dd7f08cde48c Mon Sep 17 00:00:00 2001 From: Daniel-Cortez Date: Sun, 2 Feb 2025 02:00:49 +0700 Subject: [PATCH] Spelling fixes in comments --- Scripts/Boss/RobotnikTemplate.gd | 2 +- Scripts/Enemies/MotoBug.gd | 2 +- Scripts/Gimmicks/Bridge.gd | 2 +- Scripts/Gimmicks/CNZBarrel.gd | 4 ++-- Scripts/Gimmicks/Fan.gd | 2 +- Scripts/Gimmicks/Hanger.gd | 2 +- Scripts/Gimmicks/HorizontalBar.gd | 6 +++--- Scripts/Gimmicks/ScrewPlatform.gd | 2 +- Scripts/Gimmicks/SpinningBarrel.gd | 2 +- Scripts/Gimmicks/Teleporter.gd | 2 +- Scripts/Gimmicks/VerticalBar.gd | 2 +- Scripts/Gimmicks/VerticalPylon.gd | 2 +- Scripts/Gimmicks/WaterBar.gd | 4 ++-- Scripts/Gimmicks/WindCurrent.gd | 2 +- Scripts/Gimmicks/ZoomTubePath.gd | 2 +- Scripts/Global/ControlerMenu.gd | 2 +- Scripts/Global/Global.gd | 8 ++++---- Scripts/Global/Main.gd | 6 +++--- Scripts/Level/CharacterSelect.gd | 2 +- Scripts/Level/Level.gd | 2 +- Scripts/Misc/Animal.gd | 4 ++-- Scripts/Misc/ControlBind.gd | 2 +- Scripts/Misc/HUD.gd | 6 +++--- Scripts/Misc/PauseManager.gd | 6 +++--- Scripts/Objects/Checkpoint.gd | 2 +- Scripts/Objects/CollapsePlatform.gd | 2 +- Scripts/Objects/ForceAngleSides.gd | 2 +- Scripts/Objects/Lava.gd | 2 +- Scripts/Objects/PhysicsObject.gd | 18 +++++++++--------- Scripts/Objects/Ring.gd | 2 +- Scripts/Objects/SpecialStageRing.gd | 2 +- Scripts/Objects/StateMovers/StateMover.gd | 2 +- Scripts/Objects/SwingingPlatform.gd | 4 ++-- Scripts/Player/Player.gd | 6 +++--- Scripts/Player/ShieldAnimations.gd | 2 +- Scripts/Player/States/Air.gd | 2 +- Scripts/Player/States/CorkScrew.gd | 2 +- Scripts/Player/States/Glide.gd | 4 ++-- Scripts/Player/States/Normal.gd | 6 +++--- 39 files changed, 67 insertions(+), 67 deletions(-) diff --git a/Scripts/Boss/RobotnikTemplate.gd b/Scripts/Boss/RobotnikTemplate.gd index af2b1f5f..a5262d16 100644 --- a/Scripts/Boss/RobotnikTemplate.gd +++ b/Scripts/Boss/RobotnikTemplate.gd @@ -164,5 +164,5 @@ func _on_SmokeTimer_timeout(): expl.z_index = 10 # add object get_parent().add_child(expl) - # set position reletive to us + # set position relative to us expl.global_position = global_position+Vector2(randf_range(-32,32),randf_range(-32,32)) diff --git a/Scripts/Enemies/MotoBug.gd b/Scripts/Enemies/MotoBug.gd index 13a9f7a4..4ffb68d5 100644 --- a/Scripts/Enemies/MotoBug.gd +++ b/Scripts/Enemies/MotoBug.gd @@ -13,7 +13,7 @@ func _ready(): direction = -sign(scale.x) func _physics_process(delta): - # Dirction checks + # Direction checks $Motobug.scale.x = abs($Motobug.scale.x)*-direction $FloorCheck.position.x = abs($FloorCheck.position.x)*direction $FloorCheck.force_raycast_update() diff --git a/Scripts/Gimmicks/Bridge.gd b/Scripts/Gimmicks/Bridge.gd index 24807b5c..4cde72c0 100644 --- a/Scripts/Gimmicks/Bridge.gd +++ b/Scripts/Gimmicks/Bridge.gd @@ -46,7 +46,7 @@ func _physics_process(delta): playerTouch = true if (playerTouch): - # set buffer for colissions + # set buffer for collisions buffer = 1 var averagePlayerOffset = 0 for i in player: diff --git a/Scripts/Gimmicks/CNZBarrel.gd b/Scripts/Gimmicks/CNZBarrel.gd index 3a889208..ddd1b80c 100644 --- a/Scripts/Gimmicks/CNZBarrel.gd +++ b/Scripts/Gimmicks/CNZBarrel.gd @@ -87,7 +87,7 @@ var spinning_period = 128.0 / 60.0 # impartFactor determines how much the motion of the platform impacts the player when they jump off @export var impartFactor = 0.8 -# Calcuated based on max velocity, load energy is the amount of energy at which the Loaded constants have full influence +# Calculated based on max velocity, load energy is the amount of energy at which the Loaded constants have full influence var loadEnergy # Were one or more players holding up on the last pass through process @@ -183,7 +183,7 @@ func _process(delta): for index in range(players.size() - 1, -1, -1): # Determine inputs, once it's available change player animations # Note that we only care if one player is holding a direction even if they - # are fighting eachother and only the direction of current travel matters. + # are fighting each other and only the direction of current travel matters. var player = get_player(index) var playerHeldUp = false var playerHeldDown = false diff --git a/Scripts/Gimmicks/Fan.gd b/Scripts/Gimmicks/Fan.gd index f7b00e9b..be350044 100644 --- a/Scripts/Gimmicks/Fan.gd +++ b/Scripts/Gimmicks/Fan.gd @@ -60,7 +60,7 @@ func _physics_process(delta): # causing a warning. Perhaps intended for multi-directional fans being added later? #var getDir = Vector2.UP.rotated(global_rotation) - # disconect floor + # disconnect floor if i.ground: i.disconect_from_floor() diff --git a/Scripts/Gimmicks/Hanger.gd b/Scripts/Gimmicks/Hanger.gd index 27ad5e53..db5e9a8b 100644 --- a/Scripts/Gimmicks/Hanger.gd +++ b/Scripts/Gimmicks/Hanger.gd @@ -42,7 +42,7 @@ const _CONTACT_TIME_LIMIT = ceil(12.0 * (1000.0 / 60.0)) # at making contact. @export var setCenter = false -# If false, the player can grab the bar while moving upwards. Otherise the bar +# If false, the player can grab the bar while moving upwards. Otherwise the bar # is only caught while the player is falling. @export var onlyActiveMovingDown = true diff --git a/Scripts/Gimmicks/HorizontalBar.gd b/Scripts/Gimmicks/HorizontalBar.gd index c4b80ec7..a1f52fed 100644 --- a/Scripts/Gimmicks/HorizontalBar.gd +++ b/Scripts/Gimmicks/HorizontalBar.gd @@ -96,7 +96,7 @@ var playersEntryVel = [] # If player enters with low absolute velocity, enter shimmy mode (unless turned off) -# If player enters from below with high enough volocity, enter launch up mode +# If player enters from below with high enough velocity, enter launch up mode # If player enters from above with high enough velocity, enter launch down mode enum PLAYER_MODE {MONITORING, SHIMMY, LAUNCH_UP, LAUNCH_DOWN} @@ -193,7 +193,7 @@ func _process_player_shimmy_animation(player): player.animator.play("hangShimmy", -1, shimmySpeed / 60.0, false) func _process_player_launch_up(player, playerIndex): - # If brakes are allowed, we want to allow slamming the breaks a little faster than the upwarda nimation normally plas out. + # If brakes are allowed, we want to allow slamming the breaks a little faster than the upward animation normally plays out. if (player.animator.get_current_animation_position() >= player.animator.get_current_animation_length() * 0.91)\ and (player.get_y_input() > 0) and (allowBrake): playersMode[playerIndex] = PLAYER_MODE.SHIMMY @@ -226,7 +226,7 @@ func _process_player_launch_up(player, playerIndex): remove_player(player) func _process_player_launch_down(player, playerIndex): - # If brakes are allowed, we want to allow slamming the breaks a little faster than the upwarda nimation normally plas out. + # If brakes are allowed, we want to allow slamming the breaks a little faster than the upward animation normally plays out. if (player.animator.get_current_animation_position() >= player.animator.get_current_animation_length() * 0.91)\ and (player.get_y_input() < 0) and (allowBrake): playersMode[playerIndex] = PLAYER_MODE.SHIMMY diff --git a/Scripts/Gimmicks/ScrewPlatform.gd b/Scripts/Gimmicks/ScrewPlatform.gd index bd580c08..b65cd183 100644 --- a/Scripts/Gimmicks/ScrewPlatform.gd +++ b/Scripts/Gimmicks/ScrewPlatform.gd @@ -56,7 +56,7 @@ func _physics_process(delta): else: activePlayers.erase(i) - # increase move offset by how fast hte player is moving + # increase move offset by how fast the player is moving moveOffset += -goDirection if $Screw.position.y > bottom*8: diff --git a/Scripts/Gimmicks/SpinningBarrel.gd b/Scripts/Gimmicks/SpinningBarrel.gd index b94ef0a4..fa75f423 100644 --- a/Scripts/Gimmicks/SpinningBarrel.gd +++ b/Scripts/Gimmicks/SpinningBarrel.gd @@ -1,6 +1,6 @@ extends CharacterBody2D -# Depricated, to be removed, use at own risk +# Deprecated, to be removed, use at own risk var playerList = [] var playerOffset = [0] diff --git a/Scripts/Gimmicks/Teleporter.gd b/Scripts/Gimmicks/Teleporter.gd index 714422bf..26b7e60c 100644 --- a/Scripts/Gimmicks/Teleporter.gd +++ b/Scripts/Gimmicks/Teleporter.gd @@ -29,7 +29,7 @@ func _physics_process(delta): if animator.current_animation == "Beam": if animator.current_animation_position > 1.0: Global.players[0].animator.play("roll") - # shift x and y poses seperately so that the movement's not normalized + # shift x and y poses separately so that the movement's not normalized Global.players[0].global_position.x = move_toward(Global.players[0].global_position.x,global_position.x,delta*60) Global.players[0].global_position.y -= delta*30 # set physics object shift mode to allowTranslate diff --git a/Scripts/Gimmicks/VerticalBar.gd b/Scripts/Gimmicks/VerticalBar.gd index ef3df33a..0a867f8c 100644 --- a/Scripts/Gimmicks/VerticalBar.gd +++ b/Scripts/Gimmicks/VerticalBar.gd @@ -30,7 +30,7 @@ enum {CONSTANT, MULTIPLY} var players = [] # Tracks the players that are active within the gimmick var players_speed = [] # Tracks the player's speed on entering the loop (used for multiply mode) -var players_cur_loops = [] # Tracks how many loops the player has been throught eh animation +var players_cur_loops = [] # Tracks how many loops the player has been throughout the animation var players_pass_hit = [] # Tracks whether the player has hit the release point of the animation var pass_hit = false diff --git a/Scripts/Gimmicks/VerticalPylon.gd b/Scripts/Gimmicks/VerticalPylon.gd index 43f0486b..0b612b39 100644 --- a/Scripts/Gimmicks/VerticalPylon.gd +++ b/Scripts/Gimmicks/VerticalPylon.gd @@ -9,7 +9,7 @@ extends Node2D @export var vert_size = 96 ## How fast the player should be launched from the pylon when pressing jump @export var launch_speed = 960 -## How fast the player should be launching veritcally from the pylon after jumping +## How fast the player should be launching vertically from the pylon after jumping ## off @export var launch_vertical_speed = 110 ## How fast the player climbs up/down the pylon diff --git a/Scripts/Gimmicks/WaterBar.gd b/Scripts/Gimmicks/WaterBar.gd index 351f0d97..30646795 100644 --- a/Scripts/Gimmicks/WaterBar.gd +++ b/Scripts/Gimmicks/WaterBar.gd @@ -17,7 +17,7 @@ var breakPart = preload("res://Entities/Misc/falling_block_plat.tscn") # How many seconds before the bar breaks @export var strength = 3.0 -# Used for reseting the bar strength +# Used for resetting the bar strength @onready var startStrength = strength var players = [] # Tracks the players that are active within the gimmick @@ -89,7 +89,7 @@ func _physics_process(delta): # set the velocity part.velocity = Vector2(releaseDirection*(220-abs(remap(i,0,spriteSplits,-100,80))),remap(i,0,spriteSplits,-100,50)) queue_free() # delete - # reset strenght + # reset strength else: strength = startStrength diff --git a/Scripts/Gimmicks/WindCurrent.gd b/Scripts/Gimmicks/WindCurrent.gd index bcc319a3..ac8058b5 100644 --- a/Scripts/Gimmicks/WindCurrent.gd +++ b/Scripts/Gimmicks/WindCurrent.gd @@ -21,7 +21,7 @@ func _physics_process(_delta): # determine the direction of the arrow based on scale and rotation var getDir = Vector2.RIGHT.rotated(global_rotation) - # disconect floor + # disconnect floor if i.ground: i.disconect_from_floor() diff --git a/Scripts/Gimmicks/ZoomTubePath.gd b/Scripts/Gimmicks/ZoomTubePath.gd index e209195a..c908dc74 100644 --- a/Scripts/Gimmicks/ZoomTubePath.gd +++ b/Scripts/Gimmicks/ZoomTubePath.gd @@ -27,7 +27,7 @@ func _ready(): hitbox.set_shape(shape) enteranceArea.add_child(hitbox) - # create enterance area + # create entrance area add_child(enteranceArea) enteranceArea.collision_layer = 0 enteranceArea.collision_mask = 0 diff --git a/Scripts/Global/ControlerMenu.gd b/Scripts/Global/ControlerMenu.gd index 10b0d5ee..c2b031d7 100644 --- a/Scripts/Global/ControlerMenu.gd +++ b/Scripts/Global/ControlerMenu.gd @@ -118,7 +118,7 @@ func _on_SaveInputs_pressed(): file.set_value("controls","A"+str(actionCount)+i,j.axis) file.set_value("controls","V"+str(actionCount)+i,j.axis_value) file.set_value("controls","A"+str(actionCount)+i+"Device",j.device) - # incease counters (prevents conflicts) + # increase counters (prevents conflicts) actionCount += 1 # save config and close file.save("user://Config.cfg") diff --git a/Scripts/Global/Global.gd b/Scripts/Global/Global.gd index ddfcd94b..7fa4ab8a 100644 --- a/Scripts/Global/Global.gd +++ b/Scripts/Global/Global.gd @@ -16,11 +16,11 @@ var checkPointTime = 0 # the starting room, this is loaded on game resets, you may want to change this var startScene = preload("res://Scene/Presentation/Title.tscn") var nextZone = load("res://Scene/Zones/BaseZone.tscn") # change this to the first level in the game (also set in "reset_values") -# use this to store the current state of the room, changing scene will clear everythin +# use this to store the current state of the room, changing scene will clear everything var stageInstanceMemory = null var stageLoadMemory = null -# score instace for add_score() +# score instance for add_score() var Score = preload("res://Entities/Misc/Score.tscn") # order for score combo const SCORE_COMBO = [1,2,3,4,4,4,4,4,4,4,4,4,4,4,4,5] @@ -54,7 +54,7 @@ var soundChannel = AudioStreamPlayer.new() var score = 0 var lives = 3 var continues = 0 -# emeralds use bitwise flag operations, the equivelent for 7 emeralds would be 128 +# emeralds use bitwise flag operations, the equivalent for 7 emeralds would be 128 var emeralds = 0 # emerald bit flags enum EMERALD {RED = 1, BLUE = 2, GREEN = 4, YELLOW = 8, CYAN = 16, SILVER = 32, PURPLE = 64} @@ -82,7 +82,7 @@ var hardBorderBottom = 100000000 # Animal spawn type reference, see the level script for more information on the types var animals = [0,1] -# emited when a stage gets started +# emitted when a stage gets started signal stage_started # Level memory diff --git a/Scripts/Global/Main.gd b/Scripts/Global/Main.gd index 4f431b06..a2a75cd1 100644 --- a/Scripts/Global/Main.gd +++ b/Scripts/Global/Main.gd @@ -4,7 +4,7 @@ extends Node2D # last scene is used for referencing the current scene (this is used for stage restarting) var lastScene = null -# this gets emited when the scene fades, used to load in level details and data to hide it from the player +# this gets emitted when the scene fades, used to load in level details and data to hide it from the player signal scene_faded # signal that emits when volume fades signal volume_set @@ -15,7 +15,7 @@ var setVolumeLevel = 0 # where to fade the volume to var volumeLerp = 0 # current stage between start and set for volume level var volumeFadeSpeed = 1 # speed for volume changing -# was paused enables menu control when the player pauses manually so they don't get stuck (get_tree().paused may want to be used by other intances) +# was paused enables menu control when the player pauses manually so they don't get stuck (get_tree().paused may want to be used by other instances) var wasPaused = false # determines if the current scene can pause var sceneCanPause = false @@ -192,7 +192,7 @@ func _on_Life_finished(): # set the volume level func set_volume(volume = 0, fadeSpeed = 1): - # set the start volume level to the curren volume + # set the start volume level to the current volume startVolumeLevel = Global.music.volume_db # set the volume level to go to setVolumeLevel = volume diff --git a/Scripts/Level/CharacterSelect.gd b/Scripts/Level/CharacterSelect.gd index f9cf85c6..f7937632 100644 --- a/Scripts/Level/CharacterSelect.gd +++ b/Scripts/Level/CharacterSelect.gd @@ -85,7 +85,7 @@ func _input(event): # set the level match(levelID): 0: # Base Zone Act 1 - Global.nextZone = load("res://Scene/Zones/BaseZone.tscn") # unnecessary since it's arleady set + Global.nextZone = load("res://Scene/Zones/BaseZone.tscn") # unnecessary since it's already set 1: # Base Zone Act 2 Global.nextZone = load("res://Scene/Zones/BaseZoneAct2.tscn") # Replace me! I don't exist yet! #2: # Chunk Zone Act 1 diff --git a/Scripts/Level/Level.gd b/Scripts/Level/Level.gd index 43b152f6..2f025d13 100644 --- a/Scripts/Level/Level.gd +++ b/Scripts/Level/Level.gd @@ -21,7 +21,7 @@ extends Node2D var wasLoaded = false func _ready(): - # debuging + # debugging if !Global.is_main_loaded: return false # skip if scene was loaded diff --git a/Scripts/Misc/Animal.gd b/Scripts/Misc/Animal.gd index 89838699..9556aae9 100644 --- a/Scripts/Misc/Animal.gd +++ b/Scripts/Misc/Animal.gd @@ -83,7 +83,7 @@ func _physics_process(delta): # gravity velocity.y += gravity*60 - # move, ignore collission since we're only checking floors + # move, ignore collision since we're only checking floors translate(velocity*delta) # if on floor and falling then bounce @@ -119,6 +119,6 @@ func _process(delta): func _on_VisibilityNotifier2D_screen_exited(): queue_free() -# set active on time out (some spawning scenerios like a capsule sets a delay) +# set active on time out (some spawning scenarios like a capsule sets a delay) func _on_ActivationTimer_timeout(): active = true diff --git a/Scripts/Misc/ControlBind.gd b/Scripts/Misc/ControlBind.gd index 184631d0..018b2d49 100644 --- a/Scripts/Misc/ControlBind.gd +++ b/Scripts/Misc/ControlBind.gd @@ -10,7 +10,7 @@ func _ready(): control = get_parent().get_parent() var _con = connect("pressed",Callable(self,"lock_in_button")) -# input remaping +# input remapping func _unhandled_input(event): # check if active if active: diff --git a/Scripts/Misc/HUD.gd b/Scripts/Misc/HUD.gd index 67a1ecda..dfed2356 100644 --- a/Scripts/Misc/HUD.gd +++ b/Scripts/Misc/HUD.gd @@ -31,7 +31,7 @@ var gameOver = false # used for the score countdown var accumulatedDelta = 0.0 -# signal that gets emited once the stage tally is over +# signal that gets emitted once the stage tally is over signal tally_clear # character name strings, used for "[player] has cleared", this matches the players character ID so you'll want to add the characters name in here matching the ID if you want more characters @@ -115,7 +115,7 @@ func _process(delta): var hud_time_hundredths:int = int(hud_time * 100) % 100 timeText.text = "%2d'%02d\"%02d" % [hud_time_minutes,hud_time_seconds,hud_time_hundredths] - # cehck that there's player, if there is then track the focus players ring count + # check that there's player, if there is then track the focus players ring count if (Global.players.size() > 0): ringText.text = "%3d" % Global.players[focusPlayer].rings @@ -124,7 +124,7 @@ func _process(delta): # Water Overlay - # cehck that this level has water + # check that this level has water if Global.waterLevel != null: # get current camera var cam = GlobalFunctions.getCurrentCamera2D() diff --git a/Scripts/Misc/PauseManager.gd b/Scripts/Misc/PauseManager.gd index c9794ccd..125d8e15 100644 --- a/Scripts/Misc/PauseManager.gd +++ b/Scripts/Misc/PauseManager.gd @@ -73,7 +73,7 @@ func _input(event): match(option): # Options 0: # continue if Global.main.wasPaused: - # give frame so game doesn't immedaitely unpause + # give frame so game doesn't immediately unpause await get_tree().process_frame Global.main.wasPaused = false get_tree().paused = false @@ -145,7 +145,7 @@ func do_lateral_input(): elif inputCue.x != 0 and menu == MENUS.OPTIONS: var inputDir = inputCue.x - # set audio busses + # set audio buses var getBus = "SFX" if option > 0: getBus = "Music" @@ -171,7 +171,7 @@ func do_lateral_input(): lastInput = inputCue func choose_option(optionSet = option+1, playSound = true): - # reset curren option colour to white + # reset current option colour to white $PauseMenu/VBoxContainer.get_child(option+1).modulate = Color.WHITE # change to new option, set the new option colour to yellow option = wrapi(optionSet,0,menusText[menu].size()-1) diff --git a/Scripts/Objects/Checkpoint.gd b/Scripts/Objects/Checkpoint.gd index 1dcf9e67..5c042a09 100644 --- a/Scripts/Objects/Checkpoint.gd +++ b/Scripts/Objects/Checkpoint.gd @@ -14,7 +14,7 @@ func _ready(): func activate(): - # queue flash, incase an animation is already playing + # queue flash, in case an animation is already playing $Spinner.queue("flash") active = true Global.currentCheckPoint = checkPointID diff --git a/Scripts/Objects/CollapsePlatform.gd b/Scripts/Objects/CollapsePlatform.gd index 77cd9350..f8239ca1 100644 --- a/Scripts/Objects/CollapsePlatform.gd +++ b/Scripts/Objects/CollapsePlatform.gd @@ -44,7 +44,7 @@ func _ready(): func _physics_process(delta): # check if to activate if !active: - # if we can detect any players and they're on the flor, activate + # if we can detect any players and they're on the floor, activate for i in players: # do a active check to prevent the sound playing twice if i.ground and !active: diff --git a/Scripts/Objects/ForceAngleSides.gd b/Scripts/Objects/ForceAngleSides.gd index 31ecebb8..f5e1c3fe 100644 --- a/Scripts/Objects/ForceAngleSides.gd +++ b/Scripts/Objects/ForceAngleSides.gd @@ -31,7 +31,7 @@ func _physics_process(_delta): if rightAngle != null: i.angle = deg_to_rad(rightAngle) - # if greater then angle difference and distance from center is below drop off, disconect from floor + # if greater then angle difference and distance from center is below drop off, disconnect from floor if abs(i.angle-PrevAngle) >= deg_to_rad(maxAngleDifference) and abs(i.global_position.x-global_position.x) < dropOff: i.disconect_from_floor() else: diff --git a/Scripts/Objects/Lava.gd b/Scripts/Objects/Lava.gd index 5fe474a8..486324b7 100644 --- a/Scripts/Objects/Lava.gd +++ b/Scripts/Objects/Lava.gd @@ -37,7 +37,7 @@ func update_graphics(): # clamp size size.x = max(size.x,1) size.y = max(size.y,8) - # set the collission shape and graphics scaling + # set the collision shape and graphics scaling $Collision/CollisionShape2D.shape.size = Vector2(size.x-1,size.y-1) $LavaTile.region_rect.size = size $LavaTop.region_rect.size.x = size.x diff --git a/Scripts/Objects/PhysicsObject.gd b/Scripts/Objects/PhysicsObject.gd index fd7b84ce..29dadbd4 100644 --- a/Scripts/Objects/PhysicsObject.gd +++ b/Scripts/Objects/PhysicsObject.gd @@ -31,7 +31,7 @@ var moveStepLength = 8*60 # angle is the rotation based on the floor normal var angle = 0 var gravityAngle = 0 -# the collission layer, 0 for low, 1 for high +# the collision layer, 0 for low, 1 for high var collissionLayer = 0 # translate, (ignores physics) @@ -112,21 +112,21 @@ func update_sensors(): # check left var offset = 0 verticalObjectCheck.position.y = verticalSensorLeft.position.y - # give a bit of distance for collissions + # give a bit of distance for collisions verticalObjectCheck.target_position = Vector2(0,-(shape.y*0.25)+shape.y*-sign(verticalSensorLeft.target_position.y)) # check left sensor verticalObjectCheck.position.x = verticalSensorLeft.position.x verticalObjectCheck.force_raycast_update() if verticalObjectCheck.is_colliding(): - # calculate the offset using the collission point and the cast positions + # calculate the offset using the collision point and the cast positions offset = (verticalObjectCheck.get_collision_point()-(verticalObjectCheck.global_position+verticalObjectCheck.target_position)).y # check right sensor verticalObjectCheck.position.x = verticalSensorRight.position.x verticalObjectCheck.force_raycast_update() if verticalObjectCheck.is_colliding(): - # calculate the offset using the collission point and the cast positions, + # calculate the offset using the collision point and the cast positions, # compare it to the old offset, if it's larger then use new offset var newOffset = (verticalObjectCheck.get_collision_point()-(verticalObjectCheck.global_position+verticalObjectCheck.target_position)).y if abs(newOffset) > abs(offset): @@ -161,7 +161,7 @@ func update_sensors(): backSensor.global_rotation = rotationSnap slopeCheck.global_rotation = rotationSnap - # set collission mask values + # set collision mask values for i in sensorList: i.set_collision_mask_value(1,i.target_position.rotated(rotationSnap).y > 0) i.set_collision_mask_value(2,i.target_position.rotated(rotationSnap).x > 0) @@ -208,7 +208,7 @@ func _physics_process(delta): if test_move(global_transform,velocity*delta) and test_move(global_transform,velocity*(Vector2.RIGHT.rotated(gravityAngle))*delta) and !test_move(global_transform,Vector2.ZERO) and ground: var testTransform = global_transform testTransform.origin += up_direction*pixelObjectStep - # if there's no collision occuring in the upper section then set was moved to true (if there's isn't another collision up if shifted up) + # if there's no collision occurring in the upper section then set was moved to true (if there's isn't another collision up if shifted up) if !test_move(testTransform,velocity*delta): var col = move_and_collide(up_direction*pixelObjectStep) wasMovedUp = (col==null) @@ -262,7 +262,7 @@ func _physics_process(delta): if move_and_collide(rayHitVec-(normHitVec*($HitBox.shape.size.y/2))-Vector2(0,yGroundDiff).rotated(rotation),true,true,true): var _col = move_and_collide(rayHitVec-(normHitVec*($HitBox.shape.size.y/2))-Vector2(0,yGroundDiff).rotated(rotation)) else: - # Do a check that we're not in the middle of a rotation, otherwise the player can get caught on outter curves (more noticable on higher physics frame rates) + # Do a check that we're not in the middle of a rotation, otherwise the player can get caught on outer curves (more noticeable on higher physics frame rates) if snap_angle(angle) == snap_angle(rotation): position += (rayHitVec-(normHitVec*(($HitBox.shape.size.y/2)+0.25))-Vector2(0,yGroundDiff).rotated(rotation)) else: @@ -389,7 +389,7 @@ func get_nearest_vertical_sensor(): return verticalSensorLeft elif not verticalSensorLeft.is_colliding() and verticalSensorRight.is_colliding(): return verticalSensorRight - # if neither are colliding then return null (nothing), this way we can skip over collission checks + # if neither are colliding then return null (nothing), this way we can skip over collision checks elif not verticalSensorLeft.is_colliding() and not verticalSensorRight.is_colliding(): return null @@ -443,7 +443,7 @@ func check_for_ceiling(): ceilChecker.target_position.y = 0-verticalSensorLeft.target_position.y ceilChecker.force_raycast_update() - # Check is there's a collision + # Check if there's a collision if ceilChecker.is_colliding() or ceilChecker.is_colliding(): detection = true # Flag the new Rcast for clearance. diff --git a/Scripts/Objects/Ring.gd b/Scripts/Objects/Ring.gd index 9a9a6ad0..8c28a6ce 100644 --- a/Scripts/Objects/Ring.gd +++ b/Scripts/Objects/Ring.gd @@ -59,7 +59,7 @@ func _physics_process(delta): func _on_Hitbox_body_entered(body): if (player != body): # The check below exists to prevent potential undesirable behavior where a partner - # can immediatelly recollect all lost rings as soon as the leader is hurt. + # can immediately recollect all lost rings as soon as the leader is hurt. if (!scattered) or (scattered and lifetime < (3.3)): player = body diff --git a/Scripts/Objects/SpecialStageRing.gd b/Scripts/Objects/SpecialStageRing.gd index 5254f91b..9ed10665 100644 --- a/Scripts/Objects/SpecialStageRing.gd +++ b/Scripts/Objects/SpecialStageRing.gd @@ -106,7 +106,7 @@ func _on_Hitbox_body_entered(body): body.movement = Vector2.ZERO # set players state to animation so nothing takes them out of it body.set_state(body.STATES.ANIMATION) - # set player collision layer and mask to nothing to avoid collissions + # set player collision layer and mask to nothing to avoid collisions maskMemory.append(body.collision_layer) maskMemory.append(body.collision_mask) body.collision_layer = 0 diff --git a/Scripts/Objects/StateMovers/StateMover.gd b/Scripts/Objects/StateMovers/StateMover.gd index 2530f730..b0dbd8f4 100644 --- a/Scripts/Objects/StateMovers/StateMover.gd +++ b/Scripts/Objects/StateMovers/StateMover.gd @@ -7,7 +7,7 @@ var parent func _ready(): parent = get_parent() -# Override this function with the bahavior you want your state to perform when it is entered +# Override this function with the behavior you want your state to perform when it is entered func stateProcess(_delta): pass diff --git a/Scripts/Objects/SwingingPlatform.gd b/Scripts/Objects/SwingingPlatform.gd index a6b21da3..07caba22 100644 --- a/Scripts/Objects/SwingingPlatform.gd +++ b/Scripts/Objects/SwingingPlatform.gd @@ -6,10 +6,10 @@ extends Node2D # Change this and it probably breaks # Export Variables @export var chains:int = 8 # How many chains will be rendered # (int,0,100) @export var chain_size:int = 16 # The size of the chains (should be the same width and height, can be easily changed though if you want a different width and height) -@export var speed = 1.0 # Speed of the movement, but the heigher it is the slower it goes, and the lower it is (greater than 0) the faster it goes # (float,0,5) +@export var speed = 1.0 # Speed of the movement, but the higher it is the slower it goes, and the lower it is (greater than 0) the faster it goes # (float,0,5) @export var dir = 1 # The direction of the swing's movement # (int,-1,1) @export var rotate_amount = 90.0 # How far do you want the swings to rotate? # (float,1.0,180.0) -@export var plat_img:Texture2D # Texture2D for hte platform +@export var plat_img:Texture2D # Texture2D for the platform @export var chain_img:Texture2D # Texture2D for the chains # Declare time, previous position, editor time, and grab the platform's node var time = 0 diff --git a/Scripts/Player/Player.gd b/Scripts/Player/Player.gd index 9dc4646a..ba6d5d0f 100644 --- a/Scripts/Player/Player.gd +++ b/Scripts/Player/Player.gd @@ -67,7 +67,7 @@ var character = Global.CHARACTERS.SONIC # 8 Jump release velocity var physicsList = [ -# 0 Deafult Character properties +# 0 Default Character properties [0.046875, 0.5, 0.046875, 6*60, 0.09375, 0.046875*0.5, 0.125, 0.21875, 4], # 1 Shoes (remove *0.5 for original rolling friction) [0.09375, 0.5, 0.09375, 12*60, 0.1875, 0.046875*0.5, 0.125, 0.21875, 4], @@ -78,7 +78,7 @@ var physicsList = [ ] var waterPhysicsList = [ -# 0 Deafult Character properties +# 0 Default Character properties [0.046875/2.0, 0.5/2.0, 0.046875/2.0, 6.0*60.0/2.0, 0.09375/2.0, 0.046875*0.5, 0.125, 0.0625, 3.5*60, 2], # 1 Shoes [0.046875/2.0, 0.5/2.0, 0.046875/2.0, 6*60/2.0, 0.09375/2.0, 0.046875*0.5, 0.125, 0.0625, 3.5*60, 2], @@ -1374,7 +1374,7 @@ func action_move(delta): else: # reverse direction movement.x += dec/GlobalFunctions.div_by_delta(delta)*inputs[INPUTS.XINPUT] - # implament weird turning quirk + # implement weird turning quirk if (sign(movement.x) != sign(movement.x-dec/GlobalFunctions.div_by_delta(delta)*inputs[INPUTS.XINPUT])): movement.x = 0.5*60*sign(movement.x) else: diff --git a/Scripts/Player/ShieldAnimations.gd b/Scripts/Player/ShieldAnimations.gd index 85250c30..d13c5655 100644 --- a/Scripts/Player/ShieldAnimations.gd +++ b/Scripts/Player/ShieldAnimations.gd @@ -34,7 +34,7 @@ func _on_Shields_frame_changed(): else: z_index = 6 offset = Vector2.ZERO - # if frames greater then 5 or 13 and less then 10 and 18, flip horizontaly + # if frames greater then 5 or 13 and less then 10 and 18, flip horizontally if (frame >= 5 and frame < 10 or frame >= 13 and frame < 18): scale.x = -1 diff --git a/Scripts/Player/States/Air.gd b/Scripts/Player/States/Air.gd index e729ddda..228ac108 100644 --- a/Scripts/Player/States/Air.gd +++ b/Scripts/Player/States/Air.gd @@ -144,7 +144,7 @@ func _physics_process(delta): if parent.any_action_held_or_pressed() and parent.abilityUsed and (parent.shield <= parent.SHIELDS.NORMAL or parent.isSuper or $"../../InvincibilityBarrier".visible or parent.character == Global.CHARACTERS.AMY): if dropTimer < 1: - dropTimer += (delta/20)*60 # should be ready in the equivelent of 20 frames at 60FPS + dropTimer += (delta/20)*60 # should be ready in the equivalent of 20 frames at 60FPS if dropTimer >= 1: parent.sfx[20].play() else: diff --git a/Scripts/Player/States/CorkScrew.gd b/Scripts/Player/States/CorkScrew.gd index 663ad83a..1088e945 100644 --- a/Scripts/Player/States/CorkScrew.gd +++ b/Scripts/Player/States/CorkScrew.gd @@ -27,7 +27,7 @@ func _physics_process(delta): else: # reverse direction parent.movement.x += parent.dec/GlobalFunctions.div_by_delta(delta)*parent.inputs[parent.INPUTS.XINPUT] - # implament weird turning quirk + # implement weird turning quirk if (sign(parent.movement.x) != sign(parent.movement.x-parent.dec/GlobalFunctions.div_by_delta(delta)*parent.inputs[parent.INPUTS.XINPUT])): parent.movement.x = 0.5*60*sign(parent.movement.x) else: diff --git a/Scripts/Player/States/Glide.gd b/Scripts/Player/States/Glide.gd index d7481d96..628ea9a4 100644 --- a/Scripts/Player/States/Glide.gd +++ b/Scripts/Player/States/Glide.gd @@ -189,7 +189,7 @@ func _physics_process(delta): parent.set_hitbox(parent.currentHitbox.NORMAL) isFall = true else: - # ground buffer's needed to prevent the player immediately disconecting + # ground buffer's needed to prevent the player immediately disconnecting groundBuffer = 1 parent.movement.y = 0 @@ -211,7 +211,7 @@ func _physics_process(delta): landed = true # play land sound parent.sfx[27].play() - # set movement to nothign + # set movement to nothing parent.movement = Vector2.ZERO parent.animator.play("land") # wait for landing animation to finish and check that the state is still the same diff --git a/Scripts/Player/States/Normal.gd b/Scripts/Player/States/Normal.gd index 412bc13f..a33b6368 100644 --- a/Scripts/Player/States/Normal.gd +++ b/Scripts/Player/States/Normal.gd @@ -119,19 +119,19 @@ func _process(delta): match (parent.character): Global.CHARACTERS.TAILS: - if getR: # keep flipping until right sensor (relevent) isn't colliding + if getR: # keep flipping until right sensor (relevant) isn't colliding parent.direction = -parent.direction parent.animator.play("edge1") Global.CHARACTERS.KNUCKLES: - if getR: # keep flipping until right sensor (relevent) isn't colliding + if getR: # keep flipping until right sensor (relevant) isn't colliding parent.direction = -parent.direction if parent.animator.current_animation != "edge1" and parent.animator.current_animation != "edge2": parent.animator.play("edge1") parent.animator.queue("edge2") Global.CHARACTERS.AMY: - if getR: # keep flipping until right sensor (relevent) isn't colliding + if getR: # keep flipping until right sensor (relevant) isn't colliding parent.direction = -parent.direction #far edge if !getMEdge: