This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Sfx | |
def initialize(args) | |
@args = args | |
@music_mast = 0.5 | |
@sfx_mast = 0.5 | |
end | |
def stop(sound_id) | |
if @args.audio.key?(sound_id) | |
@args.audio.delete(sound_id) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This breaks when the characters no longer fit on the line. A smarter version would iterate using word/line boundaries | |
# Sample Usage: | |
# rect = args.layout.rect(row: 3, col: 12, w: 6, h: 7, dx: 0, dy: 0) # OBJECTIVE | |
# text = "OBJECTIVE:\n\nMECHs are threatening\nour CITIZENS:\n+ Bring the CITIZENS home.\n+ Destroy the MECHs." | |
# render_text(args, args.outputs.primitives, rect, text, 1, "/fonts/PixeloidSans.ttf") | |
# | |
def render_text(args, pipeline, rect, text, font_size, font) | |
work = "" | |
len = text.length | |
font_h = args.gtk.calcstringbox(text, font_size, font).y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class LevelObjectiveWidget | |
# | |
# Initialize Widget | |
# | |
def initialize | |
@finished = false | |
end | |
# | |
# Process input from args |