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
| import pygame | |
| from pygame.transform import scale2x | |
| screen = pygame.display.set_mode((300,300)) | |
| spritesheet = pygame.image.load('spritesheet.png') | |
| pacman_right = scale2x(spritesheet.subsurface(455, 0, 16, 16)) | |
| pacman_left = scale2x(spritesheet.subsurface(455, 16, 16, 16)) | |
| pacman_up = scale2x(spritesheet.subsurface(455, 32, 16, 16)) | |
| pacman_down = scale2x(spritesheet.subsurface(455, 48, 16, 16)) |
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
| import pygame | |
| from pygame.transform import scale2x | |
| screen = pygame.display.set_mode((1024,768)) | |
| spritesheet = pygame.image.load('spritesheet.png') | |
| MOVE_INCREMENT = 4 | |
| pacman_right = scale2x(spritesheet.subsurface(455, 0, 16, 16)) | |
| pacman_left = scale2x(spritesheet.subsurface(455, 16, 16, 16)) |
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
| import pygame | |
| def start(res): | |
| return pygame.display.set_mode(res) | |
| def loop(): | |
| running = True | |
| while running: | |
| for e in pygame.event.get(): | |
| if e.type == pygame.QUIT: |
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
| .row.align-center | |
| .column.small-12.medium-8.large-6 | |
| h1 Two.js: Rotate A Path Around A Fixed Point | |
| .mount.js-mount | |
| .row.align-center | |
| .column.small-12.medium-8.large-6 | |
| p Rotating paths in two.js around a point requires each vertex in a path's `vertices` property to be <strong>offset</strong> the same distance away from an origin. | |
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
| require_relative 'imports' | |
| #require 'pry-debugger-jruby' | |
| require 'pry' | |
| class MainGame < ApplicationAdapter | |
| def create | |
| binding.pry | |
| Gdx::graphics::setContinuousRendering(false) |
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
| require_relative 'imports' # LibGDX class java_imports | |
| require 'pry-debugger-jruby' | |
| class MainGame < ApplicationAdapter | |
| def create | |
| #binding.pry | |
| breakpoint | |
| Gdx::graphics::setContinuousRendering(false) |
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
| AwRdrn8ws68jzqvWU8GYYzWRGVUgaQDmtjRa4V |
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
| package kbn.libgdx | |
| import com.badlogic.gdx.{ Gdx, ApplicationAdapter } | |
| import com.badlogic.gdx.graphics.{ GL20, PerspectiveCamera } | |
| import com.badlogic.gdx.graphics.g3d.ModelBatch | |
| import com.badlogic.gdx.graphics.g3d.particles.{ | |
| ParticleEffect, ParticleSystem, ParticleEffectLoader | |
| } | |
| import com.badlogic.gdx.graphics.g3d.particles.batches.PointSpriteParticleBatch | |
| import com.badlogic.gdx.assets.AssetManager |
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
| ~/work/lagunitas $ echo $PS1 | |
| \[\033[0;30;33m\]\w\[\e[0m\] $ |
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
| # Pages can be defined like so: | |
| LoginScreen < ScreenModel | |
| element :email, "et_email" | |
| element :password, "et_pw" | |
| element :login_button, "btn_login" | |
| end | |
| # and called in step definitions like so | |
| Then(/^I enter my email and password and press the login button$/) do | |
| LoginScreen.email.type("[email protected]") |
NewerOlder