diff options
author | dusoleil <howcansocksbereal@gmail.com> | 2022-09-18 19:38:35 -0400 |
---|---|---|
committer | dusoleil <howcansocksbereal@gmail.com> | 2022-09-18 19:42:01 -0400 |
commit | 32bf9d2024362d45dc351c8f1d0b3b301caf1131 (patch) | |
tree | fb6540bce94cb55c6123ecfe1327abeabea2925f /world/obstacles/Rock.gd | |
parent | ffc92ed12c6e680776d355ff9fcef70e5e28d7c8 (diff) | |
download | game_jam49-32bf9d2024362d45dc351c8f1d0b3b301caf1131.tar.gz game_jam49-32bf9d2024362d45dc351c8f1d0b3b301caf1131.zip |
Organize World Gen Stuff
Diffstat (limited to 'world/obstacles/Rock.gd')
-rw-r--r-- | world/obstacles/Rock.gd | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/world/obstacles/Rock.gd b/world/obstacles/Rock.gd new file mode 100644 index 0000000..577e626 --- /dev/null +++ b/world/obstacles/Rock.gd @@ -0,0 +1,18 @@ +extends StaticBody + +onready var collision_enabled = self.collision_layer + +func lod_distance(): + $"MeshInstance".visible = false + $"MeshInstance2".visible = true + self.collision_layer = 0 + +func lod_mid(): + $"MeshInstance".visible = true + $"MeshInstance2".visible = false + self.collision_layer = 0 + +func lod_close(): + $"MeshInstance".visible = true + $"MeshInstance2".visible = false + self.collision_layer = collision_enabled |