sed magic: fixeth the great 'boundry' misprint
This commit is contained in:
parent
342c333e61
commit
7020914046
7 changed files with 113 additions and 113 deletions
|
@ -55,8 +55,8 @@ tile_data = PoolIntArray( 851973, 0, 65537, 851976, 1, 0, 917512, 1, 0, 983048,
|
|||
|
||||
[node name="Boss1" parent="." instance=ExtResource( 1 )]
|
||||
position = Vector2( 168, 112 )
|
||||
left_up_boundry = 10.0
|
||||
right_down_boundry = 2.0
|
||||
left_up_boundary = 10.0
|
||||
right_down_boundary = 2.0
|
||||
|
||||
[node name="TurningPlatform" parent="." instance=ExtResource( 9 )]
|
||||
position = Vector2( 72, 144 )
|
||||
|
|
|
@ -201,95 +201,95 @@ label_offset = Vector2( 0, 10 )
|
|||
|
||||
[node name="Snail" parent="Enemies" instance=ExtResource( 7 )]
|
||||
position = Vector2( 168, 168 )
|
||||
left_up_boundry = 3.0
|
||||
right_down_boundry = 3.0
|
||||
left_up_boundary = 3.0
|
||||
right_down_boundary = 3.0
|
||||
|
||||
[node name="Snail3" parent="Enemies" instance=ExtResource( 7 )]
|
||||
position = Vector2( 312, 168 )
|
||||
right_down_boundry = 15.0
|
||||
right_down_boundary = 15.0
|
||||
slower_speed = 40
|
||||
faster_speed = 100
|
||||
|
||||
[node name="Snail4" parent="Enemies" instance=ExtResource( 7 )]
|
||||
position = Vector2( 696, 24 )
|
||||
left_up_boundry = 2.0
|
||||
right_down_boundry = 3.0
|
||||
left_up_boundary = 2.0
|
||||
right_down_boundary = 3.0
|
||||
slower_speed = 40
|
||||
faster_speed = 100
|
||||
|
||||
[node name="Snail6" parent="Enemies" instance=ExtResource( 7 )]
|
||||
position = Vector2( 568, 88 )
|
||||
left_up_boundry = 2.0
|
||||
right_down_boundry = 3.0
|
||||
left_up_boundary = 2.0
|
||||
right_down_boundary = 3.0
|
||||
slower_speed = 40
|
||||
faster_speed = 100
|
||||
|
||||
[node name="Snail8" parent="Enemies" instance=ExtResource( 7 )]
|
||||
position = Vector2( 704, 144 )
|
||||
left_up_boundry = 1.0
|
||||
right_down_boundry = 7.0
|
||||
left_up_boundary = 1.0
|
||||
right_down_boundary = 7.0
|
||||
slower_speed = 40
|
||||
faster_speed = 100
|
||||
|
||||
[node name="Snail10" parent="Enemies" instance=ExtResource( 7 )]
|
||||
position = Vector2( 648, 168 )
|
||||
left_up_boundry = 5.0
|
||||
right_down_boundry = 5.0
|
||||
left_up_boundary = 5.0
|
||||
right_down_boundary = 5.0
|
||||
slower_speed = 40
|
||||
faster_speed = 100
|
||||
|
||||
[node name="Snail2" parent="Enemies" instance=ExtResource( 7 )]
|
||||
position = Vector2( 64, 112 )
|
||||
left_up_boundry = 3.0
|
||||
right_down_boundry = 3.0
|
||||
left_up_boundary = 3.0
|
||||
right_down_boundary = 3.0
|
||||
faster_speed = 70
|
||||
|
||||
[node name="Bat" parent="Enemies" instance=ExtResource( 10 )]
|
||||
position = Vector2( 120, 96 )
|
||||
right_down_boundry = 10.0
|
||||
right_down_boundary = 10.0
|
||||
|
||||
[node name="Bat4" parent="Enemies" instance=ExtResource( 10 )]
|
||||
position = Vector2( 80, 16 )
|
||||
right_down_boundry = 7.0
|
||||
right_down_boundary = 7.0
|
||||
speed = 30
|
||||
|
||||
[node name="Bat6" parent="Enemies" instance=ExtResource( 10 )]
|
||||
position = Vector2( 368, 48 )
|
||||
left_up_boundry = 3.0
|
||||
right_down_boundry = 3.0
|
||||
left_up_boundary = 3.0
|
||||
right_down_boundary = 3.0
|
||||
speed = 60
|
||||
|
||||
[node name="Bat8" parent="Enemies" instance=ExtResource( 10 )]
|
||||
position = Vector2( 568, 40 )
|
||||
left_up_boundry = 4.0
|
||||
right_down_boundry = 3.0
|
||||
left_up_boundary = 4.0
|
||||
right_down_boundary = 3.0
|
||||
|
||||
[node name="Bat10" parent="Enemies" instance=ExtResource( 10 )]
|
||||
position = Vector2( 640, 80 )
|
||||
left_up_boundry = 5.0
|
||||
right_down_boundry = 3.0
|
||||
left_up_boundary = 5.0
|
||||
right_down_boundary = 3.0
|
||||
speed = 60
|
||||
|
||||
[node name="Bat9" parent="Enemies" instance=ExtResource( 10 )]
|
||||
position = Vector2( 688, 16 )
|
||||
left_up_boundry = 3.0
|
||||
right_down_boundry = 3.0
|
||||
left_up_boundary = 3.0
|
||||
right_down_boundary = 3.0
|
||||
|
||||
[node name="Bat12" parent="Enemies" instance=ExtResource( 10 )]
|
||||
position = Vector2( 720, 56 )
|
||||
left_up_boundry = 1.0
|
||||
right_down_boundry = 6.0
|
||||
left_up_boundary = 1.0
|
||||
right_down_boundary = 6.0
|
||||
|
||||
[node name="Bat7" parent="Enemies" instance=ExtResource( 10 )]
|
||||
position = Vector2( 376, 88 )
|
||||
left_up_boundry = 1.0
|
||||
right_down_boundry = 3.0
|
||||
left_up_boundary = 1.0
|
||||
right_down_boundary = 3.0
|
||||
speed = 80
|
||||
|
||||
[node name="Bat2" parent="Enemies" instance=ExtResource( 10 )]
|
||||
position = Vector2( 16, 120 )
|
||||
left_up_boundry = 3.0
|
||||
right_down_boundry = 3.0
|
||||
left_up_boundary = 3.0
|
||||
right_down_boundary = 3.0
|
||||
speed = 60
|
||||
|
||||
[node name="RollingFiend" parent="Enemies" instance=ExtResource( 13 )]
|
||||
|
|
|
@ -372,80 +372,80 @@ position = Vector2( 520, 16 )
|
|||
|
||||
[node name="Bat" parent="Enemies" instance=ExtResource( 12 )]
|
||||
position = Vector2( 152, 48 )
|
||||
left_up_boundry = 4.0
|
||||
right_down_boundry = 2.0
|
||||
left_up_boundary = 4.0
|
||||
right_down_boundary = 2.0
|
||||
|
||||
[node name="Bat3" parent="Enemies" instance=ExtResource( 12 )]
|
||||
position = Vector2( 288, 88 )
|
||||
right_down_boundry = 5.0
|
||||
right_down_boundary = 5.0
|
||||
|
||||
[node name="Bat4" parent="Enemies" instance=ExtResource( 12 )]
|
||||
position = Vector2( 388, 144 )
|
||||
left_up_boundry = 3.0
|
||||
right_down_boundry = 3.5
|
||||
left_up_boundary = 3.0
|
||||
right_down_boundary = 3.5
|
||||
speed = 60
|
||||
|
||||
[node name="Bat5" parent="Enemies" instance=ExtResource( 12 )]
|
||||
position = Vector2( 392, 48 )
|
||||
right_down_boundry = 4.0
|
||||
right_down_boundary = 4.0
|
||||
|
||||
[node name="Bat6" parent="Enemies" instance=ExtResource( 12 )]
|
||||
position = Vector2( 432, 80 )
|
||||
left_up_boundry = 4.0
|
||||
left_up_boundary = 4.0
|
||||
|
||||
[node name="Bat7" parent="Enemies" instance=ExtResource( 12 )]
|
||||
position = Vector2( 620, 112 )
|
||||
left_up_boundry = 2.0
|
||||
right_down_boundry = 2.0
|
||||
left_up_boundary = 2.0
|
||||
right_down_boundary = 2.0
|
||||
|
||||
[node name="Bat8" parent="Enemies" instance=ExtResource( 12 )]
|
||||
position = Vector2( 632, 48 )
|
||||
left_up_boundry = 2.0
|
||||
right_down_boundry = 2.0
|
||||
left_up_boundary = 2.0
|
||||
right_down_boundary = 2.0
|
||||
|
||||
[node name="Bat9" parent="Enemies" instance=ExtResource( 12 )]
|
||||
position = Vector2( 584, 40 )
|
||||
left_up_boundry = 2.0
|
||||
right_down_boundry = 2.0
|
||||
left_up_boundary = 2.0
|
||||
right_down_boundary = 2.0
|
||||
|
||||
[node name="Bat2" parent="Enemies" instance=ExtResource( 12 )]
|
||||
position = Vector2( 48, 104 )
|
||||
left_up_boundry = 4.0
|
||||
right_down_boundry = 2.0
|
||||
left_up_boundary = 4.0
|
||||
right_down_boundary = 2.0
|
||||
|
||||
[node name="Slime2" parent="Enemies" instance=ExtResource( 15 )]
|
||||
position = Vector2( 192, 64 )
|
||||
|
||||
[node name="Snake" parent="Enemies" instance=ExtResource( 14 )]
|
||||
position = Vector2( 88, 72 )
|
||||
left_up_boundry = 2.0
|
||||
right_down_boundry = 2.0
|
||||
left_up_boundary = 2.0
|
||||
right_down_boundary = 2.0
|
||||
speed = 35
|
||||
|
||||
[node name="Snake3" parent="Enemies" instance=ExtResource( 14 )]
|
||||
position = Vector2( 440, 128 )
|
||||
right_down_boundry = 5.0
|
||||
right_down_boundary = 5.0
|
||||
speed = 70
|
||||
|
||||
[node name="Snake4" parent="Enemies" instance=ExtResource( 14 )]
|
||||
position = Vector2( 440, 168 )
|
||||
right_down_boundry = 6.0
|
||||
right_down_boundary = 6.0
|
||||
speed = 80
|
||||
|
||||
[node name="Snake5" parent="Enemies" instance=ExtResource( 14 )]
|
||||
position = Vector2( 568, 168 )
|
||||
left_up_boundry = 5.0
|
||||
right_down_boundry = 1.0
|
||||
left_up_boundary = 5.0
|
||||
right_down_boundary = 1.0
|
||||
|
||||
[node name="Snake2" parent="Enemies" instance=ExtResource( 14 )]
|
||||
position = Vector2( 216, 168 )
|
||||
left_up_boundry = 3.0
|
||||
right_down_boundry = 3.0
|
||||
left_up_boundary = 3.0
|
||||
right_down_boundary = 3.0
|
||||
speed = 60
|
||||
|
||||
[node name="Snake6" parent="Enemies" instance=ExtResource( 14 )]
|
||||
position = Vector2( 224, 128 )
|
||||
left_up_boundry = 5.0
|
||||
left_up_boundary = 5.0
|
||||
speed = 60
|
||||
|
||||
[node name="ColorRect2" type="ColorRect" parent="."]
|
||||
|
|
|
@ -143,56 +143,56 @@ tile_data = PoolIntArray( -2686976, 1, 0, -2686975, 1, 0, -2686974, 1, 0, -26869
|
|||
[node name="MovingPlatform" parent="Environment" instance=ExtResource( 9 )]
|
||||
position = Vector2( 96, 176 )
|
||||
scale = Vector2( 2, 1 )
|
||||
left_up_boundry = 2.0
|
||||
right_down_boundry = 2.0
|
||||
left_up_boundary = 2.0
|
||||
right_down_boundary = 2.0
|
||||
|
||||
[node name="MovingPlatform5" parent="Environment" instance=ExtResource( 9 )]
|
||||
position = Vector2( 104, 136 )
|
||||
scale = Vector2( 2, 1 )
|
||||
right_down_boundry = 2.0
|
||||
right_down_boundary = 2.0
|
||||
|
||||
[node name="MovingPlatform7" parent="Environment" instance=ExtResource( 9 )]
|
||||
position = Vector2( 104, 136 )
|
||||
scale = Vector2( 2, 1 )
|
||||
right_down_boundry = 2.0
|
||||
right_down_boundary = 2.0
|
||||
|
||||
[node name="MovingPlatform8" parent="Environment" instance=ExtResource( 9 )]
|
||||
position = Vector2( 96, -280 )
|
||||
scale = Vector2( 2, 1 )
|
||||
speed = 30
|
||||
right_down_boundry = 2.0
|
||||
right_down_boundary = 2.0
|
||||
|
||||
[node name="MovingPlatform9" parent="Environment" instance=ExtResource( 9 )]
|
||||
position = Vector2( 80, -344 )
|
||||
scale = Vector2( 2, 1 )
|
||||
speed = 40
|
||||
left_up_boundry = 3.0
|
||||
right_down_boundry = 3.0
|
||||
left_up_boundary = 3.0
|
||||
right_down_boundary = 3.0
|
||||
|
||||
[node name="MovingPlatform6" parent="Environment" instance=ExtResource( 9 )]
|
||||
position = Vector2( 80, -280 )
|
||||
scale = Vector2( 2, 1 )
|
||||
direction = -1
|
||||
speed = 30
|
||||
left_up_boundry = 2.0
|
||||
left_up_boundary = 2.0
|
||||
|
||||
[node name="MovingPlatform2" parent="Environment" instance=ExtResource( 9 )]
|
||||
position = Vector2( 184, 32 )
|
||||
scale = Vector2( 2, 1 )
|
||||
left_up_boundry = 2.0
|
||||
right_down_boundry = 2.0
|
||||
left_up_boundary = 2.0
|
||||
right_down_boundary = 2.0
|
||||
|
||||
[node name="MovingPlatform4" parent="Environment" instance=ExtResource( 9 )]
|
||||
position = Vector2( 172, 104 )
|
||||
left_up_boundry = 1.0
|
||||
right_down_boundry = 2.0
|
||||
left_up_boundary = 1.0
|
||||
right_down_boundary = 2.0
|
||||
|
||||
[node name="MovingPlatform3" parent="Environment" instance=ExtResource( 9 )]
|
||||
position = Vector2( 16, 40 )
|
||||
scale = Vector2( 2, 1 )
|
||||
speed = 40
|
||||
left_up_boundry = 8.0
|
||||
right_down_boundry = 1.0
|
||||
left_up_boundary = 8.0
|
||||
right_down_boundary = 1.0
|
||||
move_direction = 1
|
||||
|
||||
[node name="Ladder" parent="Environment" instance=ExtResource( 12 )]
|
||||
|
@ -281,56 +281,56 @@ position = Vector2( 104, -152 )
|
|||
|
||||
[node name="Bat2" parent="Enemies" instance=ExtResource( 13 )]
|
||||
position = Vector2( 32, 56 )
|
||||
left_up_boundry = 3.0
|
||||
right_down_boundry = 3.0
|
||||
left_up_boundary = 3.0
|
||||
right_down_boundary = 3.0
|
||||
|
||||
[node name="Bat3" parent="Enemies" instance=ExtResource( 13 )]
|
||||
position = Vector2( 124, -152 )
|
||||
left_up_boundry = 2.0
|
||||
right_down_boundry = 3.0
|
||||
left_up_boundary = 2.0
|
||||
right_down_boundary = 3.0
|
||||
|
||||
[node name="Bat6" parent="Enemies" instance=ExtResource( 13 )]
|
||||
position = Vector2( 112, -64 )
|
||||
left_up_boundry = 5.0
|
||||
right_down_boundry = 1.0
|
||||
left_up_boundary = 5.0
|
||||
right_down_boundary = 1.0
|
||||
|
||||
[node name="Bat4" parent="Enemies" instance=ExtResource( 13 )]
|
||||
position = Vector2( 64, -232 )
|
||||
left_up_boundry = 2.0
|
||||
right_down_boundry = 4.0
|
||||
left_up_boundary = 2.0
|
||||
right_down_boundary = 4.0
|
||||
speed = 60
|
||||
|
||||
[node name="Bat7" parent="Enemies" instance=ExtResource( 13 )]
|
||||
position = Vector2( 88, -296 )
|
||||
left_up_boundry = 1.0
|
||||
right_down_boundry = 4.0
|
||||
left_up_boundary = 1.0
|
||||
right_down_boundary = 4.0
|
||||
|
||||
[node name="Bat8" parent="Enemies" instance=ExtResource( 13 )]
|
||||
position = Vector2( 248, -264 )
|
||||
left_up_boundry = 4.0
|
||||
right_down_boundry = 6.0
|
||||
left_up_boundary = 4.0
|
||||
right_down_boundary = 6.0
|
||||
speed = 50
|
||||
|
||||
[node name="Snake" parent="Enemies" instance=ExtResource( 16 )]
|
||||
position = Vector2( 216, 82 )
|
||||
left_up_boundry = 3.0
|
||||
right_down_boundry = 4.0
|
||||
left_up_boundary = 3.0
|
||||
right_down_boundary = 4.0
|
||||
|
||||
[node name="Snake2" parent="Enemies" instance=ExtResource( 16 )]
|
||||
position = Vector2( 136, 80 )
|
||||
left_up_boundry = 2.0
|
||||
right_down_boundry = 3.0
|
||||
left_up_boundary = 2.0
|
||||
right_down_boundary = 3.0
|
||||
|
||||
[node name="Snake7" parent="Enemies" instance=ExtResource( 16 )]
|
||||
position = Vector2( 208, -16 )
|
||||
left_up_boundry = 3.0
|
||||
right_down_boundry = 5.0
|
||||
left_up_boundary = 3.0
|
||||
right_down_boundary = 5.0
|
||||
speed = 80
|
||||
|
||||
[node name="Snake3" parent="Enemies" instance=ExtResource( 16 )]
|
||||
position = Vector2( 96, 114 )
|
||||
left_up_boundry = 10.0
|
||||
right_down_boundry = 2.0
|
||||
left_up_boundary = 10.0
|
||||
right_down_boundary = 2.0
|
||||
|
||||
[node name="Collectibles" type="Node2D" parent="."]
|
||||
position = Vector2( 172, 160 )
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
extends "res://objects/enemy/enemy.gd"
|
||||
|
||||
#How far to move
|
||||
export var left_up_boundry = 0.0
|
||||
export var right_down_boundry = 0.0
|
||||
export var left_up_boundary = 0.0
|
||||
export var right_down_boundary = 0.0
|
||||
#Start direction
|
||||
export var direction = 1
|
||||
export var speed = 50
|
||||
|
@ -14,8 +14,8 @@ onready var startpos = position
|
|||
onready var sprite = $AnimatedSprite
|
||||
|
||||
func _ready():
|
||||
left_up_boundry *= 8
|
||||
right_down_boundry *= 8
|
||||
left_up_boundary *= 8
|
||||
right_down_boundary *= 8
|
||||
|
||||
func _physics_process(delta):
|
||||
if move_direction == 0:
|
||||
|
@ -26,10 +26,10 @@ func move_side_to_side(delta):
|
|||
#Move
|
||||
position.x += direction * (speed * delta)
|
||||
#Switch dir
|
||||
if position.x >= startpos.x + (right_down_boundry):
|
||||
if position.x >= startpos.x + (right_down_boundary):
|
||||
direction = -1
|
||||
if flip_sprite == true: sprite.scale.x = -1
|
||||
if position.x <= startpos.x + (-left_up_boundry):
|
||||
if position.x <= startpos.x + (-left_up_boundary):
|
||||
direction = 1
|
||||
if flip_sprite == true: sprite.scale.x = 1
|
||||
|
||||
|
@ -37,9 +37,9 @@ func move_up_and_down(delta):
|
|||
#Move
|
||||
position.y += direction * (speed * delta)
|
||||
#Switch dir
|
||||
if position.y >= startpos.y + (right_down_boundry):
|
||||
if position.y >= startpos.y + (right_down_boundary):
|
||||
direction = -1
|
||||
if flip_sprite == true: sprite.scale.y = 1
|
||||
if position.y <= startpos.y + (-left_up_boundry):
|
||||
if position.y <= startpos.y + (-left_up_boundary):
|
||||
direction = 1
|
||||
if flip_sprite == true: sprite.scale.y = -1
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
extends "res://objects/enemy/enemy.gd"
|
||||
|
||||
#How far to move
|
||||
export var left_up_boundry = 0.0
|
||||
export var right_down_boundry = 0.0
|
||||
export var left_up_boundary = 0.0
|
||||
export var right_down_boundary = 0.0
|
||||
#Start direction
|
||||
export var direction = 1
|
||||
export var slower_speed = 50
|
||||
|
@ -42,10 +42,10 @@ func move_side_to_side(delta):
|
|||
#Move
|
||||
position.x += direction * (speed * delta)
|
||||
#Switch dir
|
||||
if position.x >= startpos.x + (right_down_boundry * 8):
|
||||
if position.x >= startpos.x + (right_down_boundary * 8):
|
||||
direction = -1
|
||||
if flip_sprite == true: sprite.scale.x = -1
|
||||
if position.x <= startpos.x + (-left_up_boundry * 8):
|
||||
if position.x <= startpos.x + (-left_up_boundary * 8):
|
||||
direction = 1
|
||||
if flip_sprite == true: sprite.scale.x = 1
|
||||
|
||||
|
@ -53,10 +53,10 @@ func move_up_and_down(delta):
|
|||
#Move
|
||||
position.y += direction * (speed * delta)
|
||||
#Switch dir
|
||||
if position.y >= startpos.y + (right_down_boundry * 8):
|
||||
if position.y >= startpos.y + (right_down_boundary * 8):
|
||||
direction = -1
|
||||
if flip_sprite == true: sprite.scale.y = 1
|
||||
if position.y <= startpos.y + (-left_up_boundry * 8):
|
||||
if position.y <= startpos.y + (-left_up_boundary * 8):
|
||||
direction = 1
|
||||
if flip_sprite == true: sprite.scale.y = -1
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@ extends KinematicBody2D
|
|||
export var direction = 1
|
||||
export var speed = 20
|
||||
#How far to move
|
||||
export var left_up_boundry = 0.0
|
||||
export var right_down_boundry = 0.0
|
||||
export var left_up_boundary = 0.0
|
||||
export var right_down_boundary = 0.0
|
||||
#Move horizontal or vertical
|
||||
export(int, "Horizontal", "Vertical") var move_direction
|
||||
#Onreadys
|
||||
|
@ -15,12 +15,12 @@ onready var hitbox = $CollisionShape2D
|
|||
func _ready():
|
||||
sprite.set_region_rect(Rect2(0,0,8 * scale.x,4))
|
||||
sprite.scale.x /= scale.x
|
||||
left_up_boundry *= 8
|
||||
right_down_boundry *= 8
|
||||
left_up_boundary *= 8
|
||||
right_down_boundary *= 8
|
||||
#Better offset for vertical platforms
|
||||
if move_direction == 1:
|
||||
right_down_boundry -= 5
|
||||
left_up_boundry -= 1
|
||||
right_down_boundary -= 5
|
||||
left_up_boundary -= 1
|
||||
|
||||
func _physics_process(delta):
|
||||
if move_direction == 0:
|
||||
|
@ -31,16 +31,16 @@ func move_side_to_side(delta):
|
|||
#Move
|
||||
position.x += direction * (speed * delta)
|
||||
#Switch dir
|
||||
if position.x >= startpos.x + (right_down_boundry):
|
||||
if position.x >= startpos.x + (right_down_boundary):
|
||||
direction = -1
|
||||
if position.x <= startpos.x + (-left_up_boundry):
|
||||
if position.x <= startpos.x + (-left_up_boundary):
|
||||
direction = 1
|
||||
|
||||
func move_up_and_down(delta):
|
||||
#Move
|
||||
position.y += direction * (speed * delta)
|
||||
#Switch dir
|
||||
if position.y >= startpos.y + (right_down_boundry):
|
||||
if position.y >= startpos.y + (right_down_boundary):
|
||||
direction = -1
|
||||
if position.y <= startpos.y + (-left_up_boundry):
|
||||
if position.y <= startpos.y + (-left_up_boundary):
|
||||
direction = 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue