mirror of
https://github.com/TimeCrafters/timecrafters_configuration_tool_desktop.git
synced 2025-12-15 05:22:34 +00:00
Compare commits
2 Commits
ffe946ae15
...
08bbd2c638
| Author | SHA1 | Date | |
|---|---|---|---|
| 08bbd2c638 | |||
| 08fdd1de1b |
@@ -6,12 +6,12 @@ GEM
|
||||
excon (~> 0.88)
|
||||
gosu (~> 1.1)
|
||||
gosu_more_drawables (~> 0.3)
|
||||
excon (0.98.0)
|
||||
gosu (1.4.5)
|
||||
excon (0.104.0)
|
||||
gosu (1.4.6)
|
||||
gosu_more_drawables (0.3.1)
|
||||
gosu_notifications (0.1.0)
|
||||
ocra (1.3.11)
|
||||
rake (13.0.6)
|
||||
rake (13.1.0)
|
||||
releasy (0.2.3)
|
||||
bundler (>= 1.2.1)
|
||||
cri (~> 2.1.0)
|
||||
|
||||
@@ -15,30 +15,20 @@ module TAC
|
||||
|
||||
case @roll
|
||||
when 1, 4
|
||||
# Blue: Right
|
||||
# Red: Left
|
||||
#Blue and Red: Left
|
||||
|
||||
@ducks << Ducky.new(window: window, alliance: :blue, slot: 3, speed: 512, die_size: @size)
|
||||
@ducks << Ducky.new(window: window, alliance: :red, slot: 1, speed: 512, die_size: @size)
|
||||
@ducks << Ducky.new(window: window, alliance: :blue, slot: 1, speed: 1010, die_size: @size, label: "Left")
|
||||
@ducks << Ducky.new(window: window, alliance: :red, slot: 1, speed: 1010, die_size: @size, label: "Left")
|
||||
when 2, 5
|
||||
#Blue and Red: Center
|
||||
|
||||
@ducks << Ducky.new(window: window, alliance: :blue, slot: 1, speed: 512, die_size: @size)
|
||||
@ducks << Ducky.new(window: window, alliance: :blue, slot: 3, speed: 512, die_size: @size)
|
||||
|
||||
@ducks << Ducky.new(window: window, alliance: :red, slot: 3, speed: 512, die_size: @size)
|
||||
@ducks << Ducky.new(window: window, alliance: :red, slot: 1, speed: 512, die_size: @size)
|
||||
@ducks << Ducky.new(window: window, alliance: :blue, slot: 2, speed: 1010, die_size: @size, label: "Center")
|
||||
@ducks << Ducky.new(window: window, alliance: :red, slot: 2, speed: 1010, die_size: @size, label: "Center")
|
||||
when 3, 6
|
||||
# Blue: Left
|
||||
# Red: Right
|
||||
#Blue and Red: Right
|
||||
|
||||
@ducks << Ducky.new(window: window, alliance: :blue, slot: 1, speed: 512, die_size: @size)
|
||||
@ducks << Ducky.new(window: window, alliance: :blue, slot: 2, speed: 512, die_size: @size)
|
||||
@ducks << Ducky.new(window: window, alliance: :blue, slot: 3, speed: 512, die_size: @size)
|
||||
|
||||
@ducks << Ducky.new(window: window, alliance: :red, slot: 3, speed: 512, die_size: @size)
|
||||
@ducks << Ducky.new(window: window, alliance: :red, slot: 2, speed: 512, die_size: @size)
|
||||
@ducks << Ducky.new(window: window, alliance: :red, slot: 1, speed: 512, die_size: @size)
|
||||
@ducks << Ducky.new(window: window, alliance: :blue, slot: 3, speed: 1010, die_size: @size, label: "Right")
|
||||
@ducks << Ducky.new(window: window, alliance: :red, slot: 3, speed: 1010, die_size: @size, label: "Right")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -121,14 +111,17 @@ module TAC
|
||||
SIZE = 0.20
|
||||
HALF_SIZE = SIZE * 0.5
|
||||
|
||||
def initialize(window:, alliance:, slot:, speed:, die_size:)
|
||||
def initialize(window:, alliance:, slot:, speed:, die_size:, label:)
|
||||
@window = window
|
||||
@alliance = alliance
|
||||
@slot = slot
|
||||
@speed = speed
|
||||
@die_size = die_size
|
||||
@label = label
|
||||
|
||||
@image = @window.get_image("#{ROOT_PATH}/media/openclipart_ducky.png")
|
||||
@debug_text = Gosu::Font.new(28)
|
||||
@label_text = CyberarmEngine::Text.new(@label, static: true, size: 28, alignment: :center)
|
||||
|
||||
if @alliance == :blue
|
||||
@position = CyberarmEngine::Vector.new(@window.width, die_size)
|
||||
@@ -146,6 +139,10 @@ module TAC
|
||||
duck_scale = (size * (SIZE + HALF_SIZE)) / @image.width
|
||||
duck_scale_x = @alliance == :blue ? -duck_scale : duck_scale
|
||||
@image.draw_rot(slot_position(size), size * SIZE + float_y(size), 1, 0, 0.5, 0.5, duck_scale_x, duck_scale)
|
||||
|
||||
@label_text.x = slot_position(size) + (@alliance == :blue ? -170 : 110)
|
||||
@label_text.y = float_y(size) + 52
|
||||
@label_text.draw
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user