-Dsun.java2d.xrender=true
to ~/Library/Preferences/IntelliJ IDEAXX/idea.vmoptions
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
Vector2 pixelToTile (Vector2 mouseInput) { | |
//Tiles are what size? | |
if (tileSize == 0) { | |
tileSize = tileGrid[0][0].toUse.getWidth(); | |
} | |
int x = Math.floor(mouseInput.x / tileSize); | |
int y = Math.floor(mouseInput.y / tileSize); | |
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
private Room LoadRoom(int roomNumber) | |
{ | |
Room room = new Room(); | |
TextAsset roomAsset = levelsData[roomNumber]; | |
Dictionary<string, object> hash = roomAsset.text.dictionaryFromJson(); | |
int roomWidth = int.Parse(hash["width"].ToString()); | |
int roomHeight = int.Parse(hash["height"].ToString()); | |
// tile properties for cells |
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
/* | |
* Copyright (c) 2012 Calvin Rien | |
* | |
* Based on the JSON parser by Patrick van Bergen | |
* http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html | |
* | |
* Simplified it so that it doesn't throw exceptions | |
* and can be used in Unity iPhone with maximum code stripping. | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining |
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
#jenkins-name-icon { | |
position: absolute; | |
bottom: 3px; | |
left: 132px; | |
} |
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
using System; | |
using System.Collections.Generic; | |
// from https://github.com/adonaac/blog/issues/1 | |
public class DungeonGenerator | |
{ | |
/** GRID OF CELLS **/ | |
private Cell[,] grid; | |
private int gridWidth, gridHeight; // of grid |
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
float xOffset = arrayWid * (t.width / 2) + Gdx.graphics.getWidth() / 2; | |
float yOffset = arrayHei * (t.height / 2) + Gdx.graphics.getHeight() / 2; | |
public void render(SpriteBatch sb) { | |
sb.begin(); | |
for (int x = 0; x < tileArray.length(); x++) { | |
for (int y = 0; y < tileArray[0].length(); y++) { | |
Texture texture = tileArray[x][y].background; | |
int posX = x * tileArray[x][y].width - xOffset; |
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
[ | |
{ | |
"hex": "#EFDECD", | |
"name": "Almond", | |
"rgb": "(239, 222, 205)" | |
}, | |
{ | |
"hex": "#CD9575", | |
"name": "Antique Brass", | |
"rgb": "(205, 149, 117)" |
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
using System; | |
using System.Collections.Generic; | |
// from https://github.com/adonaac/blog/issues/1 | |
public class DungeonGenerator | |
{ | |
/** GRID OF CELLS **/ | |
private Cell[,] grid; | |
private int gridWidth, gridHeight; // of grid |
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
; paint.net Palette File | |
; Lines that start with a semicolon are comments | |
; Colors are written as 8-digit hexadecimal numbers: aarrggbb | |
; For example, this would specify green: FF00FF00 | |
; The alpha ('aa') value specifies how transparent a color is. FF is fully opaque, 00 is fully transparent. | |
; A palette must consist of ninety six (96) colors. If there are less than this, the remaining color | |
; slots will be set to white (FFFFFFFF). If there are more, then the remaining colors will be ignored. | |
FF000000 | |
FF222034 | |
FF45283C |