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
/** | |
* Detect overlap between two square objects | |
* @param square1 {object} x, y, width, height | |
* @param square2 {object} x, y, width, height | |
* @returns {boolean} | |
*/ | |
function getOverlap(square1, square2) { | |
return square1.x < square2.x + square2.width && | |
square1.x + square1.width > square2.x && | |
square1.y < square2.y + square2.height && |
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
/** | |
* Weltmeister - Multiple entity select and move | |
* @author Ash Blue (Twitter @ashbluewd) | |
* @src https://gist.github.com/ashblue/9901165 | |
* | |
* Allows you to select and move multiple entities in Weltmeister with a single command | |
* | |
* Quick usage instructions | |
* - Select the entity layer | |
* - Hold down shift |
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
ig.module( | |
'plugins.tween' | |
).requires( | |
'impact.entity' | |
).defines( function() { | |
'use strict'; | |
var _easing = { | |
linear: { | |
easeNone: function (k) { |
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 PlayerHealth : MonoBehaviour { | |
Vector2 pos = new Vector2(10, 10); | |
Vector2 size = new Vector2(200, 16); | |
float barFill = 0.8f; | |
string barText = "Health"; |
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; | |
// Must be applied to an empty object wrapping a sprite image | |
public class Tiler : MonoBehaviour { | |
Hashtable tileCollection = new Hashtable(); // X and Y coordinates formatted as x0y0 relative to the starting tile | |
GameObject originTile; | |
public bool repeatX = true; | |
public bool repeatY = false; |
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; | |
// Force inject a sprite renderer before initialization (if not present) | |
[RequireComponent(typeof(SpriteRenderer))] | |
// @TODO Warning, does not take into account parallaxed weight, needs to be added manually | |
// @NOTE Must have a parent container | |
public class TilerChild : MonoBehaviour { | |
public bool repeatX = false; |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
# | |
# Offer Drawer Module | |
# | |
# @author | |
# | |
(($, window, document) -> | |
class offerDrawerModule | |
_data: undefined | |
_defaultId: '#offer-drawer' |
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
<iframe width="600" height="450" frameborder="0" style="border:0" src="https://www.google.com/maps/embed/v1/search?q=https://www.google.com/maps/embed/v1/search?q=360%203rd%20Street%2C%20San%20Francisco%2C%20CA%2C%20United%20States&key=AIzaSyA9R4ONwGZtWSfenQvFXaaLwkCyHMq5o7k"></iframe> |
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.Generic; | |
namespace PixelCrushers.DialogueSystem.Adnc { | |
public class DialogueDbManager : MonoBehaviour { | |
[Tooltip("Allows you to add multiple databases to the current Dialogue System. @IMPORTANT Make sure to run the ID assigner to prevent overwriting.")] | |
[SerializeField] List<DialogueDatabase> db; | |
// Use this for initialization | |
void Awake () { |
OlderNewer