Skip to content

Commit c760ceb

Browse files
committed
Commit files changed by the formatting script
1 parent a6378ee commit c760ceb

File tree

90 files changed

+78
-90
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+78
-90
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ logs/
88
assets/icon/
99
*.psd
1010

11-
.vscode/
11+
.vscode/

2017/cheatsheet/Godot 2.1-Code Editor Shortcuts.md

+1-1

2017/final/02-Custom camera with instant room transitions/Player.gd

-1
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,3 @@ func turn_towards(_direction):
5454
elif _direction == RIGHT:
5555
direction = Vector2(1, 0)
5656
get_node("Sprite").set_flip_h(true)
57-

2017/final/03-Camera room transitions with steering/Camera.gd

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,4 @@ func get_player_grid_pos():
6262
var pos = player.get_pos() - player.size / 2
6363
var x = floor(pos.x / window_size.x)
6464
var y = floor(pos.y / window_size.y)
65-
return Vector2(x, y)
65+
return Vector2(x, y)

2017/final/03-Camera room transitions with steering/Player.gd

-1
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,3 @@ func turn_towards(_direction):
5454
elif _direction == RIGHT:
5555
direction = Vector2(1, 0)
5656
get_node("Sprite").set_flip_h(true)
57-

2017/final/04-Camera with proper Object Oriented design by Lars Kokhemor/Player.gd

-1
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,3 @@ func turn_towards(_direction):
4646
elif _direction == RIGHT:
4747
direction = Vector2(1, 0)
4848
get_node("Sprite").set_flip_h(true)
49-
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
Camera fix example by Lars Kokemohr, dean of engineering at the school4games Berlin
2-
http://school4games.net/
2+
http://school4games.net/

2017/final/06-Grid-based movement/Game.gd

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ func _input(event):
99
if get_tree().is_paused():
1010
get_tree().set_pause(false)
1111
else:
12-
get_tree().set_pause(true)
12+
get_tree().set_pause(true)

2017/final/09-Isometric grid-based movement/PlayerVisualizer.gd

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ func _fixed_process(delta):
3232
if pos != target_pos: color = GREEN
3333
elif pos == target_pos and not Player.is_moving and Player.direction == Vector2(): color = GREEN
3434
else: color = RED
35-
update()
35+
update()

2017/final/11-Save settings with ConfigFile/Game/Player.gd

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@ func draw_circle_arc_poly(center, radius, angle_from, angle_to, color):
6060
for i in range(nb_points+1):
6161
var angle_point = angle_from + i*(angle_to-angle_from)/nb_points
6262
points_arc.push_back(center + Vector2( cos( deg2rad(angle_point) ), sin( deg2rad(angle_point) ) ) * radius)
63-
draw_polygon(points_arc, colors)
63+
draw_polygon(points_arc, colors)

2017/final/11-Save settings with ConfigFile/Settings.gd

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,4 @@ func get_setting(category, key):
7676

7777

7878
func set_setting(category, key, value):
79-
_settings[category][key] = value
79+
_settings[category][key] = value

2017/final/12-Save game/PrintAttributes.gd

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ var Player = null
44

55
func _ready():
66
Player = get_parent()
7-
set_text("Max health: %s" % Player.max_health)
7+
set_text("Max health: %s" % Player.max_health)

2017/final/12-Save game/save.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
"y": 183.763229
1313
}
1414
}
15-
}
15+
}

2017/final/14-Intro to signals/Sprite.gd

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ func _ready():
66

77

88
func change_color(name):
9-
set_texture(load("res://Characters/%s.png" % name))
9+
set_texture(load("res://Characters/%s.png" % name))

2017/final/17-Attack demo with Heartbeast/end/characters/DebugCharacter.gd

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ func _ready():
66
visible = false
77

88
func _physics_process(delta):
9-
text = str(Character.current_state)
9+
text = str(Character.current_state)

2017/final/17-Attack demo with Heartbeast/end/characters/shared/health.gd

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ func heal(amount):
1919
life = max_life
2020

2121
func get_health_ratio():
22-
return life / max_life
22+
return life / max_life

2017/final/17-Attack demo with Heartbeast/start/characters/DebugCharacter.gd

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ func _ready():
66
visible = false
77

88
func _physics_process(delta):
9-
text = str(Character.current_state)
9+
text = str(Character.current_state)

2017/final/17-Attack demo with Heartbeast/start/characters/shared/health.gd

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ func heal(amount):
1919
life = max_life
2020

2121
func get_health_ratio():
22-
return life / max_life
22+
return life / max_life

2017/start/01-Custom Camera in Godot 1-Transform the Canvas/Player.gd

-1
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,3 @@ func turn_towards(_direction):
4343
elif _direction == RIGHT:
4444
direction = Vector2(1, 0)
4545
get_node("Sprite").set_flip_h(true)
46-

2017/start/02-Custom Camera in Godot 2-Follow the Player/Camera.gd

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ func _ready():
1111

1212

1313
func update_camera():
14-
print('moved!')
14+
print('moved!')

2017/start/02-Custom Camera in Godot 2-Follow the Player/Player.gd

-1
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,3 @@ func turn_towards(_direction):
4747
elif _direction == RIGHT:
4848
direction = Vector2(1, 0)
4949
get_node("Sprite").set_flip_h(true)
50-

2017/start/03-Custom Camera in Godot 3-Let's simplify the code!/Player.gd

-1
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,3 @@ func turn_towards(_direction):
4747
elif _direction == RIGHT:
4848
direction = Vector2(1, 0)
4949
get_node("Sprite").set_flip_h(true)
50-

2017/start/04-Custom camera with instant room transitions/Player.gd

-1
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,3 @@ func turn_towards(_direction):
5454
elif _direction == RIGHT:
5555
direction = Vector2(1, 0)
5656
get_node("Sprite").set_flip_h(true)
57-

2017/start/07-Top-down character movement/Player.gd

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ func _ready():
66

77

88
func _fixed_process(delta):
9-
pass
9+
pass

2017/start/08-Basic grid system/Player.gd

-1
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,3 @@ func _fixed_process(delta):
3737
velocity = speed * direction.normalized() * delta
3838

3939
move(velocity)
40-

2017/start/09-Adding the last 2 methods to the Grid/Player.gd

-1
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,3 @@ func _fixed_process(delta):
3131

3232
velocity = speed * direction.normalized() * delta
3333
move(velocity)
34-

2017/start/11-Field of view with the dot product/Player.gd

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ func draw_circle_arc_poly(center, radius, angle_from, angle_to, color):
5454
for i in range(nb_points+1):
5555
var angle_point = angle_from + i*(angle_to-angle_from)/nb_points
5656
points_arc.push_back(center + Vector2( cos( deg2rad(angle_point) ), sin( deg2rad(angle_point) ) ) * radius)
57-
draw_polygon(points_arc, colors)
57+
draw_polygon(points_arc, colors)

2017/start/12-Save settings with ConfigFile/Player.gd

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@ func draw_circle_arc_poly(center, radius, angle_from, angle_to, color):
6060
for i in range(nb_points+1):
6161
var angle_point = angle_from + i*(angle_to-angle_from)/nb_points
6262
points_arc.push_back(center + Vector2( cos( deg2rad(angle_point) ), sin( deg2rad(angle_point) ) ) * radius)
63-
draw_polygon(points_arc, colors)
63+
draw_polygon(points_arc, colors)

2017/start/12-Save settings with ConfigFile/Settings.gd

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ func get_setting(category, key):
3333

3434

3535
func set_setting(category, key, value):
36-
_settings[category][key] = value
36+
_settings[category][key] = value

2017/start/13-Save game/Player.gd

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ func _fixed_process(delta):
3939
func save():
4040
# Compile all the data to save in a dictionary
4141
var save_dict = {}
42-
return save_dict
42+
return save_dict

2017/start/13-Save game/Player2.gd

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ func save():
4040
y=get_pos().y
4141
}
4242
}
43-
return save_dict
43+
return save_dict

2017/start/13-Save game/PrintAttributes.gd

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ var Player = null
44

55
func _ready():
66
Player = get_parent()
7-
set_text("Max health: %s" % Player.max_health)
7+
set_text("Max health: %s" % Player.max_health)

2017/start/13-Save game/Save.gd

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ func load_game():
2020
# Try to load a saved file
2121
# Parse the file data if it exists
2222
# load the data into persistent nodes
23-
pass
23+
pass

2017/tools/Field of view/Player.gd

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ func draw_circle_arc_poly(center, radius, angle_from, angle_to, color):
5454
for i in range(nb_points+1):
5555
var angle_point = angle_from + i*(angle_to-angle_from)/nb_points
5656
points_arc.push_back(center + Vector2( cos( deg2rad(angle_point) ), sin( deg2rad(angle_point) ) ) * radius)
57-
draw_polygon(points_arc, colors)
57+
draw_polygon(points_arc, colors)

2017/tools/vector vizualizer/Player.gd

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ func _fixed_process(delta):
5252
if speed == 0:
5353
velocity = Vector2()
5454

55-
move(velocity)
55+
move(velocity)

2018/01-25-tool-draw-in-viewport/end/bat/Bat.gd

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ func _draw():
3737
var time = time_step * i
3838
var new_point = Vector2(time * speed, sin(time * 10) * sine_amplitude)
3939
points_array.append(new_point)
40-
draw_polyline(points_array, Color(1.0,1.0,1.0), 2.0, true)
40+
draw_polyline(points_array, Color(1.0,1.0,1.0), 2.0, true)

2018/03-28-character-scene-setup/end/characters/player/player.gd

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ extends "res://characters/character.gd"
22

33

44
func _physics_process(delta):
5-
pass
5+
pass

2018/03-28-character-scene-setup/start/characters/player/player.gd

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ extends "res://characters/character.gd"
22

33

44
func _physics_process(delta):
5-
pass
5+
pass

2018/03-30-astar-pathfinding/pathfind_astar.gd

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,4 +183,4 @@ func _set_path_end_position(value):
183183
set_cell(value.x, value.y, 2)
184184
path_end_position = value
185185
if path_start_position != value:
186-
_recalculate_path()
186+
_recalculate_path()

2018/04-07-simple-sword-attack/end/characters/debug/state-visualizer.gd

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ func _ready():
1515

1616

1717
func _on_Player_state_changed(new_state):
18-
text = STATE_STRINGS[new_state]
18+
text = STATE_STRINGS[new_state]
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
.import
1+
.import
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
.import
1+
.import
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
extends Button
22

3-
export(String) var scene_to_load
3+
export(String) var scene_to_load

2018/06-16-intro-to-shaders-2d-water/end/first_shader/dancing_godot/dancing_godot.shader

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ uniform vec2 amplitude = vec2(10, 10);
66
void vertex() {
77
VERTEX.x += sin(TIME * time_factor) * amplitude.x;
88
VERTEX.y += cos(TIME * time_factor) * amplitude.y;
9-
}
9+
}

2018/06-16-intro-to-shaders-2d-water/end/water/01.sine/water_sine.shader

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ void fragment() {
1919
COLOR = texture(TEXTURE, tiled_uvs + wave_uv_offset * amplitude);
2020
// COLOR = vec4(wave_uv_offset, vec2(0.0, 1.0));
2121
// COLOR = vec4(UV * aspect_ratio, vec2(0.0, 1.0));
22-
}
22+
}

2018/06-16-intro-to-shaders-2d-water/end/water/01.sine/water_sine_function.shader

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ void fragment() {
2222

2323
COLOR = texture(TEXTURE, tiled_uvs + wave_uv_offset * amplitude);
2424
// COLOR = vec4(wave_uv_offset, 0.0, 1.0);
25-
}
25+
}

2018/06-16-intro-to-shaders-2d-water/end/water/02.uv_texture_offset/water_texture_offset.shader

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ void fragment() {
2121
adjusted_uv.y *= aspect_ratio; // Apply aspect ratio
2222

2323
COLOR = texture(TEXTURE, adjusted_uv + texture_based_offset); // And lookup our color
24-
}
24+
}

2018/06-16-intro-to-shaders-2d-water/end/water/03.lighting/water_lighting.shader

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ void fragment() {
2525
// The only difference from the previous example is we deform the normal map with our UV offset
2626
// The normal map comes from the Sprite node, and Light2D reacts to it
2727
NORMALMAP = texture(NORMAL_TEXTURE, UV + texture_based_offset).rgb;
28-
}
28+
}

2018/06-16-intro-to-shaders-2d-water/end/water/04.sine_and_texture/sine_and_texture.shader

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ void fragment() {
3636
COLOR = texture(TEXTURE, adjusted_uv + texture_based_offset * wave_size + sine_waves_offset * sine_wave_size);
3737
// COLOR = vec4(texture_based_offset, 0.0, 1.0); // visualize texture-based waves
3838
// COLOR = vec4(sine_waves_offset, 0.0, 1.0); // visualize sine wave
39-
}
39+
}

2018/06-16-intro-to-shaders-2d-water/end/water/water.gd

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ func _on_item_rect_changed():
88
update_shader_aspect_ratio()
99

1010
func update_shader_aspect_ratio():
11-
material.set_shader_param("aspect_ratio", scale.y/scale.x)
11+
material.set_shader_param("aspect_ratio", scale.y/scale.x)

2018/06-16-intro-to-shaders-2d-water/start/water/02.uv_texture_offset/water_texture_offset.shader

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ void fragment() {
1212
adjusted_uv.y *= aspect_ratio;
1313

1414
COLOR = texture(TEXTURE, adjusted_uv + texture_based_offset);
15-
}
15+
}

2018/06-16-intro-to-shaders-2d-water/start/water/03.lighting/water_lighting.shader

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ void fragment() {
2222
adjusted_uv.y *= aspect_ratio;
2323

2424
COLOR = texture(TEXTURE, adjusted_uv + texture_based_offset);
25-
}
25+
}

2018/06-16-intro-to-shaders-2d-water/start/water/04.sine_and_texture/water_sine_and_texture.shader

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ void fragment() {
1919
COLOR = texture(TEXTURE, tiled_uvs + wave_uv_offset * amplitude);
2020
// COLOR = vec4(wave_uv_offset, vec2(0.0, 1.0));
2121
// COLOR = vec4(UV * aspect_ratio, vec2(0.0, 1.0));
22-
}
22+
}

2018/07-30-2018-multiplayer-high-level-api/Game.gd

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ func _on_player_disconnected(id):
1515
get_node(str(id)).queue_free()
1616

1717
func _on_server_disconnected():
18-
get_tree().change_scene('res://interface/Menu.tscn')
18+
get_tree().change_scene('res://interface/Menu.tscn')

2018/07-30-2018-multiplayer-high-level-api/Network.gd

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ remote func _send_player_info(id, info):
6161
new_player.init(info.name, info.position, true)
6262

6363
func update_position(id, position):
64-
players[id].position = position
64+
players[id].position = position

2018/07-30-2018-multiplayer-high-level-api/outlines/multiplayer-outline-part-2.md

+1-1

2018/09-11-input-actions-remapping/player/Player.gd

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ func _process(delta):
1414
elif Input.is_action_pressed('move_down'):
1515
motion.y = 1
1616

17-
move_and_collide(motion.normalized() * MoveSpeed * delta)
17+
move_and_collide(motion.normalized() * MoveSpeed * delta)

2018/09-20-shaders/shaders/outline.shader

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ void fragment()
2222

2323
vec3 final_color = mix(outline_color.rgb, sprite_color.rgb, sprite_color.a);
2424
COLOR = vec4(final_color, clamp(alpha, 0.0, 1.0));
25-
}
25+
}

2019/05-16-gradient-map-shader/gradient_map.shader

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ void fragment()
1313

1414
COLOR.rgb = mix(input_color.rgb, sampled_color, mix_amount);
1515
COLOR.a = input_color.a;
16-
}
16+
}

2019/05-17-firebase-login/end/interface/register/Register.gd

-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,3 @@ func _on_HTTPRequest_request_completed(result: int, response_code: int, headers:
2222
notification.text = "Registration sucessful!"
2323
yield(get_tree().create_timer(2.0), "timeout")
2424
get_tree().change_scene("res://interface/login/Login.tscn")
25-

0 commit comments

Comments
 (0)