Skip to content

Instantly share code, notes, and snippets.

@alxcancado
alxcancado / jsdoit.css
Created May 14, 2013 13:15
forked: RSS Reader with jQuery Mobile
.ui-header .ui-footer .ui-btn-right {
background:#c24e00;
}
.articleContent > table > tbody > tr > td > font > br {
display: none;
}
.articleContent > table > tbody > tr > td > font > br + div {
display: none;
}
.articleContent * {
@alxcancado
alxcancado / Marquee.cs
Last active August 29, 2015 14:17 — forked from mminer/Marquee.cs
ADDED Font selection;
using UnityEngine;
public class Marquee : MonoBehaviour
{
public string message = "Where we're going, we don't need roads.";
public float scrollSpeed = 50;
Rect messageRect;
// Select your font in the Unity Inspector
{
"status": "success",
"search_nag": {},
"code": 0,
"bookmark": "b28xMDB8MDQ0NWZiOTBjNzNiODlkOTQ1ZTk3ZjY0ZTBhYjU0YjM0ZDYyNDg3NjU3ZWQ3OGJmZjI4ZTliZGRmODBlMzJlNQ==",
"debug_data": {
"query_data": {}
},
"message": "ok",
"data": [
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class ColorFader : MonoBehaviour
{
public float delay = 2;
void Start () {
StartCoroutine(Fade(delay));
var stopwatch = new System.Diagnostics.Stopwatch();
stopwatch.Start();
// your function here..
stopwatch.Stop();
//Debug.Log("Timer: " + stopwatch.Elapsed);
Debug.Log("Timer: " + stopwatch.ElapsedMilliseconds);
stopwatch.Reset();
@alxcancado
alxcancado / FadeInOut.cs
Last active August 29, 2015 14:25 — forked from docky/FadeInOut.cs
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class Game : MonoBehaviour
{
public static Game instance;
public Player player;
public int score = 0;
@alxcancado
alxcancado / WebLocationChecker.cs
Created April 26, 2017 01:26 — forked from andyman/WebLocationChecker.cs
Simple script for Unity to check the domain that the web player is hosted on, and redirect it to the proper location if it is not in the list of domains. It does nothing if it is not a web player build.
using UnityEngine;
using System.Collections;
using System.Text;
/** Add this script to an object in the first scene of your game.
* It doesn't do anything for non-webplayer builds. For webplayer
* builds, it checks the domain to make sure it contains at least
* one of the strings, or it will redirect the page to the proper
* URL for the game.
*/
@alxcancado
alxcancado / WebLocationChecker.cs
Created April 26, 2017 01:28 — forked from andyman/WebLocationChecker.cs
WebLocationChecker.cs
using UnityEngine;
using System.Collections;
using System.Text;
/**
* WebLocationChecker by @andyman404
* Licensed under Creative Commons Zero (do with it as you want, no credit needed)
* https://creativecommons.org/publicdomain/zero/1.0/
*
* This script site-locks your Unity Webplayer/WebGL build.
@alxcancado
alxcancado / .gitignore
Created July 9, 2017 17:22 — forked from teocomi/.gitignore
Gitignore for Unity projects
# =============== #
# Unity generated #
# =============== #
[Tt]emp/
[Oo]bj/
[Bb]uild
/[Bb]uilds/
/[Ll]ibrary/
sysinfo.txt
*.stackdump
@alxcancado
alxcancado / LeanLocalizedTextMeshProUGUI.cs
Created March 7, 2018 19:35
Lean Localization TextMeshPro
using TMPro;
using UnityEngine;
using UnityEngine.UI;
namespace Lean.Localization
{
// This component will update a Text component with localized text, or use a fallback if none is found
[ExecuteInEditMode]
[DisallowMultipleComponent]
[RequireComponent(typeof(TextMeshProUGUI))]