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
for(Map.Entry<Integer, String> entry : map.entrySet()){ | |
System.out.printf(entry.getKey() + " || " + entry.getValue()); | |
} |
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 UnityEngine; | |
using System.Collections; | |
using UnityEditor; | |
public class CreateWorldMesh : MonoBehaviour | |
{ | |
public int dimension; | |
public bool isTerrain; | |
public float terrainPower; |
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 UnityEngine; | |
using System.Collections; | |
public class CreateWorldMesh : MonoBehaviour | |
{ | |
public int dimension; | |
public void Start() | |
{ |
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
if (inputEnabled && Input.GetButtonDown("Button1")) | |
{ | |
inputEnabled = false; | |
// Launch game exe | |
} |
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 UnityEngine; | |
using System.Collections; | |
public class KillParticleEffect : MonoBehaviour | |
{ | |
void Update() | |
{ | |
if (!particleSystem.IsAlive()) | |
Destroy(this.gameObject); | |
} |
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 UnityEngine; | |
using System.Collections; | |
/** | |
* A camera to help with Orthagonal mode when you need it to lock to pixels. Desiged to be used on android and retina devices. | |
*/ | |
public class PixelPerfectCam : MonoBehaviour | |
{ | |
/** |
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
RaycastHit2D hit = Physics2D.Raycast((Vector2)transform.position, direction, length, layerMask); | |
// check hit in direction | |
if (hit.collider != null) { | |
// we hit something check what it is | |
if (hit.collider.gameObject.CompareTag("wall")) { | |
// we hit a wall so don't translate in this direction | |
} | |
} |
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 UnityEngine; | |
using System.Collections; | |
public class TileManager : MonoBehaviour | |
{ | |
public GameObject walkableTile; | |
public GameObject blockingTile; | |
private GameObject[] tiles = new GameObject[25]; | |
public int offset = 0; // current position on grid array |
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 UnityEngine; | |
using System.Collections; | |
public class TiltController : MonoBehaviour | |
{ | |
public float speed; | |
void Update() | |
{ | |
Vector3 dir = Vector3.right * Input.acceleration.x; |
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
@Override | |
public doThing(String param) | |
{ | |
super.doThing(param); | |
} |