Skip to content

Instantly share code, notes, and snippets.

View valryon's full-sized avatar
🤘

Damien Mayance valryon

🤘
View GitHub Profile
@valryon
valryon / ScrollingScript.cs
Last active November 8, 2021 02:17
Multi directionnal infinite scrolling script.This is related to the tutorial http://pixelnest.io/tutorials/2d-game-unity/parallax-scrolling/
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
/// <summary>
/// Parallax scrolling script that should be assigned to a layer
///
/// This is related to the tutorial http://pixelnest.io/tutorials/2d-game-unity/parallax-scrolling/
///
@valryon
valryon / Bezier.cs
Created September 23, 2015 15:08
Bezier curves in Unity
/// <summary>
/// Easy and simple Bezier curves for Unity
/// </summary>
/// <remarks>http://devmag.org.za/2011/04/05/bzier-curves-a-tutorial/ </remarks>
public static class Bezier
{
/// <summary>
///
/// </summary>
/// <param name="t">Time, between 0 and 1</param>
@valryon
valryon / Extruder.cs
Created November 18, 2016 13:25
Extrude a 2D sprite to a mesh from a Polygon Collider in Unity3D
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
/// <summary>
///
/// </summary>
/// <remarks>Source: https://forum.unity3d.com/threads/trying-extrude-a-2d-polygon-to-create-a-mesh.102629/ </remarks>
[RequireComponent(typeof(MeshFilter), typeof(MeshRenderer), typeof(PolygonCollider2D))]
public class ExtrudeSprite : MonoBehaviour