mirror of
https://github.com/cyberarm/i-mic-fps.git
synced 2025-12-16 08:02:36 +00:00
Refactored GameObject to Entity, replaced @x,@y,@z with @position, added @velocity vector to Entity, bricked Player terrain interaction while authoring Axis Aligned Bounding Box Tree for CollisionManager to handle all collision interaction. Added PhysicsManager stub.
This commit is contained in:
@@ -4,9 +4,9 @@ class IMICFPS
|
||||
attr_reader :ambient, :diffuse, :specular, :position, :light_id
|
||||
attr_accessor :x, :y, :z, :intensity
|
||||
def initialize(x:,y:,z:, game_state:,
|
||||
ambient: Vertex.new(0.5, 0.5, 0.5, 1),
|
||||
diffuse: Vertex.new(1, 0.5, 0, 1), specular: Vertex.new(0.2, 0.2, 0.2, 1),
|
||||
position: Vertex.new(x, y, z, 0), intensity: 1)
|
||||
ambient: Vector.new(0.5, 0.5, 0.5, 1),
|
||||
diffuse: Vector.new(1, 0.5, 0, 1), specular: Vector.new(0.2, 0.2, 0.2, 1),
|
||||
position: Vector.new(x, y, z, 0), intensity: 1)
|
||||
@x,@y,@z = x,y,z
|
||||
@game_state = game_state
|
||||
@intensity = intensity
|
||||
|
||||
Reference in New Issue
Block a user