Minor fixes and updates for iOS
including moving some files into the app folder instead of where it was perviously
This commit is contained in:
parent
b05fb1e0db
commit
9c0fe1b8dc
9 changed files with 28 additions and 15 deletions
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# first, third-party libraries
|
# first, third-party libraries
|
||||||
require 'lib/coalesce.rb'
|
require 'app/util/coalesce.rb'
|
||||||
|
|
||||||
# then, some basic classes required for lists of assets
|
# then, some basic classes required for lists of assets
|
||||||
require 'app/classes/sprite_instance.rb'
|
require 'app/classes/sprite_instance.rb'
|
||||||
|
@ -9,9 +9,9 @@ require 'app/classes/sound_instance.rb'
|
||||||
require 'app/classes/scene_instance.rb'
|
require 'app/classes/scene_instance.rb'
|
||||||
|
|
||||||
# then, asset lists
|
# then, asset lists
|
||||||
require 'sprites/_list.rb'
|
require 'app/sprites_list.rb'
|
||||||
require 'sounds/_list.rb'
|
require 'app/sounds_list.rb'
|
||||||
require 'music/_list.rb'
|
require 'app/music_list.rb'
|
||||||
|
|
||||||
# then, default keybindings
|
# then, default keybindings
|
||||||
require 'app/keybindings.rb'
|
require 'app/keybindings.rb'
|
||||||
|
|
|
@ -432,9 +432,9 @@ class CubeTubeGame < GameplayScene
|
||||||
end
|
end
|
||||||
|
|
||||||
def rotate_current_piece_right
|
def rotate_current_piece_right
|
||||||
@current_piece = @current_piece.transpose.map(&:reverse)
|
new_piece = @current_piece.transpose.map(&:reverse)
|
||||||
@current_piece = @current_piece.transpose.map(&:reverse)
|
new_piece = new_piece.transpose.map(&:reverse)
|
||||||
@current_piece = @current_piece.transpose.map(&:reverse)
|
new_piece = new_piece.transpose.map(&:reverse)
|
||||||
new_rotation = (@current_piece_rotation + 1) % 4
|
new_rotation = (@current_piece_rotation + 1) % 4
|
||||||
rotate_current_piece(new_piece, new_rotation)
|
rotate_current_piece(new_piece, new_rotation)
|
||||||
end
|
end
|
||||||
|
@ -518,7 +518,7 @@ class CubeTubeGame < GameplayScene
|
||||||
move_current_piece_up if Input.pressed?(@args, :up)
|
move_current_piece_up if Input.pressed?(@args, :up)
|
||||||
if Input.pressed_or_held?(@args, :left)
|
if Input.pressed_or_held?(@args, :left)
|
||||||
@next_move -= @current_speed / 3
|
@next_move -= @current_speed / 3
|
||||||
@lock_timer -= @current_speed / 3 if @lock_timer > 0
|
@lock_timer -= 3 if @lock_timer.positive?
|
||||||
end
|
end
|
||||||
rotate_current_piece_left if Input.pressed?(@args, :rotate_left)
|
rotate_current_piece_left if Input.pressed?(@args, :rotate_left)
|
||||||
rotate_current_piece_right if Input.pressed?(@args, :rotate_right)
|
rotate_current_piece_right if Input.pressed?(@args, :rotate_right)
|
||||||
|
@ -536,7 +536,7 @@ class CubeTubeGame < GameplayScene
|
||||||
delta_x = cursor.x - @cursor_down.x
|
delta_x = cursor.x - @cursor_down.x
|
||||||
if delta_x.negative? && delta_x.abs > (@blocksize * 2) && @cursor_piece_x_origin == @current_piece_x
|
if delta_x.negative? && delta_x.abs > (@blocksize * 2) && @cursor_piece_x_origin == @current_piece_x
|
||||||
@next_move -= @current_speed / 3
|
@next_move -= @current_speed / 3
|
||||||
@lock_timer -= @current_speed / 3 if @lock_timer.positive?
|
@lock_timer -= 3 if @lock_timer.positive?
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -559,7 +559,11 @@ class CubeTubeGame < GameplayScene
|
||||||
@current_piece_x = max_delta
|
@current_piece_x = max_delta
|
||||||
else
|
else
|
||||||
if !@cursor_down.nil? && (@cursor_down_tick + 30) >= @args.state.tick_count && @cursor_piece_x_origin == @current_piece_x
|
if !@cursor_down.nil? && (@cursor_down_tick + 30) >= @args.state.tick_count && @cursor_piece_x_origin == @current_piece_x
|
||||||
rotate_current_piece_left
|
if @cursor_down.x < 640
|
||||||
|
rotate_current_piece_right
|
||||||
|
else
|
||||||
|
rotate_current_piece_left
|
||||||
|
end
|
||||||
end
|
end
|
||||||
@cursor_down = nil
|
@cursor_down = nil
|
||||||
@cursor_down_tick = nil
|
@cursor_down_tick = nil
|
||||||
|
|
|
@ -4,6 +4,10 @@
|
||||||
def init(args)
|
def init(args)
|
||||||
Input.reset_swipe(args)
|
Input.reset_swipe(args)
|
||||||
GameSetting.load_settings(args)
|
GameSetting.load_settings(args)
|
||||||
|
|
||||||
|
if args.gtk.platform?(:mobile)
|
||||||
|
args.gtk.set_window_fullscreen(true)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Code that runs every game tick (mainly just calling other ticks)
|
# Code that runs every game tick (mainly just calling other ticks)
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
# Information about the Pro version can be found at: http://dragonruby.org/toolkit/game#purchase
|
# Information about the Pro version can be found at: http://dragonruby.org/toolkit/game#purchase
|
||||||
|
|
||||||
# teamid needs to be set to your assigned Team Id which can be found at https://developer.apple.com/account/#/membership/
|
# teamid needs to be set to your assigned Team Id which can be found at https://developer.apple.com/account/#/membership/
|
||||||
teamid=
|
teamid=4JYKNQ5WRZ
|
||||||
# appid needs to be set to your application identifier which can be found at https://developer.apple.com/account/resources/identifiers/list
|
# appid needs to be set to your application identifier which can be found at https://developer.apple.com/account/resources/identifiers/list
|
||||||
appid=
|
appid=au.death.cube-tube
|
||||||
# appname is the name you want to show up underneath the app icon on the device. Keep it under 10 characters.
|
# appname is the name you want to show up underneath the app icon on the device. Keep it under 10 characters.
|
||||||
appname=
|
appname=Cube Tube
|
||||||
# devcert is the certificate to use for development/deploying to your local device. This is the NAME of the certificate as it's displayed in Keychain Access.
|
# devcert is the certificate to use for development/deploying to your local device. This is the NAME of the certificate as it's displayed in Keychain Access.
|
||||||
devcert=
|
devcert=Apple Development: Gordon Pedersen (4ALQVARFJQ)
|
||||||
# prodcert is the certificate to use for distribution to the app store. This is the NAME of the certificate as it's displayed in Keychain Access.
|
# prodcert is the certificate to use for distribution to the app store. This is the NAME of the certificate as it's displayed in Keychain Access.
|
||||||
prodcert=
|
prodcert=Apple Distribution: Gordon Pedersen (4JYKNQ5WRZ)
|
||||||
|
|
5
run
Executable file
5
run
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
cd "`dirname "$0"`"
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
exec ./dragonruby cube-tube
|
Loading…
Reference in a new issue