diff options
author | dusoleil <howcansocksbereal@gmail.com> | 2022-09-21 08:40:31 -0400 |
---|---|---|
committer | dusoleil <howcansocksbereal@gmail.com> | 2022-09-21 08:40:31 -0400 |
commit | 62f864004c6cfcbdb919e5e27a6ddaaaa8c4acc9 (patch) | |
tree | 3f127840e593f33dbc5366a8c1539880df490433 | |
parent | b5b62ba1f7fb409a5802e0e139a9c4f37f064e1d (diff) | |
download | godot_wildjam_49-62f864004c6cfcbdb919e5e27a6ddaaaa8c4acc9.tar.gz godot_wildjam_49-62f864004c6cfcbdb919e5e27a6ddaaaa8c4acc9.zip |
Add an example Dock to the world
-rw-r--r-- | project.godot | 6 | ||||
-rw-r--r-- | world/chunk/ChunkGen.gd | 1 | ||||
-rw-r--r-- | world/monuments/dock/DockMonument.gd | 7 |
3 files changed, 14 insertions, 0 deletions
diff --git a/project.godot b/project.godot index 98ac295..42f0e5f 100644 --- a/project.godot +++ b/project.godot @@ -9,6 +9,11 @@ config_version=4 _global_script_classes=[ { +"base": "Monument", +"class": "DockMonument", +"language": "GDScript", +"path": "res://world/monuments/dock/DockMonument.gd" +}, { "base": "Reference", "class": "Monument", "language": "GDScript", @@ -25,6 +30,7 @@ _global_script_classes=[ { "path": "res://world/monuments/lighthouse/lighthouseMonument.gd" } ] _global_script_class_icons={ +"DockMonument": "", "Monument": "", "Wave": "", "lighthouseMonument": "" diff --git a/world/chunk/ChunkGen.gd b/world/chunk/ChunkGen.gd index 7420ae7..0a94108 100644 --- a/world/chunk/ChunkGen.gd +++ b/world/chunk/ChunkGen.gd @@ -19,6 +19,7 @@ func setup_monuments(): monuments.push_back(lighthouseMonument.new(Transform(Basis(),Vector3(300.0,0.0,-300.0)))) monuments.push_back(lighthouseMonument.new(Transform(Basis(),Vector3(0.0,0.0,-1000.0)))) monuments.push_back(lighthouseMonument.new(Transform(Basis(),Vector3(-500.0,0.0,-2500.0)))) + monuments.push_back(DockMonument.new(Transform(Basis().rotated(Vector3.UP,PI/2.0),Vector3(-500.0,0.0,0.0)))) func rng_2dv(coords:Vector2): self.rng.seed = hash(coords) diff --git a/world/monuments/dock/DockMonument.gd b/world/monuments/dock/DockMonument.gd new file mode 100644 index 0000000..3265070 --- /dev/null +++ b/world/monuments/dock/DockMonument.gd @@ -0,0 +1,7 @@ +extends Monument +class_name DockMonument + +var packed_scene = preload("res://world/monuments/dock/Dock.tscn") + +func _init(xform:Transform).(xform,Vector2(300.0,300.0),packed_scene): + pass |