Created
November 2, 2012 04:30
-
-
Save MattRoelle/3998726 to your computer and use it in GitHub Desktop.
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 org.lwjgl.LWJGLException | |
import org.lwjgl.opengl.Display | |
import org.lwjgl.opengl.DisplayMode | |
import org.lwjgl.input.Keyboard | |
import org.lwjgl.input.Mouse | |
import org.lwjgl.opengl.GL11._ | |
import org.lwjgl.Sys | |
import math.abs | |
import scala.math._ | |
import scala.collection.mutable.ArrayBuffer | |
import scala.util.Random | |
import scala.io.Source | |
object MainObj { | |
var radius = 200f | |
var plyr = new Player | |
var bullets = new ArrayBuffer[Bullet]() | |
var enmyBullets = new ArrayBuffer[enemyBullet]() | |
var blocks = new ArrayBuffer[Block]() | |
var turrets = new ArrayBuffer[stdTurret]() | |
var dead: Boolean = false | |
class Rect(var x: Float, var y: Float, var w: Float, var h: Float) { | |
var top = y | |
var bottom = y + h | |
var left = x | |
var right = x + w | |
var dead: Boolean = false | |
def collide(rect2: Rect): Boolean = { | |
left < rect2.right && right > rect2.left && top < rect2.bottom && bottom > rect2.top | |
} | |
def update = { | |
top = y | |
bottom = y + h | |
left = x | |
right = x + w | |
} | |
} | |
class Heart { | |
var x: Float = 392 | |
var y: Float = 292 | |
def render = { | |
glPushMatrix() | |
glTranslatef(x,y,0) | |
glBegin(GL_QUADS) | |
glColor3f(1,0,0) | |
glVertex2f(0,0) | |
glVertex2f(16,0) | |
glVertex2f(16,16) | |
glVertex2f(0,16) | |
glEnd() | |
glPopMatrix() | |
} | |
def update = { | |
} | |
} | |
class Rotater( var w: Float, var h: Float, var radius: Float, var rof: Long, var speed: Float, var angle: Float, var hp: Float, var bSize: Float) { | |
var x: Float = cos( angle).toFloat*this.radius + 400 | |
var y: Float = sin( angle).toFloat*this.radius + 300 | |
var newShot = 0l | |
var dead = false | |
var rect = new Rect(x,y,w,h) | |
var a = 5f | |
def update = { | |
if (dead == false) { | |
angle += speed | |
if (a > 0f) {a -= .1f} | |
if (a < 0f) {a = 0f} | |
if (angle > 0) { | |
x = cos( angle).toFloat*radius + 400 | |
y = sin( angle).toFloat*radius + 300 | |
} | |
if (angle < 0) { | |
x = cos( angle).toFloat*radius + 400 | |
y = sin( angle).toFloat*radius + 300 | |
} | |
val time = (Sys.getTime * 1000) / Sys.getTimerResolution | |
if (time > newShot) { | |
enmyBullets.append(new enemyBullet(x+(w/2),y+(h/2),angle,bSize)) | |
newShot = time + rof | |
} | |
rect.x = x | |
rect.y = y | |
rect.update | |
for(index <- bullets) { | |
if (index.dead == false && index.rect.collide(rect) == true) { | |
index.dead = true | |
hp -= 1 | |
a = 1f | |
} | |
} | |
if(hp <= 0) { | |
this.dead = true | |
} | |
} | |
} | |
def render = { | |
if (dead == false) { | |
glPushMatrix() | |
glTranslatef(x,y,0) | |
glBegin(GL_LINE_LOOP) | |
glColor3f(1,0,0) | |
glVertex2f(0,0) | |
glVertex2f(w,0) | |
glVertex2f(w,h) | |
glVertex2f(0,h) | |
glEnd() | |
glPopMatrix() | |
glEnable(GL_BLEND) | |
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA) | |
glPushMatrix() | |
glTranslatef(x,y,0) | |
glBegin(GL_QUADS) | |
glColor4f(1,0,0,a) | |
glVertex2f(0,0) | |
glVertex2f(w,0) | |
glVertex2f(w,h) | |
glVertex2f(0,h) | |
glEnd() | |
glPopMatrix() | |
glDisable(GL_BLEND) | |
} | |
} | |
} | |
class ptBlk( var w: Float, var h: Float, var speed: Float, var x1: Float, var y1: Float, var x2: Float, var y2: Float, var x: Float, var y: Float, var hp: Float ) { | |
var origin = true | |
var a = 5f | |
var dead = false | |
var rect = new Rect(x,y,w,h) | |
def update = { | |
if (this.dead == false) { | |
if ( origin == false ) { | |
if (x == x1 && y == y1) { origin = true } | |
else { | |
if (x > x1) { x -= speed} | |
else if (x < x1) { x += speed} | |
if (y > y1) { y -= speed} | |
else if (y < y1) {y += speed} | |
if (x > x1-2 && x < x1+2) { x = x1 } | |
if (y > y1-2 && y < y1+2) { y = y1 } | |
} | |
} | |
if ( origin == true ) { | |
if (x+w == x2 && y == y2) { origin = false } | |
else { | |
if (x > x2) { x -= speed} | |
else if (x < x2) { x += speed} | |
if (y > y2) { y -= speed} | |
else if (y < y2) {y += speed} | |
if (x+w > x2-2 && x < x2+2) { x = x2-w } | |
if (y > y2-2 && y < y2+2) { y = y2 } | |
} | |
} | |
rect.x = x | |
rect.y = y | |
rect.update | |
if (a > 0f) { a -= 0.1f } | |
if (a < 0f) { a = 0f } | |
for (index <- bullets) { | |
if (rect.collide(index.rect) == true && index.dead == false ) {index.dead = true; hp -= 1; a = 1f} | |
} | |
if (dead != true) { | |
if (hp <= 0) { dead = true } | |
} | |
} | |
} | |
def render = { | |
if (this.dead == false) { | |
glPushMatrix() | |
glTranslatef(x,y,0) | |
glBegin(GL_LINE_LOOP) | |
glColor3f(1,1,1) | |
glVertex2f(0,0) | |
glVertex2f(w,0) | |
glVertex2f(w,h) | |
glVertex2f(0,h) | |
glEnd() | |
glPopMatrix() | |
glEnable(GL_BLEND) | |
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA) | |
glPushMatrix() | |
glTranslatef(x,y,0) | |
glBegin(GL_QUADS) | |
glColor4f(1,1,1,a) | |
glVertex2f(0,0) | |
glVertex2f(w,0) | |
glVertex2f(w,h) | |
glVertex2f(0,h) | |
glEnd() | |
glPopMatrix() | |
glDisable(GL_BLEND) | |
} | |
} | |
} | |
class hzPt(var x: Float, var y: Float, var x1: Float, var x2: Float, var speed: Float, var w: Float, var h: Float, var hp: Float, var angle: Float,var rof: Long) { | |
var direction = true | |
var newShot = 0l | |
def update = { | |
val time = (Sys.getTime * 1000) / Sys.getTimerResolution | |
if (time > newShot) { | |
enmyBullets.append(new enemyBullet(x+(w/2),y+(h/2),angle,4)) | |
newShot = time + rof | |
} | |
if (x > x2) { direction = false } | |
else if (x < x1) { direction = true } | |
if (direction == true) { x += speed } | |
else if ( direction == false ) { x -= speed } | |
} | |
def render = { | |
glPushMatrix() | |
glTranslatef(x,y,0) | |
glBegin(GL_LINE_LOOP) | |
glColor3f(1,0,0) | |
glVertex2f(0,0) | |
glVertex2f(w,0) | |
glVertex2f(w,h) | |
glVertex2f(0,h) | |
glEnd() | |
glPopMatrix() | |
} | |
} | |
class vtPt(var x: Float, var y: Float, var y1: Float, var y2: Float, var speed: Float, var w: Float, var h: Float, var hp: Float, var angle: Float,var rof: Long) { | |
var direction = true | |
var newShot = 0l | |
var dead = false | |
var rect = new Rect(x,y,w,h) | |
var a = 5f | |
def update = { | |
if (dead == false) { | |
if (a > 0f) { a -= .1f } | |
if (a < 0f) { a = 0f } | |
val time = (Sys.getTime * 1000) / Sys.getTimerResolution | |
if (time > newShot) { | |
enmyBullets.append(new enemyBullet(x+(w/2),y+(h/2),angle,4)) | |
newShot = time + rof | |
} | |
if (y > y2) { direction = false } | |
else if (y < y1) { direction = true } | |
if (direction == true) { y += speed } | |
else if ( direction == false ) { y -= speed } | |
rect.x = x | |
rect.y = y | |
rect.update | |
for(index <- bullets) { | |
if (index.rect.collide(rect) == true && index.dead == false) {hp -= 1;a = 1f;index.dead = true} | |
} | |
if (hp <= 0) { this.dead = true } | |
} | |
} | |
def render = { | |
if (dead == false) { | |
glPushMatrix() | |
glTranslatef(x,y,0) | |
glBegin(GL_LINE_LOOP) | |
glColor3f(1,0,0) | |
glVertex2f(0,0) | |
glVertex2f(w,0) | |
glVertex2f(w,h) | |
glVertex2f(0,h) | |
glEnd() | |
glPopMatrix() | |
glEnable(GL_BLEND) | |
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA) | |
glPushMatrix() | |
glTranslatef(x,y,0) | |
glBegin(GL_QUADS) | |
glColor4f(1,0,0,a) | |
glVertex2f(0,0) | |
glVertex2f(w,0) | |
glVertex2f(w,h) | |
glVertex2f(0,h) | |
glEnd() | |
glPopMatrix() | |
glDisable(GL_BLEND) | |
} | |
} | |
} | |
class Boss { | |
var blocks = new ArrayBuffer[Block]() | |
var stdTurrets = new ArrayBuffer[stdTurret]() | |
var rotaters = new ArrayBuffer[Rotater]() | |
var ptblks = new ArrayBuffer[ptBlk]() | |
var hzpts = new ArrayBuffer[hzPt]() | |
var vtpts = new ArrayBuffer[vtPt]() | |
var buffer = "" | |
var mapArr = new ArrayBuffer[String]() | |
var finalArr = new ArrayBuffer[Array[String]]() | |
for(index <- Source.fromFile("test.txt" )) { | |
if (index == ';') { mapArr.append(buffer); buffer = ""; } | |
else { buffer += index } | |
} | |
for ( index <- mapArr) { | |
val line = index.split( ',' ) | |
if (line(0) == "blk" || line(0) == "\r\nblk" || line(0) == "\nblk") { | |
println("blk") | |
blocks.append(new Block(line(1).toFloat,line(2).toFloat,line(3).toFloat,line(4).toFloat,line(5).toFloat) ) | |
} | |
if (line(0) == "st" || line(0) == "\r\nst" || line(0) == "\nst") { | |
println("st") | |
stdTurrets.append( new stdTurret( line(1).toFloat,line(2).toFloat,line(3).toFloat,line(4).toFloat,line(5).toFloat,line(6).toFloat,line(7).toFloat,line(8).toFloat,line(9).toFloat)) | |
} | |
if (line(0) == "rt" || line(0) == "\r\nrt" || line(0) == "\nrt") { | |
println("rt") | |
rotaters.append( new Rotater(line(1).toFloat,line(2).toFloat,line(3).toFloat,line(4).toLong,line(5).toFloat,line(6).toFloat,line(7).toFloat,line(8).toFloat)) | |
} | |
if (line(0) == "ptblk" || line(0) == "\r\nptblk" || line(0) == "\nptblk") { | |
println("ptblk") | |
ptblks.append( new ptBlk(line(1).toFloat,line(2).toFloat,line(3).toFloat,line(4).toLong,line(5).toFloat,line(6).toFloat,line(7).toFloat,line(8).toFloat,line(9).toFloat,line(10).toFloat)) | |
} | |
if (line(0) == "hzpt" || line(0) == "\r\nhzpt" || line(0) == "\nhzpt") { | |
println("hzpt") | |
hzpts.append( new hzPt(line(1).toFloat,line(2).toFloat,line(3).toFloat,line(4).toLong,line(5).toFloat,line(6).toFloat,line(7).toFloat,line(8).toFloat,line(9).toFloat,line(10).toLong)) | |
} | |
if (line(0) == "vtpt" || line(0) == "\r\nvtpt" || line(0) == "\nvtpt") { | |
println("vtpt") | |
vtpts.append( new vtPt(line(1).toFloat,line(2).toFloat,line(3).toFloat,line(4).toLong,line(5).toFloat,line(6).toFloat,line(7).toFloat,line(8).toFloat,line(9).toFloat,line(10).toLong)) | |
} | |
} | |
def update = { | |
for (index <- enmyBullets) { | |
for (index2 <- blocks) { | |
if (index.rect.collide(index2.rect) == true && index.dead == false && index2.dead == false ) {index.dead = true} | |
} | |
} | |
for (index <- blocks) { | |
index.update | |
} | |
for (index <- stdTurrets) { | |
index.update | |
} | |
for (index <- rotaters) { | |
index.update | |
} | |
for (index <- ptblks) { | |
index.update | |
} | |
for (index <- hzpts) { | |
index.update | |
} | |
for (index <- vtpts) { | |
index.update | |
} | |
} | |
def render = { | |
for (index <- stdTurrets) { | |
index.render | |
} | |
for (index <- blocks) { | |
index.render | |
} | |
for (index <- rotaters) { | |
index.render | |
} | |
for (index <- ptblks) { | |
index.render | |
} | |
for (index <- hzpts) { | |
index.render | |
} | |
for (index <- vtpts) { | |
index.render | |
} | |
} | |
} | |
class enemyBullet(var x: Float, var y: Float, var angle: Float, var size: Float) { | |
var w: Float = size | |
var h: Float = size | |
var rect = new Rect(x,y,w,h) | |
var speed: Float = 4 | |
var dx: Float = ((cos(angle)*speed).toFloat) | |
var dy: Float = ((sin(angle)*speed).toFloat) | |
var dead: Boolean = false | |
def update = { | |
x += dx | |
y += dy | |
rect.x = x | |
rect.y = y | |
rect.update | |
} | |
def render = { | |
glPushMatrix() | |
glTranslatef(x,y,0) | |
glRotatef( (angle + (Pi/2).toFloat).toDegrees,0,0,1) | |
glBegin(GL_TRIANGLES) | |
glColor3f(1,0,0) | |
glVertex2f(0,-1*(h/2)) | |
glVertex2f(-1*(w/2),(h/2)) | |
glVertex2f((w/2),(h/2)) | |
glEnd() | |
glPopMatrix() | |
} | |
} | |
turrets.append(new stdTurret(350,400,16,16,200,5,5,Pi.toFloat,100) ) | |
class stdTurret(var x: Float, var y: Float, var w: Float, var h: Float, var rof: Float, var bSpeed: Float, var bSize: Float, var angle: Float, var hp: Float) { | |
//var dx: Float = cos(angle)*bSpeed | |
//var dy: Float = sin(angle)*bSpeed | |
var newShot = 0f | |
var dead = false | |
var rect = new Rect(x,y,w,h) | |
var a = 5f | |
def update = { | |
if (dead == false) { | |
if (a > 0f) {a -= .1f} | |
if (a < 0f) {a = 0f} | |
for( index <- bullets) { | |
if (index.dead == false && index.rect.collide(rect) == true) { | |
index.dead = true | |
hp -= 1 | |
a = 1f | |
} | |
if (hp <= 0) { | |
dead = true | |
} | |
} | |
val time = (Sys.getTime * 1000) / Sys.getTimerResolution | |
if (time > newShot) { | |
enmyBullets.append(new enemyBullet(x+(w/2),y+(h/2),angle,bSize)) | |
newShot = time + rof | |
} | |
} | |
} | |
def render = { | |
if (dead == false) { | |
glPushMatrix() | |
glTranslatef(x,y,0) | |
glBegin(GL_LINE_LOOP) | |
glColor3f(1,0,0) | |
glVertex2f(0,0) | |
glVertex2f(w,0) | |
glVertex2f(w,h) | |
glVertex2f(0,h) | |
glEnd() | |
glPopMatrix() | |
glEnable(GL_BLEND) | |
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA) | |
glPushMatrix() | |
glTranslatef(x,y,0) | |
glBegin(GL_QUADS) | |
glColor4f(1,0,0,a) | |
glVertex2f(0,0) | |
glVertex2f(w,0) | |
glVertex2f(w,h) | |
glVertex2f(0,h) | |
glEnd() | |
glPopMatrix() | |
glDisable(GL_BLEND) | |
} | |
} | |
} | |
class Block(var x: Float, var y: Float ,var w: Float, var h: Float, var hp: Float) { | |
var rect = new Rect(x,y,w,h) | |
var dead: Boolean = false | |
var a = 5f | |
var targeta = 0f | |
def update = { | |
if (dead != true) { | |
if (a > 0f) { a -= 0.1f } | |
if (a < 0f) { a = 0f } | |
for (index <- bullets) { | |
if (rect.collide(index.rect) == true && index.dead == false ) {index.dead = true; hp -= 1; a = 1f} | |
} | |
if (dead != true) { | |
if (hp <= 0) { dead = true } | |
} | |
} | |
} | |
def render = { | |
if (dead != true) { | |
glPushMatrix() | |
glTranslatef(x,y,0) | |
glBegin(GL_LINE_LOOP) | |
glColor3f(1,1,1) | |
glVertex2f(0,0) | |
glVertex2f(w,0) | |
glVertex2f(w,h) | |
glVertex2f(0,h) | |
glEnd() | |
glPopMatrix() | |
glEnable(GL_BLEND) | |
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA) | |
glPushMatrix() | |
glTranslatef(x,y,0) | |
glBegin(GL_QUADS) | |
glColor4f(1,1,1,a) | |
glVertex2f(0,0) | |
glVertex2f(w,0) | |
glVertex2f(w,h) | |
glVertex2f(0,h) | |
glEnd() | |
glPopMatrix() | |
glDisable(GL_BLEND) | |
} | |
} | |
} | |
class Bullet( var x: Float,var y: Float,var angle: Float) { | |
var speed: Float = 3 | |
var dx = -1*((cos(angle)*speed).toFloat) | |
var dy = -1*((sin(angle)*speed).toFloat) | |
var dead: Boolean = false | |
var rect = new Rect(x,y,4,4) | |
def update = { | |
if (dead != true) { | |
x += dx | |
y += dy | |
rect.x = x | |
rect.y = y | |
rect.update | |
} | |
} | |
def render = { | |
if (dead != true) { | |
glPushMatrix() | |
glTranslatef(x,y,0) | |
glRotatef( (angle - (Pi/2).toFloat).toDegrees,0,0,1) | |
glBegin(GL_TRIANGLES) | |
glColor3f(1,1,1) | |
glVertex2f(0,-2) | |
glVertex2f(-2,2) | |
glVertex2f(2,2) | |
glEnd() | |
glPopMatrix() | |
} | |
} | |
} | |
class Player { | |
var angle = 1f | |
var x: Float = cos( angle).toFloat*radius + 400 | |
var y: Float = sin( angle).toFloat*radius + 300 | |
var newShot = 0l | |
var shotDelay = 200l | |
var rect = new Rect(x,y,10,10) | |
def update = { | |
x = cos( angle).toFloat*radius + 400 | |
y = sin( angle).toFloat*radius + 300 | |
rect.x = x | |
rect.y = y | |
rect.update | |
for(index <- enmyBullets) { | |
if (rect.collide(index.rect) && index.dead == false) {dead = true} | |
} | |
} | |
def shoot = { | |
val time = (Sys.getTime * 1000) / Sys.getTimerResolution | |
if (time > newShot) { | |
bullets.append(new Bullet(x,y,angle)) | |
newShot = time + shotDelay | |
} | |
} | |
def render = { | |
glEnable(GL_LINE_SMOOTH) | |
glEnable(GL_BLEND) | |
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA) | |
glHint(GL_LINE_SMOOTH_HINT,GL_NICEST) | |
glLineWidth(1) | |
glPushMatrix() | |
glTranslatef(x,y,0) | |
glRotatef( (angle - (Pi/2).toFloat).toDegrees,0,0,1) | |
glBegin(GL_TRIANGLES) | |
glColor3f(0,0,0) | |
glVertex2f(0,-5) | |
glVertex2f(-5,5) | |
glVertex2f(5,5) | |
glEnd() | |
glBegin(GL_LINE_LOOP) | |
glColor3f(1,1,1) | |
glVertex2f(0,-5) | |
glVertex2f(-5,5) | |
glVertex2f(5,5) | |
glEnd() | |
glPopMatrix() | |
glDisable(GL_LINE_SMOOTH) | |
glDisable(GL_BLEND) | |
} | |
} | |
def main(args: Array[String]) { | |
Display.setDisplayMode(new DisplayMode(800,600)) | |
Display.create() | |
Display.setVSyncEnabled(true) | |
glMatrixMode(GL_PROJECTION) | |
glLoadIdentity() | |
glOrtho(0,800,600,0,1,-1) | |
glMatrixMode(GL_MODELVIEW) | |
glLoadIdentity() | |
glShadeModel(GL_SMOOTH) | |
glClearColor(0,0,0,0) | |
var heart = new Heart | |
var rand = new Random | |
var boss = new Boss | |
var lastFps = Sys.getTime | |
var fps = 0 | |
while (Display.isCloseRequested() == false) { | |
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) | |
glLoadIdentity() | |
if (Sys.getTime - lastFps > 1000) { | |
println(fps) | |
fps = 0 | |
lastFps += 1000 | |
} | |
fps += 1 | |
if (Keyboard.isKeyDown(Keyboard.KEY_W) == true) { radius -= 1f} | |
if (Keyboard.isKeyDown(Keyboard.KEY_S) == true) {radius += 1f} | |
if (Keyboard.isKeyDown(Keyboard.KEY_A) == true) {plyr.angle += .03f} | |
if (Keyboard.isKeyDown(Keyboard.KEY_D) == true) {plyr.angle -= .03f} | |
if (Keyboard.isKeyDown(Keyboard.KEY_Q) == true) { enmyBullets.append( new enemyBullet(400,300,plyr.angle,5)) } | |
if (Keyboard.isKeyDown(Keyboard.KEY_SPACE) == true) {plyr.shoot} | |
if (Keyboard.isKeyDown(Keyboard.KEY_R) == true) {dead = true} | |
if (radius < 145) { radius = 145 } | |
else if (radius > 275) { radius = 275 } | |
glEnable(GL_LINE_SMOOTH) | |
glEnable(GL_BLEND) | |
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA) | |
glHint(GL_LINE_SMOOTH_HINT,GL_NICEST) | |
glLineWidth(.5f) | |
glPushMatrix() | |
glTranslatef(400,300,0) | |
glBegin(GL_LINE_LOOP) | |
glColor3f(1,1,1) | |
for(index <- 0 until 360) { | |
glVertex2f(cos( (index.toFloat).toRadians).toFloat*radius,sin( (index.toFloat).toRadians).toFloat*radius) | |
} | |
glEnd() | |
glPopMatrix() | |
glDisable(GL_LINE_SMOOTH) | |
glDisable(GL_BLEND) | |
plyr.update | |
plyr.render | |
glPushMatrix() | |
glTranslatef(0,0,0) | |
glBegin(GL_QUADS) | |
glColor3f(1,0,0) | |
glVertex2f(0,0) | |
glVertex2f(10,0) | |
glVertex2f(10,10) | |
glVertex2f(0,10) | |
glEnd() | |
glPopMatrix() | |
for(index <- bullets) { | |
index.update | |
index.render | |
} | |
for(index <- enmyBullets) { | |
index.update | |
index.render | |
} | |
boss.update | |
boss.render | |
if (dead == true) { | |
radius = 200f | |
plyr = new Player | |
bullets = new ArrayBuffer[Bullet]() | |
enmyBullets = new ArrayBuffer[enemyBullet]() | |
blocks = new ArrayBuffer[Block]() | |
turrets = new ArrayBuffer[stdTurret]() | |
boss = new Boss | |
dead = false | |
} | |
Display.update | |
Display.sync(60) | |
} | |
Display.destroy() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment