Skip to content

Instantly share code, notes, and snippets.

View GuilleUCM's full-sized avatar

Guillermo Jiménez GuilleUCM

View GitHub Profile
@GuilleUCM
GuilleUCM / SmoothFollow2D
Created April 2, 2015 09:46
Unity:Camera:Smooth Follow 2D
using UnityEngine;
using System.Collections;
public class SmoothFollow2D : MonoBehaviour {
//offset from the viewport center to fix damping
public float m_DampTime = 10f;
public Transform m_Target;
public float m_XOffset = 0;
public float m_YOffset = 0;
@GuilleUCM
GuilleUCM / ObjectShake.cs
Last active August 7, 2023 18:34
Unity:Animation:Shake object vibrate
using UnityEngine;
using System.Collections;
/// http://www.mikedoesweb.com/2012/camera-shake-in-unity/
public class ObjectShake : MonoBehaviour {
private Vector3 originPosition;
private Quaternion originRotation;
public float shake_decay = 0.002f;
@GuilleUCM
GuilleUCM / FadeOut.cs
Created February 13, 2015 09:12
Unity:Animation:Fade out alpha
using UnityEngine;
using System.Collections;
/// <summary>
/// Creates a fadeout animation modifying the alpha component of the first material color.
/// The material must be transparent
/// </summary>
public class FadeOut : MonoBehaviour {
/// <summary>
@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)
@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 / 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 / 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 / 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 / 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 / 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