mirror of
https://github.com/cyberarm/i-mic-rts.git
synced 2025-12-15 15:52:34 +00:00
Basic networking implemented, currently non functional
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
class IMICRTS
|
||||
class Director
|
||||
attr_reader :current_tick, :map
|
||||
def initialize(map:, players:, networking_mode: :virtual, tick_rate: 10)
|
||||
def initialize(map:, players:, networking_mode:, tick_rate: 10)
|
||||
@map = map
|
||||
@players = players
|
||||
@connection = IMICRTS::Connection.new(director: self, mode: networking_mode)
|
||||
@@ -104,5 +104,9 @@ class IMICRTS
|
||||
def entities
|
||||
@players.map { |player| player.entities }.flatten
|
||||
end
|
||||
|
||||
def finalize
|
||||
@connection.finalize
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user