mirror of
https://github.com/Steffo99/looping-for-loops.git
synced 2024-11-21 23:54:23 +00:00
💥 Commit everything, as I forgot again
This commit is contained in:
parent
28a5061fd4
commit
6766532474
6 changed files with 159 additions and 1 deletions
6
Scripts/Obstacles/Buzzsaw.gd
Normal file
6
Scripts/Obstacles/Buzzsaw.gd
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
extends ScrollingArea
|
||||||
|
class_name Buzzsaw
|
||||||
|
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
$AnimationPlayer.play("SpinClockwise")
|
9
ScrollingArea.gd
Normal file
9
ScrollingArea.gd
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
extends Area2D
|
||||||
|
class_name ScrollingArea
|
||||||
|
|
||||||
|
|
||||||
|
export(Vector2) var scroll_velocity: Vector2 = Vector2(-100, 0)
|
||||||
|
|
||||||
|
|
||||||
|
func _physics_process(delta):
|
||||||
|
position += scroll_velocity * delta
|
16
ScrollingNode.gd
Normal file
16
ScrollingNode.gd
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
extends Node
|
||||||
|
|
||||||
|
|
||||||
|
# Declare member variables here. Examples:
|
||||||
|
# var a = 2
|
||||||
|
# var b = "text"
|
||||||
|
|
||||||
|
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
func _ready():
|
||||||
|
pass # Replace with function body.
|
||||||
|
|
||||||
|
|
||||||
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
|
#func _process(delta):
|
||||||
|
# pass
|
34
Sprites/saw.png.import
Normal file
34
Sprites/saw.png.import
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/saw.png-4141660ac2a6d06b3d6e07a6e3c8e084.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Sprites/saw.png"
|
||||||
|
dest_files=[ "res://.import/saw.png-4141660ac2a6d06b3d6e07a6e3c8e084.stex" ]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_mode=0
|
||||||
|
compress/bptc_ldr=0
|
||||||
|
compress/normal_map=0
|
||||||
|
flags/repeat=0
|
||||||
|
flags/filter=true
|
||||||
|
flags/mipmaps=false
|
||||||
|
flags/anisotropic=false
|
||||||
|
flags/srgb=2
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/HDR_as_SRGB=false
|
||||||
|
process/invert_color=false
|
||||||
|
stream=false
|
||||||
|
size_limit=0
|
||||||
|
detect_3d=true
|
||||||
|
svg/scale=1.0
|
81
Tilesets/Pipes.tres
Normal file
81
Tilesets/Pipes.tres
Normal file
|
@ -0,0 +1,81 @@
|
||||||
|
[gd_resource type="TileSet" load_steps=8 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://Sprites/pipes.png" type="Texture" id=1]
|
||||||
|
|
||||||
|
[sub_resource type="ConvexPolygonShape2D" id=1]
|
||||||
|
points = PoolVector2Array( 0, 0, 40, 0, 40, 40, 0, 40 )
|
||||||
|
|
||||||
|
[sub_resource type="ConvexPolygonShape2D" id=2]
|
||||||
|
points = PoolVector2Array( 0, 0, 40, 0, 40, 40, 0, 40 )
|
||||||
|
|
||||||
|
[sub_resource type="ConvexPolygonShape2D" id=3]
|
||||||
|
points = PoolVector2Array( 0, 0, 40, 0, 40, 40, 0, 40 )
|
||||||
|
|
||||||
|
[sub_resource type="ConvexPolygonShape2D" id=4]
|
||||||
|
points = PoolVector2Array( 0, 0, 40, 0, 40, 40, 0, 40 )
|
||||||
|
|
||||||
|
[sub_resource type="ConvexPolygonShape2D" id=5]
|
||||||
|
points = PoolVector2Array( 0, 0, 40, 0, 40, 40, 0, 40 )
|
||||||
|
|
||||||
|
[sub_resource type="ConvexPolygonShape2D" id=6]
|
||||||
|
points = PoolVector2Array( 0, 0, 40, 0, 40, 40, 0, 40 )
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
0/name = "pipes.png 0"
|
||||||
|
0/texture = ExtResource( 1 )
|
||||||
|
0/tex_offset = Vector2( 0, 0 )
|
||||||
|
0/modulate = Color( 1, 1, 1, 1 )
|
||||||
|
0/region = Rect2( 0, 0, 80, 120 )
|
||||||
|
0/tile_mode = 2
|
||||||
|
0/autotile/icon_coordinate = Vector2( 0, 0 )
|
||||||
|
0/autotile/tile_size = Vector2( 40, 40 )
|
||||||
|
0/autotile/spacing = 0
|
||||||
|
0/autotile/occluder_map = [ ]
|
||||||
|
0/autotile/navpoly_map = [ ]
|
||||||
|
0/autotile/priority_map = [ ]
|
||||||
|
0/autotile/z_index_map = [ ]
|
||||||
|
0/occluder_offset = Vector2( 0, 0 )
|
||||||
|
0/navigation_offset = Vector2( 0, 0 )
|
||||||
|
0/shape_offset = Vector2( 0, 0 )
|
||||||
|
0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
|
0/shape = SubResource( 1 )
|
||||||
|
0/shape_one_way = false
|
||||||
|
0/shape_one_way_margin = 1.0
|
||||||
|
0/shapes = [ {
|
||||||
|
"autotile_coord": Vector2( 0, 0 ),
|
||||||
|
"one_way": false,
|
||||||
|
"one_way_margin": 1.0,
|
||||||
|
"shape": SubResource( 1 ),
|
||||||
|
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
|
}, {
|
||||||
|
"autotile_coord": Vector2( 1, 0 ),
|
||||||
|
"one_way": false,
|
||||||
|
"one_way_margin": 1.0,
|
||||||
|
"shape": SubResource( 2 ),
|
||||||
|
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
|
}, {
|
||||||
|
"autotile_coord": Vector2( 0, 1 ),
|
||||||
|
"one_way": false,
|
||||||
|
"one_way_margin": 1.0,
|
||||||
|
"shape": SubResource( 3 ),
|
||||||
|
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
|
}, {
|
||||||
|
"autotile_coord": Vector2( 1, 1 ),
|
||||||
|
"one_way": false,
|
||||||
|
"one_way_margin": 1.0,
|
||||||
|
"shape": SubResource( 4 ),
|
||||||
|
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
|
}, {
|
||||||
|
"autotile_coord": Vector2( 0, 2 ),
|
||||||
|
"one_way": false,
|
||||||
|
"one_way_margin": 1.0,
|
||||||
|
"shape": SubResource( 5 ),
|
||||||
|
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
|
}, {
|
||||||
|
"autotile_coord": Vector2( 1, 2 ),
|
||||||
|
"one_way": false,
|
||||||
|
"one_way_margin": 1.0,
|
||||||
|
"shape": SubResource( 6 ),
|
||||||
|
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
|
} ]
|
||||||
|
0/z_index = 0
|
|
@ -9,6 +9,11 @@
|
||||||
config_version=4
|
config_version=4
|
||||||
|
|
||||||
_global_script_classes=[ {
|
_global_script_classes=[ {
|
||||||
|
"base": "ScrollingArea",
|
||||||
|
"class": "Buzzsaw",
|
||||||
|
"language": "GDScript",
|
||||||
|
"path": "res://Scripts/Obstacles/Buzzsaw.gd"
|
||||||
|
}, {
|
||||||
"base": "Node",
|
"base": "Node",
|
||||||
"class": "Conductor",
|
"class": "Conductor",
|
||||||
"language": "GDScript",
|
"language": "GDScript",
|
||||||
|
@ -29,22 +34,29 @@ _global_script_classes=[ {
|
||||||
"language": "GDScript",
|
"language": "GDScript",
|
||||||
"path": "res://Scripts/Player.gd"
|
"path": "res://Scripts/Player.gd"
|
||||||
}, {
|
}, {
|
||||||
"base": "StaticBody2D",
|
"base": "ScrollingBlock",
|
||||||
"class": "Press",
|
"class": "Press",
|
||||||
"language": "GDScript",
|
"language": "GDScript",
|
||||||
"path": "res://Scripts/Obstacles/Press.gd"
|
"path": "res://Scripts/Obstacles/Press.gd"
|
||||||
}, {
|
}, {
|
||||||
|
"base": "Area2D",
|
||||||
|
"class": "ScrollingArea",
|
||||||
|
"language": "GDScript",
|
||||||
|
"path": "res://ScrollingArea.gd"
|
||||||
|
}, {
|
||||||
"base": "ExtendedKinematicBody2D",
|
"base": "ExtendedKinematicBody2D",
|
||||||
"class": "ScrollingBlock",
|
"class": "ScrollingBlock",
|
||||||
"language": "GDScript",
|
"language": "GDScript",
|
||||||
"path": "res://Scripts/Obstacles/ScrollingBlock.gd"
|
"path": "res://Scripts/Obstacles/ScrollingBlock.gd"
|
||||||
} ]
|
} ]
|
||||||
_global_script_class_icons={
|
_global_script_class_icons={
|
||||||
|
"Buzzsaw": "",
|
||||||
"Conductor": "",
|
"Conductor": "",
|
||||||
"ConveyorBelt": "",
|
"ConveyorBelt": "",
|
||||||
"ExtendedKinematicBody2D": "",
|
"ExtendedKinematicBody2D": "",
|
||||||
"Player": "",
|
"Player": "",
|
||||||
"Press": "",
|
"Press": "",
|
||||||
|
"ScrollingArea": "",
|
||||||
"ScrollingBlock": ""
|
"ScrollingBlock": ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue