diff options
| author | _Tradam <[email protected]> | 2021-05-26 02:12:54 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-05-26 02:12:54 -0400 |
| commit | 41f574c04c70e6327cb1861fac01664bd3f3f7ba (patch) | |
| tree | 34a184ff4fd182a8823f416fd87b4d546e1e250f /app/lib/systems/10_player.rb | |
| parent | f97a9ca95e464e728bba9337b579bc380c33bc7d (diff) | |
| parent | a5bbcbf5d78005746fb64c51a779f830d7667a57 (diff) | |
| download | typemon-code-master.tar.gz typemon-code-master.zip | |
split off FelFlame
Diffstat (limited to 'app/lib/systems/10_player.rb')
| -rw-r--r-- | app/lib/systems/10_player.rb | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/app/lib/systems/10_player.rb b/app/lib/systems/10_player.rb deleted file mode 100644 index 307731a..0000000 --- a/app/lib/systems/10_player.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Systems - class Player - @co = Components::Overworld - def self.run - Components::PlayerControl.data.each do |id, data| - puts6 "Right: #{@co.data[:grid][@co.data[id].x+1][@co.data[id].y]}" - puts6 "Left #{@co.data[:grid][@co.data[id].x-1][@co.data[id].y]}" - puts6 "Down #{@co.data[:grid][@co.data[id].x][@co.data[id].y+1]}" - puts6 "Up #{@co.data[:grid][@co.data[id].x][@co.data[id].y-1]}" - #puts6 @co.data[:grid][@co.data[id].x + 1][@co.data[id].y][:hitbox].nil? - - if !(Components::Sprite.id & Entity.signatures[id]).zero? - if $gtk.args.inputs.keyboard.key_down.send(data.north) &&\ - (@co.data[:grid][@co.data[id].x][@co.data[id].y - 1].nil? ||\ - @co.data[:grid][@co.data[id].x][@co.data[id].y - 1][:hitbox].nil?) - Components::Sprite.data[id].y -= 64 - @co.data[id].y -= 1 - elsif $gtk.args.inputs.keyboard.key_down.send(data.south) &&\ - (@co.data[:grid][@co.data[id].x][@co.data[id].y + 1].nil? ||\ - @co.data[:grid][@co.data[id].x][@co.data[id].y + 1][:hitbox].nil?) - Components::Sprite.data[id].y += 64 - @co.data[id].y += 1 - elsif $gtk.args.inputs.keyboard.key_down.send(data.east) &&\ - (@co.data[:grid][@co.data[id].x + 1][@co.data[id].y].nil? ||\ - @co.data[:grid][@co.data[id].x + 1][@co.data[id].y][:hitbox].nil?) - Components::Sprite.data[id].x += 64 - @co.data[id].x += 1 - elsif $gtk.args.inputs.keyboard.key_down.send(data.west) &&\ - (@co.data[:grid][@co.data[id].x - 1][@co.data[id].y].nil? || @co.data[:grid][@co.data[id].x - 1][@co.data[id].y][:hitbox].nil?) - Components::Sprite.data[id].x -= 64 - @co.data[id].x -= 1 - end - #Components::Sprite.data[id].y -= 64 if $gtk.args.inputs.keyboard.key_down.send(data.north) - #Components::Sprite.data[id].y += 64 if $gtk.args.inputs.keyboard.key_down.send(data.south) - #Components::Sprite.data[id].x += 64 if $gtk.args.inputs.keyboard.key_down.send(data.east) - #Components::Sprite.data[id].x -= 64 if $gtk.args.inputs.keyboard.key_down.send(data.west) - end - end - end - end -end |
