aboutsummaryrefslogtreecommitdiff
path: root/CityScene.tscn
blob: 20f69fec1c00ef4a8e7f904a92e68daf726c7d52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
[gd_scene load_steps=4 format=2]

[ext_resource path="res://CityBackground.png" type="Texture" id=1]

[sub_resource type="GDScript" id=2]
script/source = "extends ParallaxLayer

export var speed := 20.0
var offset_x = 0.0
var last_camera_x = 0.0

func _ready():
	last_camera_x = get_node(\"../../Camera2D\").get_camera_position().x

func _process(delta):
	motion_offset = Vector2(offset_x, 0)
	var new_camera_x = get_node(\"../../Camera2D\").get_camera_position().x
	offset_x -= delta*speed + (new_camera_x - last_camera_x)*-2
	last_camera_x = new_camera_x
"

[sub_resource type="TileSet" id=1]
5/name = "CityBackground.png 5"
5/texture = ExtResource( 1 )
5/tex_offset = Vector2( 0, 0 )
5/modulate = Color( 1, 1, 1, 1 )
5/region = Rect2( 0, 0, 640, 96 )
5/tile_mode = 0
5/occluder_offset = Vector2( 0, 0 )
5/navigation_offset = Vector2( 0, 0 )
5/shape_offset = Vector2( 0, 0 )
5/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
5/shape_one_way = false
5/shape_one_way_margin = 0.0
5/shapes = [  ]
5/z_index = 0
6/name = "CityBackground.png 6"
6/texture = ExtResource( 1 )
6/tex_offset = Vector2( 0, 0 )
6/modulate = Color( 1, 1, 1, 1 )
6/region = Rect2( 0, 96, 640, 96 )
6/tile_mode = 0
6/occluder_offset = Vector2( 0, 0 )
6/navigation_offset = Vector2( 0, 0 )
6/shape_offset = Vector2( 0, 0 )
6/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
6/shape_one_way = false
6/shape_one_way_margin = 0.0
6/shapes = [  ]
6/z_index = 0
7/name = "CityBackground.png 7"
7/texture = ExtResource( 1 )
7/tex_offset = Vector2( 0, 0 )
7/modulate = Color( 1, 1, 1, 1 )
7/region = Rect2( 0, 192, 640, 96 )
7/tile_mode = 0
7/occluder_offset = Vector2( 0, 0 )
7/navigation_offset = Vector2( 0, 0 )
7/shape_offset = Vector2( 0, 0 )
7/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
7/shape_one_way = false
7/shape_one_way_margin = 0.0
7/shapes = [  ]
7/z_index = 0
8/name = "CityBackground.png 8"
8/texture = ExtResource( 1 )
8/tex_offset = Vector2( 0, 0 )
8/modulate = Color( 1, 1, 1, 1 )
8/region = Rect2( 0, 288, 640, 96 )
8/tile_mode = 0
8/occluder_offset = Vector2( 0, 0 )
8/navigation_offset = Vector2( 0, 0 )
8/shape_offset = Vector2( 0, 0 )
8/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
8/shape_one_way = false
8/shape_one_way_margin = 0.0
8/shapes = [  ]
8/z_index = 0
9/name = "CityBackground.png 9"
9/texture = ExtResource( 1 )
9/tex_offset = Vector2( 0, 0 )
9/modulate = Color( 1, 1, 1, 1 )
9/region = Rect2( 0, 384, 640, 96 )
9/tile_mode = 0
9/occluder_offset = Vector2( 0, 0 )
9/navigation_offset = Vector2( 0, 0 )
9/shape_offset = Vector2( 0, 0 )
9/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
9/shape_one_way = false
9/shape_one_way_margin = 0.0
9/shapes = [  ]
9/z_index = 0

[node name="Node2D" type="Node2D"]

[node name="ParallaxBackground" type="ParallaxBackground" parent="."]
scroll_ignore_camera_zoom = true

[node name="ParallaxLayer" type="ParallaxLayer" parent="ParallaxBackground"]
position = Vector2( 295, 103 )
motion_mirroring = Vector2( 640, 0 )
script = SubResource( 2 )
speed = 80.0

[node name="StaticBody2D" type="StaticBody2D" parent="ParallaxBackground/ParallaxLayer"]

[node name="TileMap" type="TileMap" parent="ParallaxBackground/ParallaxLayer/StaticBody2D"]
position = Vector2( 216, 39 )
tile_set = SubResource( 1 )
cell_size = Vector2( 64, 48 )
format = 1
tile_data = PoolIntArray( -65537, 6, 0, 65525, 5, 0, 65535, 5, 0, 0, 0, 0, 1, 1, 0 )
__meta__ = {
"_edit_lock_": true
}

[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="ParallaxBackground/ParallaxLayer/StaticBody2D"]
visible = false
position = Vector2( -183, 42 )
polygon = PoolVector2Array( 124, -113, 17, -2, 9, 97, 321, 91, 407, -97 )

[node name="Camera2D" type="Camera2D" parent="."]
visible = false
position = Vector2( 240, 135 )
current = true
smoothing_speed = 8.0