Skip to content

Commit 197ce0e

Browse files
committed
part 09 android testing and background
1 parent 202b260 commit 197ce0e

File tree

12 files changed

+449
-15
lines changed

12 files changed

+449
-15
lines changed

Main.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func spawn_circle(_position=null):
3131
var c = Circle.instance()
3232
if !_position:
3333
var x = rand_range(-150, 150)
34-
var y = rand_range(-550, -450)
34+
var y = rand_range(-500, -400)
3535
_position = player.target.position + Vector2(x, y)
3636
add_child(c)
3737
c.init(_position, level)

Main.tscn

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
1-
[gd_scene load_steps=5 format=2]
1+
[gd_scene load_steps=7 format=2]
22

33
[ext_resource path="res://Main.gd" type="Script" id=1]
44
[ext_resource path="res://UI/Screens.tscn" type="PackedScene" id=2]
55
[ext_resource path="res://UI/HUD.tscn" type="PackedScene" id=3]
66
[ext_resource path="res://assets/audio/Music_Light-Puzzles.ogg" type="AudioStream" id=4]
7+
[ext_resource path="res://UI/Background.tscn" type="PackedScene" id=5]
8+
9+
[sub_resource type="Environment" id=1]
10+
background_mode = 4
11+
glow_enabled = true
12+
glow_levels/1 = true
13+
glow_levels/2 = true
14+
glow_levels/4 = true
15+
glow_levels/5 = false
16+
glow_intensity = 0.37
17+
glow_blend_mode = 0
18+
glow_hdr_threshold = 0.64
719

820
[node name="Main" type="Node"]
921
script = ExtResource( 1 )
@@ -24,4 +36,9 @@ smoothing_speed = 8.0
2436

2537
[node name="Music" type="AudioStreamPlayer" parent="."]
2638
stream = ExtResource( 4 )
39+
40+
[node name="Background" parent="." instance=ExtResource( 5 )]
41+
42+
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
43+
environment = SubResource( 1 )
2744
[connection signal="start_game" from="Screens" to="." method="new_game"]

UI/Background.tscn

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
[gd_scene load_steps=2 format=2]
2+
3+
[ext_resource path="res://assets/images/circle1_n.png" type="Texture" id=1]
4+
5+
[node name="Background" type="CanvasLayer"]
6+
layer = -1
7+
8+
[node name="ColorRect" type="ColorRect" parent="."]
9+
anchor_right = 1.0
10+
anchor_bottom = 1.0
11+
mouse_filter = 2
12+
color = Color( 0, 0, 0, 1 )
13+
14+
[node name="CPUParticles2D" type="CPUParticles2D" parent="."]
15+
modulate = Color( 1, 1, 1, 0.396078 )
16+
position = Vector2( 240, -100 )
17+
rotation = 1.5708
18+
amount = 4
19+
lifetime = 20.0
20+
preprocess = 20.0
21+
texture = ExtResource( 1 )
22+
emission_shape = 2
23+
emission_rect_extents = Vector2( 1, 240 )
24+
spread = 0.0
25+
gravity = Vector2( 0, 0 )
26+
initial_velocity = 50.0
27+
initial_velocity_random = 0.6
28+
scale_amount = 0.2
29+
scale_amount_random = 0.2
30+
hue_variation = 0.5
31+
hue_variation_random = 1.0

UI/HUD.tscn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ tracks/0/keys = {
2626
"times": PoolRealArray( 0 ),
2727
"transitions": PoolRealArray( 1 ),
2828
"update": 1,
29-
"values": [ 64 ]
29+
"values": [ 80 ]
3030
}
3131
tracks/1/type = "value"
3232
tracks/1/path = NodePath("Message:visible")

0 commit comments

Comments
 (0)