Skip to content

Instantly share code, notes, and snippets.

View GuilleUCM's full-sized avatar

Guillermo Jiménez GuilleUCM

View GitHub Profile
@GuilleUCM
GuilleUCM / CSharpSpatialHash.cs
Created May 11, 2013 09:30 — forked from sixman9/CSharpSpatialHash.cs
Unity: SpatialHash
/*
http://entitycrisis.blogspot.com/2010/02/spatial-hash-class-in-c.html
This is a rather useful class, the Spatial Hash. It is used for creating an index of spatial data (3D things in space) and allowing fast queries to be run against the index.
Effectively, you can use this class to ask, "I'm at this position, what other objects are near me?".
*/
using UnityEngine; //This needs to be 'removed' to make 'universal', i.e. not tied to Unity3D
using System.Collections;
@GuilleUCM
GuilleUCM / gist:5661733
Last active October 13, 2023 20:31 — forked from entaroadun/gist:1653794
Recommendation datasets

Movies Recommendation:

Music Recommendation:

@GuilleUCM
GuilleUCM / MenuItem.cs
Created June 9, 2013 10:29
Unity: Menu Item
using UnityEngine;
[RequireComponent (typeof (Collider))]
public class MenuItem: MonoBehaviour {
public KeyCode m_shortcut = KeyCode.Space;
public bool m_QuitButton = false;
public string m_levelName;
public Color m_colorNormal = Color.white;
public Color m_colorHighlighted = Color.red;
@GuilleUCM
GuilleUCM / maxCamera.cs
Created June 24, 2013 20:33
Unity:Camera:Free camera control
//
//Filename: maxCamera.cs
//
// original: http://www.unifycommunity.com/wiki/index.php?title=MouseOrbitZoom
//
// --01-18-2010 - create temporary target, if none supplied at start
// - Pan = Ctrl + button
// - Orbit = Alt+button
// - Zoom = Alt + Ctrl + button
// - Reset = Space
@GuilleUCM
GuilleUCM / BezierCurveDegree3.cs
Created June 24, 2013 20:43
Unity::Bezier curve degree 3
using UnityEngine;
using System.Collections;
public class BezierCurveDegree3 : MonoBehaviour {
public Vector3 m_startPoint;
public Vector3 m_endPoint;
public float m_time = 5.0f;
public float m_height = 1.0f;
@GuilleUCM
GuilleUCM / meyer-reset
Created December 5, 2013 13:45 — forked from hunt808/meyer-reset
CSS::Meyer reset
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
@GuilleUCM
GuilleUCM / quintus html file
Created February 4, 2014 18:27
html:quintus
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src='lib/quintus.js'></script>
<script src='lib/quintus_sprites.js'></script>
<script src='lib/quintus_scenes.js'></script>
<script src='lib/quintus_input.js'></script>
<script src='lib/quintus_anim.js'></script>
@GuilleUCM
GuilleUCM / gist:5fb0a6deafad6374e8c4
Created January 15, 2015 09:23
Bootstrap Basic Template
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap 101 Template</title>
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
@GuilleUCM
GuilleUCM / spin.cs
Created February 13, 2015 08:24
Unity:Animation:Spin rotation
using UnityEngine;
using System.Collections;
/// <summary>
/// Spins or rotates a gameObject around Y-axis (up)
/// </summary>
public class Spin : MonoBehaviour {
/// <summary>
/// Number of complete rotations per second
@GuilleUCM
GuilleUCM / Scale.cs
Created February 13, 2015 08:31
Unity:Animation:Scale
using UnityEngine;
using System.Collections;
/// <summary>
/// Scales proportionally a gameobject over the X and Z axis
/// </summary>
public class Scale : MonoBehaviour {
/// <summary>
/// The expected final scale (1.0f is the current scale)