Skip to content

Commit 7499b23

Browse files
committed
small fix and improvements
1 parent 8732714 commit 7499b23

12 files changed

Lines changed: 110 additions & 39 deletions

.src_file/BeatRandom.keystore

2.67 KB
Binary file not shown.

.src_file/debug.keystore

2.6 KB
Binary file not shown.

.src_file/icon.svg

Lines changed: 5 additions & 5 deletions
Loading

export_presets.cfg

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ script_encryption_key=""
8686
custom_template/debug=""
8787
custom_template/release=""
8888
debug/export_console_script=1
89-
binary_format/embed_pck=false
89+
binary_format/embed_pck=true
9090
texture_format/bptc=true
9191
texture_format/s3tc=true
9292
texture_format/etc=false
@@ -115,7 +115,7 @@ custom_features=""
115115
export_filter="all_resources"
116116
include_filter=""
117117
exclude_filter=""
118-
export_path=""
118+
export_path=".out/BeatRandom.apk"
119119
encryption_include_filters=""
120120
encryption_exclude_filters=""
121121
encrypt_pck=false
@@ -134,21 +134,21 @@ architectures/armeabi-v7a=false
134134
architectures/arm64-v8a=true
135135
architectures/x86=false
136136
architectures/x86_64=false
137-
keystore/debug=""
138-
keystore/debug_user=""
139-
keystore/debug_password=""
140-
keystore/release=""
141-
keystore/release_user=""
142-
keystore/release_password=""
137+
keystore/debug="D:/GameCreation/BeatRandom/.src_file/debug.keystore"
138+
keystore/debug_user="androiddebugkey"
139+
keystore/debug_password="android"
140+
keystore/release="D:/GameCreation/BeatRandom/.src_file/BeatRandom.keystore"
141+
keystore/release_user="BeatRandom"
142+
keystore/release_password="ModnarTaeb"
143143
version/code=1
144144
version/name="1.0"
145-
package/unique_name="fun.LSDog.$genname"
145+
package/unique_name="fun.LSDog.BeatRandom"
146146
package/name=""
147-
package/signed=false
147+
package/signed=true
148148
package/app_category=2
149149
package/retain_data_on_uninstall=false
150150
package/exclude_from_recents=false
151-
launcher_icons/main_192x192="res://icon.png"
151+
launcher_icons/main_192x192="res://image/icon/icon.ico"
152152
launcher_icons/adaptive_foreground_432x432=""
153153
launcher_icons/adaptive_background_432x432=""
154154
graphics/opengl_debug=false

image/icon/icon_1024.png

105 KB
Loading

image/icon/icon_1024.png.import

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="CompressedTexture2D"
5+
uid="uid://da0ku6p8xiaw4"
6+
path="res://.godot/imported/icon_1024.png-0ea68237891124431017c7ef3a587807.ctex"
7+
metadata={
8+
"vram_texture": false
9+
}
10+
11+
[deps]
12+
13+
source_file="res://image/icon/icon_1024.png"
14+
dest_files=["res://.godot/imported/icon_1024.png-0ea68237891124431017c7ef3a587807.ctex"]
15+
16+
[params]
17+
18+
compress/mode=0
19+
compress/high_quality=false
20+
compress/lossy_quality=0.7
21+
compress/hdr_compression=1
22+
compress/normal_map=0
23+
compress/channel_pack=0
24+
mipmaps/generate=false
25+
mipmaps/limit=-1
26+
roughness/mode=0
27+
roughness/src_normal=""
28+
process/fix_alpha_border=true
29+
process/premult_alpha=false
30+
process/normal_map_invert_y=false
31+
process/hdr_as_srgb=false
32+
process/hdr_clamp_exposure=false
33+
process/size_limit=0
34+
detect_3d/compress_to=1

image/icon/icon_2048.png

236 KB
Loading

image/icon/icon_2048.png.import

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="CompressedTexture2D"
5+
uid="uid://dbdm66wihqi2c"
6+
path="res://.godot/imported/icon_2048.png-faa6ace5577182f59fb71b7436b1e3d9.ctex"
7+
metadata={
8+
"vram_texture": false
9+
}
10+
11+
[deps]
12+
13+
source_file="res://image/icon/icon_2048.png"
14+
dest_files=["res://.godot/imported/icon_2048.png-faa6ace5577182f59fb71b7436b1e3d9.ctex"]
15+
16+
[params]
17+
18+
compress/mode=0
19+
compress/high_quality=false
20+
compress/lossy_quality=0.7
21+
compress/hdr_compression=1
22+
compress/normal_map=0
23+
compress/channel_pack=0
24+
mipmaps/generate=false
25+
mipmaps/limit=-1
26+
roughness/mode=0
27+
roughness/src_normal=""
28+
process/fix_alpha_border=true
29+
process/premult_alpha=false
30+
process/normal_map_invert_y=false
31+
process/hdr_as_srgb=false
32+
process/hdr_clamp_exposure=false
33+
process/size_limit=0
34+
detect_3d/compress_to=1

project.godot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ config/description="锻炼你的视奏能力!
1818
Practice your sight-reading!"
1919
run/main_scene="res://scene/Main.tscn"
2020
config/features=PackedStringArray("4.0", "GL Compatibility")
21-
boot_splash/show_image=false
22-
boot_splash/image="res://image/avatar.png"
21+
boot_splash/image="res://image/icon/icon_2048.png"
2322
config/icon="res://icon.svg"
2423

2524
[display]
2625

2726
window/stretch/mode="canvas_items"
2827
window/stretch/aspect="expand"
28+
window/handheld/orientation=4
2929

3030
[gui]
3131

scene/Main.gd

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func _ready():
8080
buttonLoop.toggled.connect(button_press.bind(buttonLoop));
8181
buttonContinue.toggled.connect(button_press.bind(buttonContinue));
8282

83-
spinPlayTimes.get_line_edit().focus_mode = FOCUS_NONE;
83+
#spinPlayTimes.get_line_edit().focus_mode = FOCUS_NONE;
8484
spinPlayTimes.prefix = tr("$playtimes_prefix");
8585
spinPlayTimes.suffix = tr("$playtimes_suffix");
8686

@@ -134,7 +134,7 @@ func generate_new_beats():
134134
reset_beat_play();
135135

136136

137-
func _process(delta: float):
137+
func _process(_delta: float):
138138

139139
if !enabled: return;
140140

@@ -176,21 +176,23 @@ func reset_beat_play():
176176

177177
func load_notes():
178178
var path = "res://image/note/";
179+
179180
for file_name in DirAccess.get_files_at(path):
180181

181-
if file_name.ends_with(".import"): continue;
182+
# 导出后只会列出.import文件, 因此只要删掉这个结尾就是可以load的原路径了
183+
if !file_name.ends_with(".import"): continue;
184+
file_name = file_name.substr(0, file_name.rfind("."));
182185

183186
var texture := load(path + file_name);
184187
var total_time := 0.0;
185188
var beat_time := [];
186189

187-
var prev_time :float = 0.0;
188190
var add_time :float = 0.0;
189191

190192
for one_note in file_name.substr(0, file_name.rfind(".")).split("_"):
191193

192194
var number_string := "";
193-
var end_string :String;
195+
var end_string :String = "";
194196

195197
for word in one_note.split():
196198
if word.is_valid_int():
@@ -206,13 +208,11 @@ func load_notes():
206208
if end_string != "r": # 如果不是 rest 休止, 这个音符算(上一个音符结束后)发音
207209
beat_time.append(add_time);
208210
add_time += time;
209-
210-
prev_time = time;
211211

212-
var name = file_name.substr(0, file_name.rfind("."));
213-
var note = Note.new(name, total_time, beat_time, texture);
212+
file_name = file_name.substr(0, file_name.rfind("."));
213+
var note = Note.new(file_name, total_time, beat_time, texture);
214214

215-
notes[name] = note;
215+
notes[file_name] = note;
216216

217217
var same_total_time_notes = length_notes.get(total_time);
218218
if same_total_time_notes == null:
@@ -241,9 +241,9 @@ func play_sound(stream: AudioStream, volume: float = 0, pitch: float = 1, bus: S
241241
player.play();
242242

243243
## 震动动画
244-
func beat_animate(node: CanvasItem, scale: float = 1.1, time: float = 0.5):
245-
var v_scale = Vector2(scale, scale);
246-
node.scale = v_scale;
244+
func beat_animate(node: CanvasItem, _scale: float = 1.1, time: float = 0.5):
245+
var v_scale = Vector2(_scale, _scale);
246+
node._scale = v_scale;
247247
node.queue_redraw();
248248
var tween = node.create_tween();
249249
tween.tween_property(node, "scale", Vector2(1,1), time

0 commit comments

Comments
 (0)