mirror of
https://github.com/cyberarm/i-mic-rts.git
synced 2025-12-14 07:12:34 +00:00
Added Director, Player and stubbed Order, mostly working Entity#rotate_towards
This commit is contained in:
20
lib/player.rb
Normal file
20
lib/player.rb
Normal file
@@ -0,0 +1,20 @@
|
||||
class IMICRTS
|
||||
class Player
|
||||
attr_reader :id, :name, :entities, :orders, :camera
|
||||
def initialize(id:, name: nil)
|
||||
@id = id
|
||||
@name = name ? name : "Novice-#{id}"
|
||||
|
||||
@entities = []
|
||||
@orders = []
|
||||
@camera = Camera.new
|
||||
end
|
||||
|
||||
def tick
|
||||
puts "Player #{@id}-#{@name} ticked: #{Gosu.milliseconds}"
|
||||
end
|
||||
|
||||
def entity(id)
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user