Skip to content

Commit

Permalink
Auto-Format GDScript
Browse files Browse the repository at this point in the history
  • Loading branch information
captaincolonelfox authored and github-actions[bot] committed Dec 31, 2022
1 parent 204d50c commit 052f3f0
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions scripts/AngryRandal.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

extends "res://scripts/GassyRandal.gd"

export var health : int = 2
export var health: int = 2
export var moveDuration = 1.25
export var waitTimeBetweenSwoops = 1.5
export var damage_flash_interval := 0.15
export var damage_flash_amount : int = 6
export var damage_flash_amount: int = 6

var time = 0
var swooping := false
Expand Down Expand Up @@ -38,16 +38,19 @@ func _on_SwoopTimer_timeout() -> void:


func initSwoopTargetLocations() -> void:
var player : Node2D = get_tree().get_nodes_in_group("Player")[0]
var player: Node2D = get_tree().get_nodes_in_group("Player")[0]

var upperLeftPoint = Vector2(position.x, position.y)
var bottomMiddlePoint = player.position
var upperRightPoint = (bottomMiddlePoint - upperLeftPoint).reflect(Vector2.RIGHT) + bottomMiddlePoint
var upperRightPoint = (
(bottomMiddlePoint - upperLeftPoint).reflect(Vector2.RIGHT)
+ bottomMiddlePoint
)

swoopFrom = [upperLeftPoint, bottomMiddlePoint, upperRightPoint, bottomMiddlePoint]
swoopTo = [bottomMiddlePoint, upperRightPoint, bottomMiddlePoint, upperLeftPoint]


func kill(killer: Object, damage: int = 1) -> void:
_damage(damage, killer)

Expand Down Expand Up @@ -97,4 +100,3 @@ func _on_DamageFlashTimer_timeout():
else:
$RandalCloud.visible = true
$BigRandalCloud.visible = true

1 comment on commit 052f3f0

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.