mirror of
https://github.com/cyberarm/i-mic-fps.git
synced 2025-12-16 08:02:36 +00:00
Added protype scripts for Alternate Tank and Power Plant, changed naming convention of assets to: package -> name instead of: package -> model
This commit is contained in:
@@ -91,6 +91,7 @@ class IMICFPS
|
||||
|
||||
if @entity
|
||||
@entity.orientation.y += delta
|
||||
@entity.orientation.y %= 360.0
|
||||
position_camera
|
||||
else
|
||||
free_move
|
||||
|
||||
@@ -7,7 +7,7 @@ class IMICFPS
|
||||
attr_reader :name, :bound_model, :first_person_view
|
||||
|
||||
def setup
|
||||
bind_model("base", "biped")
|
||||
bind_model
|
||||
@collision = :dynamic
|
||||
@physics = true
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ class IMICFPS
|
||||
|
||||
@backface_culling = backface_culling
|
||||
@name = @manifest.name
|
||||
@bound_model = map_entity ? bind_model(map_entity.package, map_entity.model) : nil
|
||||
@bound_model = map_entity ? bind_model : nil
|
||||
|
||||
@visible = true
|
||||
@renderable = true
|
||||
@@ -32,7 +32,7 @@ class IMICFPS
|
||||
# :static => does not move ever,
|
||||
# :none => no collision check, entities can pass through
|
||||
@collision = :static
|
||||
@physics = false # Entity affected by gravity and what not
|
||||
@physics = @manifest.physics # Entity affected by gravity and what not
|
||||
@mass = 100 # kg
|
||||
|
||||
@delta_time = Gosu.milliseconds
|
||||
@@ -56,7 +56,7 @@ class IMICFPS
|
||||
@collidable.include?(@collision)
|
||||
end
|
||||
|
||||
def bind_model(package, name)
|
||||
def bind_model
|
||||
model = ModelLoader.new(manifest: @manifest, entity: @dummy_entity)
|
||||
|
||||
raise "model isn't a model!" unless model.is_a?(ModelLoader)
|
||||
|
||||
Reference in New Issue
Block a user