Updated all-screen drawing
So there is less black space on iOS devices
This commit is contained in:
parent
ab4f6cdffd
commit
48686f5bbf
3 changed files with 11 additions and 7 deletions
|
@ -123,8 +123,10 @@ class CubeTubeGame < GameplayScene
|
|||
end
|
||||
@bg_x %= @bg_w if @bg_x >= @bg_w
|
||||
|
||||
Sprite.for(:tunnel_loop).render(@args, { x: @bg_x + @bg_w, y: 0, w: @bg_w, h: 720 })
|
||||
Sprite.for(:tunnel_loop).render(@args, { x: @bg_x, y: 0, w: @bg_w, h: 720 })
|
||||
Sprite.for(:tunnel_loop).render(@args, { x: @bg_x - @bg_w, y: 0, w: @bg_w, h: 720 })
|
||||
Sprite.for(:tunnel_loop).render(@args, { x: @bg_x - (@bg_w * 2), y: 0, w: @bg_w, h: 720 })
|
||||
|
||||
# @grid_y = ((1280 - (@grid_h * @blocksize)) / 2) - 21
|
||||
Sprite.for(:train).render(@args, { x: 0, y: @grid_x - 140.75 })
|
||||
|
|
|
@ -10,10 +10,11 @@ class Intro < GameplayScene
|
|||
[1.0, 0.25, 0, 0]
|
||||
]
|
||||
@station_start_w = Sprite.for(:station_start).w
|
||||
@full_station_start_w = Sprite.for(:station_start).w + Sprite.for(:tunnel_loop).w
|
||||
@tunnel_w = Sprite.for(:tunnel_loop).w
|
||||
@full_station_start_w = @station_start_w + @tunnel_w
|
||||
@tracks_w = Sprite.for(:tracks).w
|
||||
|
||||
@leave_duration = 600
|
||||
@leave_duration = 500
|
||||
@leave_spline = [
|
||||
[0, 0, 0.5, 1.0]
|
||||
]
|
||||
|
@ -40,7 +41,7 @@ class Intro < GameplayScene
|
|||
@state += 1
|
||||
end
|
||||
when 1
|
||||
@train_pos = 1280 * args.easing.ease_spline(@train_start, now, @train_duration, @train_spline)
|
||||
@train_pos = @train_start_pos * args.easing.ease_spline(@train_start, now, @train_duration, @train_spline)
|
||||
if @train_pos <= 0
|
||||
@state += 1
|
||||
@wait_start = now
|
||||
|
@ -66,6 +67,7 @@ class Intro < GameplayScene
|
|||
Sprite.for(:station_loop).render(args, { x: @station_pos })
|
||||
Sprite.for(:station_start).render(args, { x: @station_pos - @station_start_w })
|
||||
Sprite.for(:tunnel_loop).render(args, { x: @station_pos - @full_station_start_w })
|
||||
Sprite.for(:tunnel_loop).render(args, { x: @station_pos - @full_station_start_w - @tunnel_w })
|
||||
|
||||
Sprite.for(:train).render(args, { y: 39.25, x: @train_pos })
|
||||
Sprite.for(:screen).render(args, { x: @train_pos + 1024, y: 270 })
|
||||
|
@ -98,7 +100,7 @@ class Intro < GameplayScene
|
|||
@train_start = 0
|
||||
@wait_start = 0
|
||||
@leave_start = 0
|
||||
@train_pos = 1280
|
||||
@train_pos = @train_start_pos = 1500
|
||||
@station_pos = 0
|
||||
@screen_on = false
|
||||
end
|
||||
|
|
|
@ -30,7 +30,7 @@ orientation=landscape
|
|||
# HD Mode: when enabled, will give you 720p, 1080p, 1440p, 4k, and 5k rendering options
|
||||
# Check out the following YouTube Video for a demo of DragonRuby's HD Capabilities
|
||||
# https://youtu.be/Rnc6z84zaa4
|
||||
# hd=false
|
||||
hd=true
|
||||
|
||||
# === Texture Atlases ===
|
||||
|
||||
|
@ -42,7 +42,7 @@ orientation=landscape
|
|||
|
||||
# All Screen Mode: when enabled, removes the letter box and lets you render outside of the 16:9 safe area
|
||||
# NOTE: requires hd=true
|
||||
# allscreen=false
|
||||
allscreen=true
|
||||
|
||||
# All Screen Mode's Max Scale: You can specify the maximum scale for your game. Any resolution higher than your max scale will give more area outside of your resolutions safe area:
|
||||
|
||||
|
@ -70,4 +70,4 @@ orientation=landscape
|
|||
# allscreen_max_scale=300
|
||||
|
||||
# 5k: scales up to 6400x2880
|
||||
# allscreen_max_scale=400
|
||||
allscreen_max_scale=400
|
||||
|
|
Loading…
Reference in a new issue