This file contains 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 Player | |
attr :x, :y, :w, :h, :action, :action_at, | |
:dx, :dy, :breathe_at, :facing, :run_speed, :on_ground_y, :on_ground, | |
:prev_on_ground | |
def initialize | |
@breathe_at = -100 | |
@action = :idle | |
@action_at = 0 | |
@x = 100 |
This file contains 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
def tick args | |
defaults args | |
tick_audio args | |
tick_calibration args | |
if args.state.tick_count > args.state.start_playing_on_tick | |
args.state.beat_accumulator += args.state.beats_per_tick | |
args.state.quarter_beat = args.state.beat_accumulator.to_i | |
args.state.previous_quarter_beat ||= args.state.quarter_beat | |
end |
This file contains 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 MindGames | |
attr_accessor :message_history, :message | |
def initialize game | |
@game = game | |
@message = "" | |
@message_history = [] | |
@random_tips = [] | |
end |
demo.mp4
This file contains 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 RootScene < Scene | |
attr :game | |
def initialize | |
@game = Game.new | |
$game = @game | |
@world_scene = WorldScene.new | |
@embark_scene = EmbarkScene.new | |
@world_event_scene = WorldEventScene.new | |
@battle_scene = BattleScene.new |
This file contains 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 Rabbit | |
def initialize x, y, w, h | |
@x = x | |
@dx = [1, -1].sample | |
@y = y | |
@dy = [1, -1].sample | |
@w = w | |
@h = h |
apples-to-apples.mp4
nani.mp4
NewerOlder