Restructured 'objects' folder into a meaningful 'assets' folder, added 'war_factory' model, refactored GameObject#bind_model and ModelLoader to understand the restructuring.

This commit is contained in:
2019-02-17 10:50:08 -06:00
parent 3f7c5e992d
commit 9f6f330202
45 changed files with 3899 additions and 2442 deletions

View File

@@ -1,13 +1,15 @@
class IMICFPS
class Tree < GameObject
def setup
bind_model(ModelLoader.new(type: :obj, file_path: "objects/tree.obj", game_object: self))
bind_model("base", "tree")
vert = @terrain.find_nearest_vertex(self, 4.5)
if vert
self.x = vert.x
self.y = vert.y
self.z = vert.z
end
# @y_rotation += rand(1..100)
end
# def update