Update to Crystal 1.0.0
parent
1c454fd523
commit
6a4f1edb5e
|
@ -0,0 +1,6 @@
|
|||
version: 2.0
|
||||
shards:
|
||||
sdl:
|
||||
git: https://github.com/ysbaddaden/sdl.cr.git
|
||||
version: 0.1.0+git.commit.d7b2a9b754660ca7f4a03dd3dbe6f3d9395da7d6
|
||||
|
|
@ -102,7 +102,9 @@ class Naka::Map
|
|||
end
|
||||
|
||||
def get(x, y)
|
||||
get_chunk(x / CHUNK_SIZE, y / CHUNK_SIZE).get(x % CHUNK_SIZE, y % CHUNK_SIZE)
|
||||
x_value = x / CHUNK_SIZE
|
||||
y_value = y / CHUNK_SIZE
|
||||
get_chunk(x_value.to_i, y_value.to_i).get(x % CHUNK_SIZE, y % CHUNK_SIZE)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -88,14 +88,14 @@ class Naka::Timer
|
|||
getter last_update
|
||||
|
||||
def initialize
|
||||
@start = Time.now
|
||||
@start = Time.local
|
||||
@last_update = @start
|
||||
end
|
||||
|
||||
def step
|
||||
now = Time.now
|
||||
now = Time.local
|
||||
|
||||
dt = now.epoch_ms - @last_update.epoch_ms
|
||||
dt = now.to_unix_ms - @last_update.to_unix_ms
|
||||
|
||||
@last_update = now
|
||||
|
||||
|
|
Loading…
Reference in New Issue