Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d422d06

Browse files
committed
Rename player scene to miner
1 parent 932d7e3 commit d422d06

File tree

11 files changed

+27
-27
lines changed

11 files changed

+27
-27
lines changed

‎godot/CellularAutomata/03.DungeonGenerator/CellularDungeonGenerator.gd‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ var _maximum_treasure := 10
3030
var _map := {}
3131

3232
onready var _tilemap := $TileMapDungeon
33-
onready var _player := $Player
33+
onready var _miner := $Miner
3434
onready var _exit := $Exit
3535

3636

@@ -146,7 +146,7 @@ func _position_start_and_exit() -> void:
146146
if not floor_cells:
147147
return
148148

149-
var player_cell := Vector2.ZERO
149+
var miner_cell := Vector2.ZERO
150150
var exit_cell := Vector2.ZERO
151151

152152
floor_cells.shuffle()
@@ -157,13 +157,13 @@ func _position_start_and_exit() -> void:
157157
if _count_floor_neighbors(cell) < 8:
158158
continue
159159

160-
player_cell = cell
160+
miner_cell = cell
161161
break
162162

163163
while floor_cells:
164164
var cell = floor_cells.pop_back()
165165

166-
if cell.distance_to(player_cell) < _minimum_distance_to_exit:
166+
if cell.distance_to(miner_cell) < _minimum_distance_to_exit:
167167
continue
168168

169169
if _count_floor_neighbors(cell) < 8:
@@ -172,7 +172,7 @@ func _position_start_and_exit() -> void:
172172
exit_cell = cell
173173
break
174174

175-
_player.position = player_cell * CELL_SIZE
175+
_miner.position = miner_cell * CELL_SIZE
176176
_exit.position = exit_cell * CELL_SIZE
177177

178178

‎godot/CellularAutomata/03.DungeonGenerator/CellularDungeonGenerator.tscn‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[ext_resource path="res://CellularAutomata/03.DungeonGenerator/Props/Exit.tscn" type="PackedScene" id=1]
44
[ext_resource path="res://CellularAutomata/03.DungeonGenerator/Props/Treasure.tscn" type="PackedScene" id=2]
5-
[ext_resource path="res://CellularAutomata/03.DungeonGenerator/Player/Player.tscn" type="PackedScene" id=3]
5+
[ext_resource path="res://CellularAutomata/03.DungeonGenerator/Miner/Miner.tscn" type="PackedScene" id=3]
66
[ext_resource path="res://CellularAutomata/03.DungeonGenerator/tileset_advanced.tres" type="TileSet" id=4]
77
[ext_resource path="res://CellularAutomata/03.DungeonGenerator/ButtonCameraSwitch.gd" type="Script" id=5]
88
[ext_resource path="res://CellularAutomata/03.DungeonGenerator/UISettingsAdvanced.gd" type="Script" id=6]
@@ -20,10 +20,10 @@ format = 1
2020
anchor_mode = 0
2121
zoom = Vector2( 4, 4 )
2222

23-
[node name="Player" parent="." instance=ExtResource( 3 )]
23+
[node name="Miner" parent="." instance=ExtResource( 3 )]
2424
z_index = 1
2525

26-
[node name="CameraPlayer" type="Camera2D" parent="Player"]
26+
[node name="CameraPlayer" type="Camera2D" parent="Miner"]
2727
current = true
2828
smoothing_enabled = true
2929
smoothing_speed = 10.0
@@ -85,7 +85,7 @@ __meta__ = {
8585
"_edit_use_anchors_": false
8686
}
8787
camera_one_path = NodePath("../../../CameraDungeon")
88-
camera_two_path = NodePath("../../../Player/CameraPlayer")
88+
camera_two_path = NodePath("../../../Miner/CameraPlayer")
8989

9090
[node name="MinimumCavernArea" type="HBoxContainer" parent="CanvasLayer/UISettings"]
9191
margin_left = 8.0
@@ -423,8 +423,8 @@ __meta__ = {
423423
"_edit_use_anchors_": false
424424
}
425425

426-
[connection signal="pickaxe_used" from="Player" to="." method="remove_walls"]
427-
[connection signal="player_entered" from="Exit" to="." method="generate_new_dungeon"]
426+
[connection signal="pickaxe_used" from="Miner" to="." method="remove_walls"]
427+
[connection signal="miner_entered" from="Exit" to="." method="generate_new_dungeon"]
428428
[connection signal="floor_conversion_changed" from="CanvasLayer/UISettings" to="." method="set_floor_conversion"]
429429
[connection signal="maximum_treasure_changed" from="CanvasLayer/UISettings" to="." method="set_maximum_treasure"]
430430
[connection signal="min_cavern_area_changed" from="CanvasLayer/UISettings" to="." method="set_minimum_cavern_area"]

‎godot/CellularAutomata/03.DungeonGenerator/Player/Player.tscn‎ renamed to ‎godot/CellularAutomata/03.DungeonGenerator/Miner/Miner.tscn‎

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

3-
[ext_resource path="res://CellularAutomata/03.DungeonGenerator/Player/Player.gd" type="Script" id=1]
4-
[ext_resource path="res://CellularAutomata/03.DungeonGenerator/Player/miner.png" type="Texture" id=2]
5-
[ext_resource path="res://CellularAutomata/03.DungeonGenerator/Player/drill-top.png" type="Texture" id=3]
6-
[ext_resource path="res://CellularAutomata/03.DungeonGenerator/Player/drill-blade.png" type="Texture" id=4]
3+
[ext_resource path="res://CellularAutomata/03.DungeonGenerator/Miner/Miner.gd" type="Script" id=1]
4+
[ext_resource path="res://CellularAutomata/03.DungeonGenerator/Miner/miner.png" type="Texture" id=2]
5+
[ext_resource path="res://CellularAutomata/03.DungeonGenerator/Miner/drill-top.png" type="Texture" id=3]
6+
[ext_resource path="res://CellularAutomata/03.DungeonGenerator/Miner/drill-blade.png" type="Texture" id=4]
77

88
[sub_resource type="CircleShape2D" id=1]
99
radius = 24.0
@@ -24,7 +24,7 @@ tracks/0/keys = {
2424
"values": [ 0.0, 360.0 ]
2525
}
2626

27-
[node name="Player" type="KinematicBody2D"]
27+
[node name="Miner" type="KinematicBody2D"]
2828
collision_mask = 2
2929
script = ExtResource( 1 )
3030

‎godot/CellularAutomata/03.DungeonGenerator/Player/drill-blade.png.import‎ renamed to ‎godot/CellularAutomata/03.DungeonGenerator/Miner/drill-blade.png.import‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
importer="texture"
44
type="StreamTexture"
5-
path="res://.import/drill-blade.png-510b5002a2c4621f446c9135f6ede055.stex"
5+
path="res://.import/drill-blade.png-de8a6cf1ae08c7269581da2473f9d019.stex"
66
metadata={
77
"vram_texture": false
88
}
99

1010
[deps]
1111

12-
source_file="res://CellularAutomata/03.DungeonGenerator/Player/drill-blade.png"
13-
dest_files=[ "res://.import/drill-blade.png-510b5002a2c4621f446c9135f6ede055.stex" ]
12+
source_file="res://CellularAutomata/03.DungeonGenerator/Miner/drill-blade.png"
13+
dest_files=[ "res://.import/drill-blade.png-de8a6cf1ae08c7269581da2473f9d019.stex" ]
1414

1515
[params]
1616

‎godot/CellularAutomata/03.DungeonGenerator/Player/drill-top.png.import‎ renamed to ‎godot/CellularAutomata/03.DungeonGenerator/Miner/drill-top.png.import‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
importer="texture"
44
type="StreamTexture"
5-
path="res://.import/drill-top.png-10ec986ed9090827bbe2b462e3e1035f.stex"
5+
path="res://.import/drill-top.png-c73f71dd0dc6e52c50e2b8dd19ae575a.stex"
66
metadata={
77
"vram_texture": false
88
}
99

1010
[deps]
1111

12-
source_file="res://CellularAutomata/03.DungeonGenerator/Player/drill-top.png"
13-
dest_files=[ "res://.import/drill-top.png-10ec986ed9090827bbe2b462e3e1035f.stex" ]
12+
source_file="res://CellularAutomata/03.DungeonGenerator/Miner/drill-top.png"
13+
dest_files=[ "res://.import/drill-top.png-c73f71dd0dc6e52c50e2b8dd19ae575a.stex" ]
1414

1515
[params]
1616

‎godot/CellularAutomata/03.DungeonGenerator/Player/miner.png.import‎ renamed to ‎godot/CellularAutomata/03.DungeonGenerator/Miner/miner.png.import‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
importer="texture"
44
type="StreamTexture"
5-
path="res://.import/miner.png-7aedf707ce38ff9d2406e476e753d784.stex"
5+
path="res://.import/miner.png-6e8a50cec6c2a0656a1bfcf286916308.stex"
66
metadata={
77
"vram_texture": false
88
}
99

1010
[deps]
1111

12-
source_file="res://CellularAutomata/03.DungeonGenerator/Player/miner.png"
13-
dest_files=[ "res://.import/miner.png-7aedf707ce38ff9d2406e476e753d784.stex" ]
12+
source_file="res://CellularAutomata/03.DungeonGenerator/Miner/miner.png"
13+
dest_files=[ "res://.import/miner.png-6e8a50cec6c2a0656a1bfcf286916308.stex" ]
1414

1515
[params]
1616

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /